HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_Add.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_AddEnums
22 {
23  enum class Add
24  {
25  ALL = 0,
26  GROUP,
27  SKIP,
28  SEP,
29  ATTRIBUTE
30  };
31 }
32 
33 
35 {
36 public:
37  static int version() { return 1; }
38  struct Points
39  {
40  bool usept;
43 
44 
46  {
47  usept = false;
48  pt = UT_Vector3D(0,0,0);
49  weight = 1;
50 
51  }
52 
53  bool operator==(const Points &src) const
54  {
55  if (usept != src.usept) return false;
56  if (pt != src.pt) return false;
57  if (weight != src.weight) return false;
58 
59  return true;
60  }
61 
62  };
63 
65  {
67 
68  buf.strcat("[ ");
69  for (int i = 0; i < list.entries(); i++)
70  {
71  if (i)
72  buf.strcat(", ");
73  buf.strcat("( ");
74  buf.append("");
75  buf.appendSprintf("%s", (list(i).usept) ? "true" : "false");
76  buf.append(", ");
77  buf.appendSprintf("(%f, %f, %f)", list(i).pt.x(), list(i).pt.y(), list(i).pt.z());
78  buf.append(", ");
79  buf.appendSprintf("%f", (list(i).weight));
80 
81  buf.strcat(" )");
82  }
83  buf.strcat(" ]");
84 
85  UT_StringHolder result = buf;
86  return result;
87  }
88  struct Prims
89  {
91  bool closed;
92 
93 
95  {
96  prim = ""_sh;
97  closed = false;
98 
99  }
100 
101  bool operator==(const Prims &src) const
102  {
103  if (prim != src.prim) return false;
104  if (closed != src.closed) return false;
105 
106  return true;
107  }
108 
109  };
110 
112  {
114 
115  buf.strcat("[ ");
116  for (int i = 0; i < list.entries(); i++)
117  {
118  if (i)
119  buf.strcat(", ");
120  buf.strcat("( ");
121  buf.append("");
122  { UT_String tmp; tmp = UT_StringWrap(list(i).prim).makeQuotedString('"'); buf.strcat(tmp); }
123  buf.append(", ");
124  buf.appendSprintf("%s", (list(i).closed) ? "true" : "false");
125 
126  buf.strcat(" )");
127  }
128  buf.strcat(" ]");
129 
130  UT_StringHolder result = buf;
131  return result;
132  }
133 
135  {
136  myKeep = false;
137  myRemove = false;
138  mySwitcher = 0;
139  myGroup = ""_sh;
140  myAdd = 0;
141  myInc = 2;
142  myAttrname = ""_sh;
143  myClosedall = false;
144  myAddparticlesystem = false;
145  myParticlegroup = ""_sh;
146  myAppendunusedtoparticlesystem = false;
147 
148  }
149 
150  explicit SOP_AddParms(const SOP_AddParms &) = default;
151 
152  virtual ~SOP_AddParms() {}
153 
154  bool operator==(const SOP_AddParms &src) const
155  {
156  if (myKeep != src.myKeep) return false;
157  if (myPoints != src.myPoints) return false;
158  if (myRemove != src.myRemove) return false;
159  if (myPrims != src.myPrims) return false;
160  if (mySwitcher != src.mySwitcher) return false;
161  if (myGroup != src.myGroup) return false;
162  if (myAdd != src.myAdd) return false;
163  if (myInc != src.myInc) return false;
164  if (myAttrname != src.myAttrname) return false;
165  if (myClosedall != src.myClosedall) return false;
166  if (myAddparticlesystem != src.myAddparticlesystem) return false;
167  if (myParticlegroup != src.myParticlegroup) return false;
168  if (myAppendunusedtoparticlesystem != src.myAppendunusedtoparticlesystem) return false;
169 
170  return true;
171  }
173 
174 
175 
176  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
177  {
178  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
179  OP_Utils::evalOpParm(myKeep, node, "keep", time, 0);
180  else myKeep = false;
181  if (true)
182  {
183  int64 length;
184  OP_Utils::evalOpParm(length, node, "points", time, 0);
185  myPoints.entries(length);
186  for (exint i = 0; i < length; i++)
187  {
188  int parmidx = i+0;
189  auto && _curentry = myPoints(i);
190  (void) _curentry;
191  if (true)
192  OP_Utils::evalOpParmInst(myPoints(i).usept, node, "usept#", &parmidx, time, 0);
193  else myPoints(i).usept = false;
194  if (true && ( (!(((_curentry.usept==0)))) ) )
195  OP_Utils::evalOpParmInst(myPoints(i).pt, node, "pt#", &parmidx, time, 0);
196  else myPoints(i).pt = UT_Vector3D(0,0,0);
197  if (true && ( (!(((_curentry.usept==0)))) ) )
198  OP_Utils::evalOpParmInst(myPoints(i).weight, node, "weight#", &parmidx, time, 0);
199  else myPoints(i).weight = 1;
200 
201  }
202  }
203  else
204  myPoints.clear();
205  if (true)
206  OP_Utils::evalOpParm(myRemove, node, "remove", time, 0);
207  else myRemove = false;
208  if (true)
209  {
210  int64 length;
211  OP_Utils::evalOpParm(length, node, "prims", time, 0);
212  myPrims.entries(length);
213  for (exint i = 0; i < length; i++)
214  {
215  int parmidx = i+0;
216  auto && _curentry = myPrims(i);
217  (void) _curentry;
218  if (true)
219  OP_Utils::evalOpParmInst(myPrims(i).prim, node, "prim#", &parmidx, time, 0);
220  else myPrims(i).prim = ""_sh;
221  if (true)
222  OP_Utils::evalOpParmInst(myPrims(i).closed, node, "closed#", &parmidx, time, 0);
223  else myPrims(i).closed = false;
224 
225  }
226  }
227  else
228  myPrims.clear();
229  if (true)
230  OP_Utils::evalOpParm(mySwitcher, node, "switcher", time, 0);
231  else mySwitcher = 0;
232  if (true)
233  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
234  else myGroup = ""_sh;
235  if (true)
236  OP_Utils::evalOpParm(myAdd, node, "add", time, 0);
237  else myAdd = 0;
238  if (true && ( (!(((int64(getAdd())==0))||((int64(getAdd())==3))||((int64(getAdd())==4)))) ) )
239  OP_Utils::evalOpParm(myInc, node, "inc", time, 0);
240  else myInc = 2;
241  if (true && ( (!(((int64(getAdd())!=4)))) ) )
242  OP_Utils::evalOpParm(myAttrname, node, "attrname", time, 0);
243  else myAttrname = ""_sh;
244  if (true)
245  OP_Utils::evalOpParm(myClosedall, node, "closedall", time, 0);
246  else myClosedall = false;
247  if (true)
248  OP_Utils::evalOpParm(myAddparticlesystem, node, "addparticlesystem", time, 0);
249  else myAddparticlesystem = false;
250  if (true && ( (!(((getAddparticlesystem()==0)))) ) )
251  OP_Utils::evalOpParm(myParticlegroup, node, "particlegroup", time, 0);
252  else myParticlegroup = ""_sh;
253  if (true)
254  OP_Utils::evalOpParm(myAppendunusedtoparticlesystem, node, "appendunusedtoparticlesystem", time, 0);
255  else myAppendunusedtoparticlesystem = false;
256 
257  }
258 
259 
260  virtual void loadFromOpSubclass(const LoadParms &loadparms)
261  {
262  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
263  }
264 
265 
266  virtual void copyFrom(const SOP_NodeParms *src)
267  {
268  *this = *((const SOP_AddParms *)src);
269  }
270 
271  template <typename T>
272  void
273  doGetParmValue(exint idx, T &value) const
274  {
275  switch (idx)
276  {
277  case 0:
278  coerceValue(value, myKeep);
279  break;
280  case 2:
281  coerceValue(value, myRemove);
282  break;
283  case 4:
284  coerceValue(value, mySwitcher);
285  break;
286  case 5:
287  coerceValue(value, myGroup);
288  break;
289  case 6:
290  coerceValue(value, myAdd);
291  break;
292  case 7:
293  coerceValue(value, myInc);
294  break;
295  case 8:
296  coerceValue(value, myAttrname);
297  break;
298  case 9:
299  coerceValue(value, myClosedall);
300  break;
301  case 10:
302  coerceValue(value, myAddparticlesystem);
303  break;
304  case 11:
305  coerceValue(value, myParticlegroup);
306  break;
307  case 12:
308  coerceValue(value, myAppendunusedtoparticlesystem);
309  break;
310 
311  }
312  }
313 
314  void getParmValue(exint idx, exint &value) const
315  { doGetParmValue(idx, value); }
316  void getParmValue(exint idx, fpreal &value) const
317  { doGetParmValue(idx, value); }
319  { doGetParmValue(idx, value); }
321  { doGetParmValue(idx, value); }
323  { doGetParmValue(idx, value); }
325  { doGetParmValue(idx, value); }
327  { doGetParmValue(idx, value); }
329  { doGetParmValue(idx, value); }
331  { doGetParmValue(idx, value); }
333  { doGetParmValue(idx, value); }
335  { doGetParmValue(idx, value); }
336 
337  template <typename T>
338  void
339  doSetParmValue(exint idx, const T &value)
340  {
341  switch (idx)
342  {
343  case 0:
344  coerceValue(myKeep, value);
345  break;
346  case 2:
347  coerceValue(myRemove, value);
348  break;
349  case 4:
350  coerceValue(mySwitcher, value);
351  break;
352  case 5:
353  coerceValue(myGroup, value);
354  break;
355  case 6:
356  coerceValue(myAdd, value);
357  break;
358  case 7:
359  coerceValue(myInc, value);
360  break;
361  case 8:
362  coerceValue(myAttrname, value);
363  break;
364  case 9:
365  coerceValue(myClosedall, value);
366  break;
367  case 10:
368  coerceValue(myAddparticlesystem, value);
369  break;
370  case 11:
371  coerceValue(myParticlegroup, value);
372  break;
373  case 12:
374  coerceValue(myAppendunusedtoparticlesystem, value);
375  break;
376 
377  }
378  }
379 
380  void setParmValue(exint idx, const exint &value)
381  { doSetParmValue(idx, value); }
382  void setParmValue(exint idx, const fpreal &value)
383  { doSetParmValue(idx, value); }
384  void setParmValue(exint idx, const UT_Vector2D &value)
385  { doSetParmValue(idx, value); }
386  void setParmValue(exint idx, const UT_Vector3D &value)
387  { doSetParmValue(idx, value); }
388  void setParmValue(exint idx, const UT_Vector4D &value)
389  { doSetParmValue(idx, value); }
390  void setParmValue(exint idx, const UT_Matrix2D &value)
391  { doSetParmValue(idx, value); }
392  void setParmValue(exint idx, const UT_Matrix3D &value)
393  { doSetParmValue(idx, value); }
394  void setParmValue(exint idx, const UT_Matrix4D &value)
395  { doSetParmValue(idx, value); }
397  { doSetParmValue(idx, value); }
399  { doSetParmValue(idx, value); }
401  { doSetParmValue(idx, value); }
402 
403  virtual exint getNumParms() const
404  {
405  return 13;
406  }
407 
408  virtual const char *getParmName(exint fieldnum) const
409  {
410  switch (fieldnum)
411  {
412  case 0:
413  return "keep";
414  case 1:
415  return "points";
416  case 2:
417  return "remove";
418  case 3:
419  return "prims";
420  case 4:
421  return "switcher";
422  case 5:
423  return "group";
424  case 6:
425  return "add";
426  case 7:
427  return "inc";
428  case 8:
429  return "attrname";
430  case 9:
431  return "closedall";
432  case 10:
433  return "addparticlesystem";
434  case 11:
435  return "particlegroup";
436  case 12:
437  return "appendunusedtoparticlesystem";
438 
439  }
440  return 0;
441  }
442 
443  virtual ParmType getParmType(exint fieldnum) const
444  {
445  switch (fieldnum)
446  {
447  case 0:
448  return PARM_INTEGER;
449  case 2:
450  return PARM_INTEGER;
451  case 4:
452  return PARM_INTEGER;
453  case 5:
454  return PARM_STRING;
455  case 6:
456  return PARM_INTEGER;
457  case 7:
458  return PARM_INTEGER;
459  case 8:
460  return PARM_STRING;
461  case 9:
462  return PARM_INTEGER;
463  case 10:
464  return PARM_INTEGER;
465  case 11:
466  return PARM_STRING;
467  case 12:
468  return PARM_INTEGER;
469 
470  }
471  return PARM_UNSUPPORTED;
472  }
473 
474  // Boiler plate to load individual types.
475  static void loadData(UT_IStream &is, int64 &v)
476  { is.bread(&v, 1); }
477  static void loadData(UT_IStream &is, bool &v)
478  { int64 iv; is.bread(&iv, 1); v = iv; }
479  static void loadData(UT_IStream &is, fpreal64 &v)
480  { is.bread<fpreal64>(&v, 1); }
481  static void loadData(UT_IStream &is, UT_Vector2D &v)
482  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
483  static void loadData(UT_IStream &is, UT_Vector3D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
485  is.bread<fpreal64>(&v.z(), 1); }
486  static void loadData(UT_IStream &is, UT_Vector4D &v)
487  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
488  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
489  static void loadData(UT_IStream &is, UT_Matrix2D &v)
490  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
491  static void loadData(UT_IStream &is, UT_Matrix3D &v)
492  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
493  static void loadData(UT_IStream &is, UT_Matrix4D &v)
494  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
495  static void loadData(UT_IStream &is, UT_Vector2I &v)
496  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector3I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
499  is.bread<int64>(&v.z(), 1); }
500  static void loadData(UT_IStream &is, UT_Vector4I &v)
501  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
502  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
504  { is.bread(v); }
506  { UT_StringHolder rampdata;
507  loadData(is, rampdata);
508  if (rampdata.isstring())
509  {
510  v.reset(new UT_Ramp());
511  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
512  v->load(istr);
513  }
514  else v.reset();
515  }
518  loadData(is, data);
519  if (data.isstring())
520  {
521  // Find the data type.
522  char *colon = UT_StringWrap(data).findChar(':');
523  if (colon)
524  {
525  int typelen = colon - data.buffer();
527  type.strncpy(data.buffer(), typelen);
528  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
529 
530  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
531  }
532  }
533  else v.reset();
534  }
535 
536  static void saveData(std::ostream &os, int64 v)
537  { UTwrite(os, &v); }
538  static void saveData(std::ostream &os, bool v)
539  { int64 iv = v; UTwrite(os, &iv); }
540  static void saveData(std::ostream &os, fpreal64 v)
541  { UTwrite<fpreal64>(os, &v); }
542  static void saveData(std::ostream &os, UT_Vector2D v)
543  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
544  static void saveData(std::ostream &os, UT_Vector3D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
546  UTwrite<fpreal64>(os, &v.z()); }
547  static void saveData(std::ostream &os, UT_Vector4D v)
548  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
549  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
550  static void saveData(std::ostream &os, UT_Matrix2D v)
552  static void saveData(std::ostream &os, UT_Matrix3D v)
554  static void saveData(std::ostream &os, UT_Matrix4D v)
556  static void saveData(std::ostream &os, UT_StringHolder s)
557  { UT_StringWrap(s).saveBinary(os); }
558  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
559  { UT_StringHolder result;
560  UT_OStringStream ostr;
561  if (s) s->save(ostr);
562  result = ostr.str();
563  saveData(os, result);
564  }
565  static void saveData(std::ostream &os, PRM_DataItemHandle s)
566  { UT_StringHolder result;
567  UT_OStringStream ostr;
568  if (s)
569  {
570  ostr << s->getDataTypeToken();
571  ostr << ":";
572  s->saveBinary(ostr);
573  }
574  result = ostr.str();
575  saveData(os, result);
576  }
577 
578 
579  void save(std::ostream &os) const
580  {
581  int32 v = version();
582  UTwrite(os, &v);
583  saveData(os, myKeep);
584  {
585  int64 length = myPoints.entries();
586  UTwrite(os, &length);
587  for (exint i = 0; i < length; i++)
588  {
589  saveData(os, myPoints(i).usept);
590  saveData(os, myPoints(i).pt);
591  saveData(os, myPoints(i).weight);
592 
593  }
594  }
595  saveData(os, myRemove);
596  {
597  int64 length = myPrims.entries();
598  UTwrite(os, &length);
599  for (exint i = 0; i < length; i++)
600  {
601  saveData(os, myPrims(i).prim);
602  saveData(os, myPrims(i).closed);
603 
604  }
605  }
606  saveData(os, mySwitcher);
607  saveData(os, myGroup);
608  saveData(os, myAdd);
609  saveData(os, myInc);
610  saveData(os, myAttrname);
611  saveData(os, myClosedall);
612  saveData(os, myAddparticlesystem);
613  saveData(os, myParticlegroup);
614  saveData(os, myAppendunusedtoparticlesystem);
615 
616  }
617 
618  bool load(UT_IStream &is)
619  {
620  int32 v;
621  is.bread(&v, 1);
622  if (version() != v)
623  {
624  // Fail incompatible versions
625  return false;
626  }
627  loadData(is, myKeep);
628  {
629  int64 length;
630  is.read(&length, 1);
631  myPoints.entries(length);
632  for (exint i = 0; i < length; i++)
633  {
634  loadData(is, myPoints(i).usept);
635  loadData(is, myPoints(i).pt);
636  loadData(is, myPoints(i).weight);
637 
638  }
639  }
640  loadData(is, myRemove);
641  {
642  int64 length;
643  is.read(&length, 1);
644  myPrims.entries(length);
645  for (exint i = 0; i < length; i++)
646  {
647  loadData(is, myPrims(i).prim);
648  loadData(is, myPrims(i).closed);
649 
650  }
651  }
652  loadData(is, mySwitcher);
653  loadData(is, myGroup);
654  loadData(is, myAdd);
655  loadData(is, myInc);
656  loadData(is, myAttrname);
657  loadData(is, myClosedall);
658  loadData(is, myAddparticlesystem);
659  loadData(is, myParticlegroup);
660  loadData(is, myAppendunusedtoparticlesystem);
661 
662  return true;
663  }
664 
665  bool getKeep() const { return myKeep; }
666  void setKeep(bool val) { myKeep = val; }
667  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getKeep();
671  bool result;
672  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
673  return result;
674  }
675  const UT_Array<Points> &getPoints() const { return myPoints; }
676  void setPoints(const UT_Array<Points> &val) { myPoints = val; }
677  exint opPoints(const SOP_NodeVerb::CookParms &cookparms) const
678  {
679  SOP_Node *thissop = cookparms.getNode();
680  if (!thissop) return getPoints().entries();
681  exint result;
682  OP_Utils::evalOpParm(result, thissop, "points", cookparms.getCookTime(), 0);
683  return result;
684  }
685  bool opPoints_usept(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return (myPoints(_idx).usept);
689  int _parmidx = _idx + 0;
690  bool result;
691  OP_Utils::evalOpParmInst(result, thissop, "usept#", &_parmidx, cookparms.getCookTime(), 0);
692  return (result);
693  }
694  UT_Vector3D opPoints_pt(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return (myPoints(_idx).pt);
698  int _parmidx = _idx + 0;
699  UT_Vector3D result;
700  OP_Utils::evalOpParmInst(result, thissop, "pt#", &_parmidx, cookparms.getCookTime(), 0);
701  return (result);
702  }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return (myPoints(_idx).weight);
707  int _parmidx = _idx + 0;
708  fpreal64 result;
709  OP_Utils::evalOpParmInst(result, thissop, "weight#", &_parmidx, cookparms.getCookTime(), 0);
710  return (result);
711  }
712 
713  bool getRemove() const { return myRemove; }
714  void setRemove(bool val) { myRemove = val; }
715  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getRemove();
719  bool result;
720  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
721  return result;
722  }
723  const UT_Array<Prims> &getPrims() const { return myPrims; }
724  void setPrims(const UT_Array<Prims> &val) { myPrims = val; }
725  exint opPrims(const SOP_NodeVerb::CookParms &cookparms) const
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getPrims().entries();
729  exint result;
730  OP_Utils::evalOpParm(result, thissop, "prims", cookparms.getCookTime(), 0);
731  return result;
732  }
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return (myPrims(_idx).prim);
737  int _parmidx = _idx + 0;
738  UT_StringHolder result;
739  OP_Utils::evalOpParmInst(result, thissop, "prim#", &_parmidx, cookparms.getCookTime(), 0);
740  return (result);
741  }
742  bool opPrims_closed(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return (myPrims(_idx).closed);
746  int _parmidx = _idx + 0;
747  bool result;
748  OP_Utils::evalOpParmInst(result, thissop, "closed#", &_parmidx, cookparms.getCookTime(), 0);
749  return (result);
750  }
751 
752  int64 getSwitcher() const { return mySwitcher; }
753  void setSwitcher(int64 val) { mySwitcher = val; }
754  int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getSwitcher();
758  int64 result;
759  OP_Utils::evalOpParm(result, thissop, "switcher", cookparms.getCookTime(), 0);
760  return result;
761  }
762  const UT_StringHolder & getGroup() const { return myGroup; }
763  void setGroup(const UT_StringHolder & val) { myGroup = val; }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getGroup();
768  UT_StringHolder result;
769  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
770  return result;
771  }
772  Add getAdd() const { return Add(myAdd); }
773  void setAdd(Add val) { myAdd = int64(val); }
774  Add opAdd(const SOP_NodeVerb::CookParms &cookparms) const
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getAdd();
778  int64 result;
779  OP_Utils::evalOpParm(result, thissop, "add", cookparms.getCookTime(), 0);
780  return Add(result);
781  }
782  int64 getInc() const { return myInc; }
783  void setInc(int64 val) { myInc = val; }
784  int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getInc();
788  int64 result;
789  OP_Utils::evalOpParm(result, thissop, "inc", cookparms.getCookTime(), 0);
790  return result;
791  }
792  const UT_StringHolder & getAttrname() const { return myAttrname; }
793  void setAttrname(const UT_StringHolder & val) { myAttrname = val; }
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getAttrname();
798  UT_StringHolder result;
799  OP_Utils::evalOpParm(result, thissop, "attrname", cookparms.getCookTime(), 0);
800  return result;
801  }
802  bool getClosedall() const { return myClosedall; }
803  void setClosedall(bool val) { myClosedall = val; }
804  bool opClosedall(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getClosedall();
808  bool result;
809  OP_Utils::evalOpParm(result, thissop, "closedall", cookparms.getCookTime(), 0);
810  return result;
811  }
812  bool getAddparticlesystem() const { return myAddparticlesystem; }
813  void setAddparticlesystem(bool val) { myAddparticlesystem = val; }
814  bool opAddparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getAddparticlesystem();
818  bool result;
819  OP_Utils::evalOpParm(result, thissop, "addparticlesystem", cookparms.getCookTime(), 0);
820  return result;
821  }
822  const UT_StringHolder & getParticlegroup() const { return myParticlegroup; }
823  void setParticlegroup(const UT_StringHolder & val) { myParticlegroup = val; }
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getParticlegroup();
828  UT_StringHolder result;
829  OP_Utils::evalOpParm(result, thissop, "particlegroup", cookparms.getCookTime(), 0);
830  return result;
831  }
832  bool getAppendunusedtoparticlesystem() const { return myAppendunusedtoparticlesystem; }
833  void setAppendunusedtoparticlesystem(bool val) { myAppendunusedtoparticlesystem = val; }
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getAppendunusedtoparticlesystem();
838  bool result;
839  OP_Utils::evalOpParm(result, thissop, "appendunusedtoparticlesystem", cookparms.getCookTime(), 0);
840  return result;
841  }
842 
843 private:
844  bool myKeep;
845  UT_Array<Points> myPoints;
846  bool myRemove;
847  UT_Array<Prims> myPrims;
848  int64 mySwitcher;
849  UT_StringHolder myGroup;
850  int64 myAdd;
851  int64 myInc;
852  UT_StringHolder myAttrname;
853  bool myClosedall;
854  bool myAddparticlesystem;
855  UT_StringHolder myParticlegroup;
856  bool myAppendunusedtoparticlesystem;
857 
858 };
const UT_StringHolder & getGroup() const
bool operator==(const SOP_AddParms &src) const
bool opClosedall(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Prims &src) const
Add getAdd() const
const UT_StringHolder & getParticlegroup() const
fpreal64 opPoints_weight(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Matrix3D v)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
T & z(void)
Definition: UT_Vector4.h:372
const UT_StringHolder & getAttrname() const
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder prim
Definition: SOP_Add.proto.h:90
void getParmValue(exint idx, UT_StringHolder &value) const
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint bread(int32 *buffer, exint asize=1)
bool opPoints_usept(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, UT_Vector4I &v)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void setSwitcher(int64 val)
void setClosedall(bool val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
T & x(void)
Definition: UT_Vector2.h:284
void setPrims(const UT_Array< Prims > &val)
An output stream object that owns its own string buffer storage.
virtual ~SOP_AddParms()
static void saveData(std::ostream &os, UT_Vector4D v)
bool getRemove() const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
virtual exint getNumParms() const
void setAdd(Add val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setParticlegroup(const UT_StringHolder &val)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
UT_StringHolder createString(const UT_Array< Prims > &list) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
png_uint_32 i
Definition: png.h:2877
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getParmValue(exint idx, UT_Matrix4D &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
static void loadData(UT_IStream &is, int64 &v)
long long int64
Definition: SYS_Types.h:106
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void setParmValue(exint idx, const UT_Matrix2D &value)
virtual const char * getParmName(exint fieldnum) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setParmValue(exint idx, const exint &value)
void append(char character)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE const char * buffer() const
bool operator==(const Points &src) const
Definition: SOP_Add.proto.h:53
void getParmValue(exint idx, UT_Vector4D &value) const
int64 exint
Definition: SYS_Types.h:115
bool getAppendunusedtoparticlesystem() const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:191
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:280
bool opAddparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector3D &value)
exint opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const fpreal &value)
OP_Node * getInput(unsigned idx, bool mark_used=false) const
Returns the node connected to a particular input (may be null).
bool getKeep() const
exint opPrims(const SOP_NodeVerb::CookParms &cookparms) const
bool getAddparticlesystem() const
UT_Vector3T< fpreal64 > UT_Vector3D
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doSetParmValue(exint idx, const T &value)
GLboolean * data
Definition: glcorearb.h:130
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:34
T & y(void)
Definition: UT_Vector4.h:370
int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Vector3D v)
void getParmValue(exint idx, UT_Vector2D &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void loadData(UT_IStream &is, fpreal64 &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
void setParmValue(exint idx, const UT_Vector4D &value)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:446
void setParmValue(exint idx, const UT_Matrix3D &value)
void getParmValue(exint idx, fpreal &value) const
void setInc(int64 val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:269
void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, bool v)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
bool load(UT_IStream &is)
UT_StringHolder opAttrname(const SOP_NodeVerb::CookParms &cookparms) const
int64 getSwitcher() const
bool opPrims_closed(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix3D &value) const
void setParmValue(exint idx, const UT_Vector2D &value)
void setAppendunusedtoparticlesystem(bool val)
virtual ParmType getParmType(exint fieldnum) const
void setGroup(const UT_StringHolder &val)
Add opAdd(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
bool getClosedall() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, int64 v)
const UT_Array< Points > & getPoints() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
int64 getInc() const
#define SOP_API
Definition: SOP_API.h:10
static int version()
Definition: SOP_Add.proto.h:37
const UT_Array< Prims > & getPrims() const
const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
void setPoints(const UT_Array< Points > &val)
void setParmValue(exint idx, const UT_StringHolder &value)
T & x(void)
Definition: UT_Vector4.h:368
void setAttrname(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Vector3D &value) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
T & y(void)
Definition: UT_Vector2.h:286
void setAddparticlesystem(bool val)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLboolean r
Definition: glcorearb.h:1221
void strcat(const char *src)
T & w(void)
Definition: UT_Vector4.h:374
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opParticlegroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPrims_prim(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void save(std::ostream &os) const
bool opAppendunusedtoparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE bool isstring() const
UT_Vector3D opPoints_pt(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setParmValue(exint idx, const UT_Matrix4D &value)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
virtual void copyFrom(const SOP_NodeParms *src)
void setKeep(bool val)
GLenum src
Definition: glcorearb.h:1792
UT_StringHolder createString(const UT_Array< Points > &list) const
Definition: SOP_Add.proto.h:64
void setRemove(bool val)