HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_AddEnums
24 {
25  enum class Add
26  {
27  ALL = 0,
28  GROUP,
29  SKIP,
30  SEP,
31  ATTRIBUTE
32  };
33 
35  getToken(Add enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Add::ALL: return "all"_sh;
40  case Add::GROUP: return "group"_sh;
41  case Add::SKIP: return "skip"_sh;
42  case Add::SEP: return "sep"_sh;
43  case Add::ATTRIBUTE: return "attribute"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48 }
49 
50 
52 {
53 public:
54  static int version() { return 1; }
55  struct Points
56  {
57  bool usept;
60 
61 
63  {
64  usept = true;
65  pt = UT_Vector3D(0,0,0);
66  weight = 1;
67 
68  }
69 
70  bool operator==(const Points &src) const
71  {
72  if (usept != src.usept) return false;
73  if (pt != src.pt) return false;
74  if (weight != src.weight) return false;
75 
76  return true;
77  }
78  bool operator!=(const Points &src) const
79  {
80  return !operator==(src);
81  }
82 
83  };
84 
86  {
88 
89  buf.strcat("[ ");
90  for (int i = 0; i < list.entries(); i++)
91  {
92  if (i)
93  buf.strcat(", ");
94  buf.strcat("( ");
95  buf.append("");
96  buf.appendSprintf("%s", (list(i).usept) ? "true" : "false");
97  buf.append(", ");
98  buf.appendSprintf("(%f, %f, %f)", list(i).pt.x(), list(i).pt.y(), list(i).pt.z());
99  buf.append(", ");
100  buf.appendSprintf("%f", (list(i).weight));
101 
102  buf.strcat(" )");
103  }
104  buf.strcat(" ]");
105 
107  return result;
108  }
109  struct Prims
110  {
112  bool closed;
113 
114 
116  {
117  prim = ""_UTsh;
118  closed = false;
119 
120  }
121 
122  bool operator==(const Prims &src) const
123  {
124  if (prim != src.prim) return false;
125  if (closed != src.closed) return false;
126 
127  return true;
128  }
129  bool operator!=(const Prims &src) const
130  {
131  return !operator==(src);
132  }
133 
134  };
135 
137  {
139 
140  buf.strcat("[ ");
141  for (int i = 0; i < list.entries(); i++)
142  {
143  if (i)
144  buf.strcat(", ");
145  buf.strcat("( ");
146  buf.append("");
147  { UT_String tmp; tmp = UT_StringWrap(list(i).prim).makeQuotedString('"'); buf.strcat(tmp); }
148  buf.append(", ");
149  buf.appendSprintf("%s", (list(i).closed) ? "true" : "false");
150 
151  buf.strcat(" )");
152  }
153  buf.strcat(" ]");
154 
156  return result;
157  }
158 
160  {
161  myKeep = false;
162  myPoints.setSize(0);
163  myRemove = false;
164  myPrims.setSize(1);
165  mySwitcher = 0;
166  myGroup = ""_UTsh;
167  myAdd = 0;
168  myInc = 2;
169  myAttrname = ""_UTsh;
170  myClosedall = false;
171  myAddparticlesystem = false;
172  myParticlegroup = ""_UTsh;
173  myAppendunusedtoparticlesystem = false;
174 
175  }
176 
177  explicit SOP_AddParms(const SOP_AddParms &) = default;
178  SOP_AddParms &operator=(const SOP_AddParms &) = default;
179  SOP_AddParms(SOP_AddParms &&) noexcept = default;
180  SOP_AddParms &operator=(SOP_AddParms &&) noexcept = default;
181 
182  ~SOP_AddParms() override {}
183 
184  bool operator==(const SOP_AddParms &src) const
185  {
186  if (myKeep != src.myKeep) return false;
187  if (myPoints != src.myPoints) return false;
188  if (myRemove != src.myRemove) return false;
189  if (myPrims != src.myPrims) return false;
190  if (mySwitcher != src.mySwitcher) return false;
191  if (myGroup != src.myGroup) return false;
192  if (myAdd != src.myAdd) return false;
193  if (myInc != src.myInc) return false;
194  if (myAttrname != src.myAttrname) return false;
195  if (myClosedall != src.myClosedall) return false;
196  if (myAddparticlesystem != src.myAddparticlesystem) return false;
197  if (myParticlegroup != src.myParticlegroup) return false;
198  if (myAppendunusedtoparticlesystem != src.myAppendunusedtoparticlesystem) return false;
199 
200 
201  if (baseGetSignature() != src.baseGetSignature()) return false;
202 
203  return true;
204  }
205  bool operator!=(const SOP_AddParms &src) const
206  {
207  return !operator==(src);
208  }
210 
211 
212 
213  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
214  {
215  myKeep = false;
216  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0)))) ) )
217  graph->evalOpParm(myKeep, nodeidx, "keep", time, graph->isDirect()?nullptr:depnode);
218  if (true)
219  {
220  int64 length = 0;
221  graph->evalOpParm(length, nodeidx, "points", time, graph->isDirect()?nullptr:depnode);
222  if (length < 0) length = 0;
223  myPoints.setSize(length);
224  for (exint i = 0; i < length; i++)
225  {
226  int parmidx[1];
227  int offsets[1];
228  parmidx[0] = i+0;
229  offsets[0] = 0;
230  auto && _curentry = myPoints(i);
231  (void) _curentry;
232  _curentry.usept = true;
233  if (true)
234  graph->evalOpParmInst(_curentry.usept, nodeidx, "usept#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
235  _curentry.pt = UT_Vector3D(0,0,0);
236  if (true && ( (true&&!(((_curentry.usept==0)))) ) )
237  graph->evalOpParmInst(_curentry.pt, nodeidx, "pt#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
238  _curentry.weight = 1;
239  if (true && ( (true&&!(((_curentry.usept==0)))) ) )
240  graph->evalOpParmInst(_curentry.weight, nodeidx, "weight#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
241 
242  }
243  }
244  else
245  myPoints.clear();
246  myRemove = false;
247  if (true)
248  graph->evalOpParm(myRemove, nodeidx, "remove", time, graph->isDirect()?nullptr:depnode);
249  if (true)
250  {
251  int64 length = 0;
252  graph->evalOpParm(length, nodeidx, "prims", time, graph->isDirect()?nullptr:depnode);
253  if (length < 0) length = 0;
254  myPrims.setSize(length);
255  for (exint i = 0; i < length; i++)
256  {
257  int parmidx[1];
258  int offsets[1];
259  parmidx[0] = i+0;
260  offsets[0] = 0;
261  auto && _curentry = myPrims(i);
262  (void) _curentry;
263  _curentry.prim = ""_UTsh;
264  if (true)
265  graph->evalOpParmInst(_curentry.prim, nodeidx, "prim#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
266  _curentry.closed = false;
267  if (true)
268  graph->evalOpParmInst(_curentry.closed, nodeidx, "closed#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
269 
270  }
271  }
272  else
273  myPrims.clear();
274  mySwitcher = 0;
275  if (true)
276  graph->evalOpParm(mySwitcher, nodeidx, "switcher", time, graph->isDirect()?nullptr:depnode);
277  myGroup = ""_UTsh;
278  if (true)
279  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
280  myAdd = 0;
281  if (true)
282  graph->evalOpParm(myAdd, nodeidx, "add", time, graph->isDirect()?nullptr:depnode);
283  myInc = 2;
284  if (true && ( (true&&!(((int64(getAdd())==0))||((int64(getAdd())==3))||((int64(getAdd())==4)))) ) )
285  graph->evalOpParm(myInc, nodeidx, "inc", time, graph->isDirect()?nullptr:depnode);
286  myAttrname = ""_UTsh;
287  if (true && ( (true&&!(((int64(getAdd())!=4)))) ) )
288  graph->evalOpParm(myAttrname, nodeidx, "attrname", time, graph->isDirect()?nullptr:depnode);
289  myClosedall = false;
290  if (true)
291  graph->evalOpParm(myClosedall, nodeidx, "closedall", time, graph->isDirect()?nullptr:depnode);
292  myAddparticlesystem = false;
293  if (true)
294  graph->evalOpParm(myAddparticlesystem, nodeidx, "addparticlesystem", time, graph->isDirect()?nullptr:depnode);
295  myParticlegroup = ""_UTsh;
296  if (true && ( (true&&!(((getAddparticlesystem()==0)))) ) )
297  graph->evalOpParm(myParticlegroup, nodeidx, "particlegroup", time, graph->isDirect()?nullptr:depnode);
298  myAppendunusedtoparticlesystem = false;
299  if (true)
300  graph->evalOpParm(myAppendunusedtoparticlesystem, nodeidx, "appendunusedtoparticlesystem", time, graph->isDirect()?nullptr:depnode);
301 
302  }
303 
304 
305  void loadFromOpSubclass(const LoadParms &loadparms) override
306  {
307  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
308  }
309 
310 
311  void copyFrom(const OP_NodeParms *src) override
312  {
313  *this = *((const SOP_AddParms *)src);
314  }
315 
316  template <typename T>
317  void
318  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
319  {
320  if (idx.size() < 1)
321  return;
322  UT_ASSERT(idx.size() == instance.size()+1);
323  if (idx.size() != instance.size()+1)
324  return;
325  switch (idx[0])
326  {
327  case 0:
328  coerceValue(value, myKeep);
329  break;
330  case 1:
331  if (idx.size() == 1)
332  coerceValue(value, myPoints.entries());
333  else if (instance[0] < myPoints.entries())
334  {
335  auto && _data = myPoints(instance[0]);
336  switch (idx[1])
337  {
338  case 0:
339  coerceValue(value, _data.usept);
340  break;
341  case 1:
342  coerceValue(value, _data.pt);
343  break;
344  case 2:
345  coerceValue(value, _data.weight);
346  break;
347 
348  }
349  }
350  break;
351  case 2:
352  coerceValue(value, myRemove);
353  break;
354  case 3:
355  if (idx.size() == 1)
356  coerceValue(value, myPrims.entries());
357  else if (instance[0] < myPrims.entries())
358  {
359  auto && _data = myPrims(instance[0]);
360  switch (idx[1])
361  {
362  case 0:
363  coerceValue(value, _data.prim);
364  break;
365  case 1:
366  coerceValue(value, _data.closed);
367  break;
368 
369  }
370  }
371  break;
372  case 4:
373  coerceValue(value, mySwitcher);
374  break;
375  case 5:
376  coerceValue(value, myGroup);
377  break;
378  case 6:
379  coerceValue(value, myAdd);
380  break;
381  case 7:
382  coerceValue(value, myInc);
383  break;
384  case 8:
385  coerceValue(value, myAttrname);
386  break;
387  case 9:
388  coerceValue(value, myClosedall);
389  break;
390  case 10:
391  coerceValue(value, myAddparticlesystem);
392  break;
393  case 11:
394  coerceValue(value, myParticlegroup);
395  break;
396  case 12:
397  coerceValue(value, myAppendunusedtoparticlesystem);
398  break;
399 
400  }
401  }
402 
403  bool isParmColorRamp(exint idx) const override
404  {
405  switch (idx)
406  {
407 
408  }
409  return false;
410  }
411 
412  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
413  { doGetParmValue(idx, instance, value); }
414  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
415  { doGetParmValue(idx, instance, value); }
416  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
417  { doGetParmValue(idx, instance, value); }
418  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
419  { doGetParmValue(idx, instance, value); }
420  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
421  { doGetParmValue(idx, instance, value); }
422  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
423  { doGetParmValue(idx, instance, value); }
424  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
425  { doGetParmValue(idx, instance, value); }
426  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
427  { doGetParmValue(idx, instance, value); }
428  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
429  { doGetParmValue(idx, instance, value); }
430  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
431  { doGetParmValue(idx, instance, value); }
432  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
433  { doGetParmValue(idx, instance, value); }
434 
435  template <typename T>
436  void
437  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
438  {
439  if (idx.size() < 1)
440  return;
441  UT_ASSERT(idx.size() == instance.size()+1);
442  if (idx.size() != instance.size()+1)
443  return;
444  switch (idx[0])
445  {
446  case 0:
447  coerceValue(myKeep, ( ( value ) ));
448  break;
449  case 1:
450  if (idx.size() == 1)
451  {
452  exint newsize;
453  coerceValue(newsize, value);
454  if (newsize < 0) newsize = 0;
455  myPoints.setSize(newsize);
456  }
457  else
458  {
459  if (instance[0] < 0)
460  return;
461  myPoints.setSizeIfNeeded(instance[0]+1);
462  auto && _data = myPoints(instance[0]);
463  switch (idx[1])
464  {
465  case 0:
466  coerceValue(_data.usept, value);
467  break;
468  case 1:
469  coerceValue(_data.pt, value);
470  break;
471  case 2:
472  coerceValue(_data.weight, value);
473  break;
474 
475  }
476  }
477  break;
478  case 2:
479  coerceValue(myRemove, ( ( value ) ));
480  break;
481  case 3:
482  if (idx.size() == 1)
483  {
484  exint newsize;
485  coerceValue(newsize, value);
486  if (newsize < 0) newsize = 0;
487  myPrims.setSize(newsize);
488  }
489  else
490  {
491  if (instance[0] < 0)
492  return;
493  myPrims.setSizeIfNeeded(instance[0]+1);
494  auto && _data = myPrims(instance[0]);
495  switch (idx[1])
496  {
497  case 0:
498  coerceValue(_data.prim, value);
499  break;
500  case 1:
501  coerceValue(_data.closed, value);
502  break;
503 
504  }
505  }
506  break;
507  case 4:
508  coerceValue(mySwitcher, ( ( value ) ));
509  break;
510  case 5:
511  coerceValue(myGroup, ( ( value ) ));
512  break;
513  case 6:
514  coerceValue(myAdd, clampMinValue(0, clampMaxValue(4, value ) ));
515  break;
516  case 7:
517  coerceValue(myInc, clampMinValue(1, ( value ) ));
518  break;
519  case 8:
520  coerceValue(myAttrname, ( ( value ) ));
521  break;
522  case 9:
523  coerceValue(myClosedall, ( ( value ) ));
524  break;
525  case 10:
526  coerceValue(myAddparticlesystem, ( ( value ) ));
527  break;
528  case 11:
529  coerceValue(myParticlegroup, ( ( value ) ));
530  break;
531  case 12:
532  coerceValue(myAppendunusedtoparticlesystem, ( ( value ) ));
533  break;
534 
535  }
536  }
537 
538  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
539  { doSetParmValue(idx, instance, value); }
540  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
541  { doSetParmValue(idx, instance, value); }
542  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
543  { doSetParmValue(idx, instance, value); }
544  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
545  { doSetParmValue(idx, instance, value); }
546  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
547  { doSetParmValue(idx, instance, value); }
548  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
549  { doSetParmValue(idx, instance, value); }
550  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
551  { doSetParmValue(idx, instance, value); }
552  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
553  { doSetParmValue(idx, instance, value); }
554  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
555  { doSetParmValue(idx, instance, value); }
556  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
557  { doSetParmValue(idx, instance, value); }
558  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
559  { doSetParmValue(idx, instance, value); }
560 
561  exint getNestNumParms(TempIndex idx) const override
562  {
563  if (idx.size() == 0)
564  return 13;
565  switch (idx[0])
566  {
567  case 1:
568  return 3;
569  case 3:
570  return 2;
571 
572  }
573  // Invalid
574  return 0;
575  }
576 
577  const char *getNestParmName(TempIndex fieldnum) const override
578  {
579  if (fieldnum.size() < 1)
580  return 0;
581  switch (fieldnum[0])
582  {
583  case 0:
584  return "keep";
585  case 1:
586  if (fieldnum.size() == 1)
587  return "points";
588  switch (fieldnum[1])
589  {
590  case 0:
591  return "usept#";
592  case 1:
593  return "pt#";
594  case 2:
595  return "weight#";
596 
597  }
598  return 0;
599  case 2:
600  return "remove";
601  case 3:
602  if (fieldnum.size() == 1)
603  return "prims";
604  switch (fieldnum[1])
605  {
606  case 0:
607  return "prim#";
608  case 1:
609  return "closed#";
610 
611  }
612  return 0;
613  case 4:
614  return "switcher";
615  case 5:
616  return "group";
617  case 6:
618  return "add";
619  case 7:
620  return "inc";
621  case 8:
622  return "attrname";
623  case 9:
624  return "closedall";
625  case 10:
626  return "addparticlesystem";
627  case 11:
628  return "particlegroup";
629  case 12:
630  return "appendunusedtoparticlesystem";
631 
632  }
633  return 0;
634  }
635 
636  ParmType getNestParmType(TempIndex fieldnum) const override
637  {
638  if (fieldnum.size() < 1)
639  return PARM_UNSUPPORTED;
640  switch (fieldnum[0])
641  {
642  case 0:
643  return PARM_INTEGER;
644  case 1:
645  if (fieldnum.size() == 1)
646  return PARM_MULTIPARM;
647  switch (fieldnum[1])
648  {
649  case 0:
650  return PARM_INTEGER;
651  case 1:
652  return PARM_VECTOR3;
653  case 2:
654  return PARM_FLOAT;
655 
656  }
657  return PARM_UNSUPPORTED;
658  case 2:
659  return PARM_INTEGER;
660  case 3:
661  if (fieldnum.size() == 1)
662  return PARM_MULTIPARM;
663  switch (fieldnum[1])
664  {
665  case 0:
666  return PARM_STRING;
667  case 1:
668  return PARM_INTEGER;
669 
670  }
671  return PARM_UNSUPPORTED;
672  case 4:
673  return PARM_INTEGER;
674  case 5:
675  return PARM_STRING;
676  case 6:
677  return PARM_INTEGER;
678  case 7:
679  return PARM_INTEGER;
680  case 8:
681  return PARM_STRING;
682  case 9:
683  return PARM_INTEGER;
684  case 10:
685  return PARM_INTEGER;
686  case 11:
687  return PARM_STRING;
688  case 12:
689  return PARM_INTEGER;
690 
691  }
692  return PARM_UNSUPPORTED;
693  }
694 
695  // Boiler plate to load individual types.
696  static void loadData(UT_IStream &is, int64 &v)
697  { is.bread(&v, 1); }
698  static void loadData(UT_IStream &is, bool &v)
699  { int64 iv; is.bread(&iv, 1); v = iv; }
700  static void loadData(UT_IStream &is, fpreal64 &v)
701  { is.bread<fpreal64>(&v, 1); }
702  static void loadData(UT_IStream &is, UT_Vector2D &v)
703  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
704  static void loadData(UT_IStream &is, UT_Vector3D &v)
705  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
706  is.bread<fpreal64>(&v.z(), 1); }
707  static void loadData(UT_IStream &is, UT_Vector4D &v)
708  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
709  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
710  static void loadData(UT_IStream &is, UT_Matrix2D &v)
711  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
712  static void loadData(UT_IStream &is, UT_Matrix3D &v)
713  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
714  static void loadData(UT_IStream &is, UT_Matrix4D &v)
715  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
716  static void loadData(UT_IStream &is, UT_Vector2I &v)
717  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
718  static void loadData(UT_IStream &is, UT_Vector3I &v)
719  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
720  is.bread<int64>(&v.z(), 1); }
721  static void loadData(UT_IStream &is, UT_Vector4I &v)
722  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
723  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
725  { is.bread(v); }
727  { UT_StringHolder rampdata;
728  loadData(is, rampdata);
729  if (rampdata.isstring())
730  {
731  v.reset(new UT_Ramp());
732  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
733  v->load(istr);
734  }
735  else v.reset();
736  }
739  loadData(is, data);
740  if (data.isstring())
741  {
742  // Find the data type.
743  const char *colon = UT_StringWrap(data).findChar(':');
744  if (colon)
745  {
746  int typelen = colon - data.buffer();
748  type.strncpy(data.buffer(), typelen);
749  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
750 
751  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
752  }
753  }
754  else v.reset();
755  }
756 
757  static void saveData(std::ostream &os, int64 v)
758  { UTwrite(os, &v); }
759  static void saveData(std::ostream &os, bool v)
760  { int64 iv = v; UTwrite(os, &iv); }
761  static void saveData(std::ostream &os, fpreal64 v)
762  { UTwrite<fpreal64>(os, &v); }
763  static void saveData(std::ostream &os, UT_Vector2D v)
764  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
765  static void saveData(std::ostream &os, UT_Vector3D v)
766  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
767  UTwrite<fpreal64>(os, &v.z()); }
768  static void saveData(std::ostream &os, UT_Vector4D v)
769  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
770  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
771  static void saveData(std::ostream &os, UT_Matrix2D v)
773  static void saveData(std::ostream &os, UT_Matrix3D v)
775  static void saveData(std::ostream &os, UT_Matrix4D v)
777  static void saveData(std::ostream &os, UT_StringHolder s)
778  { UT_StringWrap(s).saveBinary(os); }
779  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
781  UT_OStringStream ostr;
782  if (s) s->save(ostr);
783  result = ostr.str();
784  saveData(os, result);
785  }
786  static void saveData(std::ostream &os, PRM_DataItemHandle s)
788  UT_OStringStream ostr;
789  if (s)
790  {
791  ostr << s->getDataTypeToken();
792  ostr << ":";
793  s->saveBinary(ostr);
794  }
795  result = ostr.str();
796  saveData(os, result);
797  }
798 
799 
800  void save(std::ostream &os) const
801  {
802  int32 v = version();
803  UTwrite(os, &v);
804  saveData(os, myKeep);
805  {
806  int64 length = myPoints.entries();
807  UTwrite(os, &length);
808  for (exint i = 0; i < length; i++)
809  {
810  auto && _curentry = myPoints(i);
811  (void) _curentry;
812  saveData(os, _curentry.usept);
813  saveData(os, _curentry.pt);
814  saveData(os, _curentry.weight);
815 
816  }
817  }
818  saveData(os, myRemove);
819  {
820  int64 length = myPrims.entries();
821  UTwrite(os, &length);
822  for (exint i = 0; i < length; i++)
823  {
824  auto && _curentry = myPrims(i);
825  (void) _curentry;
826  saveData(os, _curentry.prim);
827  saveData(os, _curentry.closed);
828 
829  }
830  }
831  saveData(os, mySwitcher);
832  saveData(os, myGroup);
833  saveData(os, myAdd);
834  saveData(os, myInc);
835  saveData(os, myAttrname);
836  saveData(os, myClosedall);
837  saveData(os, myAddparticlesystem);
838  saveData(os, myParticlegroup);
839  saveData(os, myAppendunusedtoparticlesystem);
840 
841  }
842 
843  bool load(UT_IStream &is)
844  {
845  int32 v;
846  is.bread(&v, 1);
847  if (version() != v)
848  {
849  // Fail incompatible versions
850  return false;
851  }
852  loadData(is, myKeep);
853  {
854  int64 length;
855  is.read(&length, 1);
856  myPoints.setSize(length);
857  for (exint i = 0; i < length; i++)
858  {
859  auto && _curentry = myPoints(i);
860  (void) _curentry;
861  loadData(is, _curentry.usept);
862  loadData(is, _curentry.pt);
863  loadData(is, _curentry.weight);
864 
865  }
866  }
867  loadData(is, myRemove);
868  {
869  int64 length;
870  is.read(&length, 1);
871  myPrims.setSize(length);
872  for (exint i = 0; i < length; i++)
873  {
874  auto && _curentry = myPrims(i);
875  (void) _curentry;
876  loadData(is, _curentry.prim);
877  loadData(is, _curentry.closed);
878 
879  }
880  }
881  loadData(is, mySwitcher);
882  loadData(is, myGroup);
883  loadData(is, myAdd);
884  loadData(is, myInc);
885  loadData(is, myAttrname);
886  loadData(is, myClosedall);
887  loadData(is, myAddparticlesystem);
888  loadData(is, myParticlegroup);
889  loadData(is, myAppendunusedtoparticlesystem);
890 
891  return true;
892  }
893 
894  bool getKeep() const { return myKeep; }
895  void setKeep(bool val) { myKeep = val; }
896  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
897  {
898  SOP_Node *thissop = cookparms.getNode();
899  if (!thissop) return getKeep();
900  bool result;
901  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
902  return result;
903  }
904  const UT_Array<Points> &getPoints() const { return myPoints; }
905 void setPoints(const UT_Array<Points> &val) { myPoints = val; }
906  exint opPoints(const SOP_NodeVerb::CookParms &cookparms) const
907  {
908  SOP_Node *thissop = cookparms.getNode();
909  if (!thissop) return getPoints().entries();
910  exint result;
911  OP_Utils::evalOpParm(result, thissop, "points", cookparms.getCookTime(), 0);
912  return result;
913  }
914  bool opPoints_usept(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
915  { return opinstPoints_usept(cookparms, &_idx); }
916  bool opinstPoints_usept(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
917  {
918  SOP_Node *thissop = cookparms.getNode();
919  if (!thissop) return (myPoints(_idx[0]).usept);
920  int _parmidx[2-1];
921  _parmidx[1-1] = _idx[1-1] + 0;
922 
923  bool result;
924  OP_Utils::evalOpParmInst(result, thissop, "usept#", _parmidx, cookparms.getCookTime(), 0, 2-1);
925  return (result);
926  }
927  UT_Vector3D opPoints_pt(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
928  { return opinstPoints_pt(cookparms, &_idx); }
929  UT_Vector3D opinstPoints_pt(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
930  {
931  SOP_Node *thissop = cookparms.getNode();
932  if (!thissop) return (myPoints(_idx[0]).pt);
933  int _parmidx[2-1];
934  _parmidx[1-1] = _idx[1-1] + 0;
935 
937  OP_Utils::evalOpParmInst(result, thissop, "pt#", _parmidx, cookparms.getCookTime(), 0, 2-1);
938  return (result);
939  }
940  fpreal64 opPoints_weight(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
941  { return opinstPoints_weight(cookparms, &_idx); }
942  fpreal64 opinstPoints_weight(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
943  {
944  SOP_Node *thissop = cookparms.getNode();
945  if (!thissop) return (myPoints(_idx[0]).weight);
946  int _parmidx[2-1];
947  _parmidx[1-1] = _idx[1-1] + 0;
948 
950  OP_Utils::evalOpParmInst(result, thissop, "weight#", _parmidx, cookparms.getCookTime(), 0, 2-1);
951  return (result);
952  }
953 
954  bool getRemove() const { return myRemove; }
955  void setRemove(bool val) { myRemove = val; }
956  bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
957  {
958  SOP_Node *thissop = cookparms.getNode();
959  if (!thissop) return getRemove();
960  bool result;
961  OP_Utils::evalOpParm(result, thissop, "remove", cookparms.getCookTime(), 0);
962  return result;
963  }
964  const UT_Array<Prims> &getPrims() const { return myPrims; }
965 void setPrims(const UT_Array<Prims> &val) { myPrims = val; }
966  exint opPrims(const SOP_NodeVerb::CookParms &cookparms) const
967  {
968  SOP_Node *thissop = cookparms.getNode();
969  if (!thissop) return getPrims().entries();
970  exint result;
971  OP_Utils::evalOpParm(result, thissop, "prims", cookparms.getCookTime(), 0);
972  return result;
973  }
974  UT_StringHolder opPrims_prim(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
975  { return opinstPrims_prim(cookparms, &_idx); }
976  UT_StringHolder opinstPrims_prim(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
977  {
978  SOP_Node *thissop = cookparms.getNode();
979  if (!thissop) return (myPrims(_idx[0]).prim);
980  int _parmidx[2-1];
981  _parmidx[1-1] = _idx[1-1] + 0;
982 
984  OP_Utils::evalOpParmInst(result, thissop, "prim#", _parmidx, cookparms.getCookTime(), 0, 2-1);
985  return (result);
986  }
987  bool opPrims_closed(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
988  { return opinstPrims_closed(cookparms, &_idx); }
989  bool opinstPrims_closed(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
990  {
991  SOP_Node *thissop = cookparms.getNode();
992  if (!thissop) return (myPrims(_idx[0]).closed);
993  int _parmidx[2-1];
994  _parmidx[1-1] = _idx[1-1] + 0;
995 
996  bool result;
997  OP_Utils::evalOpParmInst(result, thissop, "closed#", _parmidx, cookparms.getCookTime(), 0, 2-1);
998  return (result);
999  }
1000 
1001  int64 getSwitcher() const { return mySwitcher; }
1002  void setSwitcher(int64 val) { mySwitcher = val; }
1003  int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
1004  {
1005  SOP_Node *thissop = cookparms.getNode();
1006  if (!thissop) return getSwitcher();
1007  int64 result;
1008  OP_Utils::evalOpParm(result, thissop, "switcher", cookparms.getCookTime(), 0);
1009  return result;
1010  }
1011  const UT_StringHolder & getGroup() const { return myGroup; }
1012  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1014  {
1015  SOP_Node *thissop = cookparms.getNode();
1016  if (!thissop) return getGroup();
1018  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1019  return result;
1020  }
1021  Add getAdd() const { return Add(myAdd); }
1022  void setAdd(Add val) { myAdd = int64(val); }
1023  Add opAdd(const SOP_NodeVerb::CookParms &cookparms) const
1024  {
1025  SOP_Node *thissop = cookparms.getNode();
1026  if (!thissop) return getAdd();
1027  int64 result;
1028  OP_Utils::evalOpParm(result, thissop, "add", cookparms.getCookTime(), 0);
1029  return Add(result);
1030  }
1031  int64 getInc() const { return myInc; }
1032  void setInc(int64 val) { myInc = val; }
1033  int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
1034  {
1035  SOP_Node *thissop = cookparms.getNode();
1036  if (!thissop) return getInc();
1037  int64 result;
1038  OP_Utils::evalOpParm(result, thissop, "inc", cookparms.getCookTime(), 0);
1039  return result;
1040  }
1041  const UT_StringHolder & getAttrname() const { return myAttrname; }
1042  void setAttrname(const UT_StringHolder & val) { myAttrname = val; }
1044  {
1045  SOP_Node *thissop = cookparms.getNode();
1046  if (!thissop) return getAttrname();
1048  OP_Utils::evalOpParm(result, thissop, "attrname", cookparms.getCookTime(), 0);
1049  return result;
1050  }
1051  bool getClosedall() const { return myClosedall; }
1052  void setClosedall(bool val) { myClosedall = val; }
1053  bool opClosedall(const SOP_NodeVerb::CookParms &cookparms) const
1054  {
1055  SOP_Node *thissop = cookparms.getNode();
1056  if (!thissop) return getClosedall();
1057  bool result;
1058  OP_Utils::evalOpParm(result, thissop, "closedall", cookparms.getCookTime(), 0);
1059  return result;
1060  }
1061  bool getAddparticlesystem() const { return myAddparticlesystem; }
1062  void setAddparticlesystem(bool val) { myAddparticlesystem = val; }
1063  bool opAddparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
1064  {
1065  SOP_Node *thissop = cookparms.getNode();
1066  if (!thissop) return getAddparticlesystem();
1067  bool result;
1068  OP_Utils::evalOpParm(result, thissop, "addparticlesystem", cookparms.getCookTime(), 0);
1069  return result;
1070  }
1071  const UT_StringHolder & getParticlegroup() const { return myParticlegroup; }
1072  void setParticlegroup(const UT_StringHolder & val) { myParticlegroup = val; }
1074  {
1075  SOP_Node *thissop = cookparms.getNode();
1076  if (!thissop) return getParticlegroup();
1078  OP_Utils::evalOpParm(result, thissop, "particlegroup", cookparms.getCookTime(), 0);
1079  return result;
1080  }
1081  bool getAppendunusedtoparticlesystem() const { return myAppendunusedtoparticlesystem; }
1082  void setAppendunusedtoparticlesystem(bool val) { myAppendunusedtoparticlesystem = val; }
1084  {
1085  SOP_Node *thissop = cookparms.getNode();
1086  if (!thissop) return getAppendunusedtoparticlesystem();
1087  bool result;
1088  OP_Utils::evalOpParm(result, thissop, "appendunusedtoparticlesystem", cookparms.getCookTime(), 0);
1089  return result;
1090  }
1091 
1092 private:
1093  bool myKeep;
1094  UT_Array<Points> myPoints;
1095  bool myRemove;
1096  UT_Array<Prims> myPrims;
1097  int64 mySwitcher;
1098  UT_StringHolder myGroup;
1099  int64 myAdd;
1100  int64 myInc;
1101  UT_StringHolder myAttrname;
1102  bool myClosedall;
1103  bool myAddparticlesystem;
1104  UT_StringHolder myParticlegroup;
1105  bool myAppendunusedtoparticlesystem;
1106 
1107 };
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
const UT_StringHolder & getGroup() const
type
Definition: core.h:556
bool operator==(const SOP_AddParms &src) const
bool isParmColorRamp(exint idx) const override
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
fpreal64 opPoints_weight(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opClosedall(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Prims &src) const
Add getAdd() const
const UT_StringHolder & getParticlegroup() const
static void saveData(std::ostream &os, UT_Matrix3D v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
const UT_StringHolder & getAttrname() const
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder prim
const char * getNestParmName(TempIndex fieldnum) const override
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator!=(const SOP_AddParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
bool opPrims_closed(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
bool opPoints_usept(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setSwitcher(int64 val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setClosedall(bool val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLdouble s
Definition: glad.h:3009
void setPrims(const UT_Array< Prims > &val)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Vector4D v)
bool getRemove() const
void setAdd(Add val)
**But if you need a result
Definition: thread.h:622
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
void setParticlegroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder createString(const UT_Array< Prims > &list) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint length() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opinstPrims_closed(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE const char * buffer() const
bool operator==(const Points &src) const
Definition: SOP_Add.proto.h:70
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
bool getAppendunusedtoparticlesystem() const
UT_Vector3D opinstPoints_pt(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void copyFrom(const OP_NodeParms *src) override
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
bool opAddparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector3D opPoints_pt(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getKeep() const
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
exint opPrims(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
bool getAddparticlesystem() const
UT_Vector3T< fpreal64 > UT_Vector3D
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool opRemove(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE UT_StringHolder getToken(Add enum_value)
Definition: SOP_Add.proto.h:35
bool opinstPoints_usept(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, UT_Vector3D v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, fpreal64 &v)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:655
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool operator!=(const Points &src) const
Definition: SOP_Add.proto.h:78
void setInc(int64 val)
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
bool operator!=(const Prims &src) const
int64 getSwitcher() const
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
void setAppendunusedtoparticlesystem(bool val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
UT_StringHolder opinstPrims_prim(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setGroup(const UT_StringHolder &val)
Add opAdd(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
bool getClosedall() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, int64 v)
const UT_Array< Points > & getPoints() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 opinstPoints_weight(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
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:54
const UT_Array< Prims > & getPrims() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setPoints(const UT_Array< Points > &val)
UT_StringHolder opPrims_prim(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setAttrname(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opParticlegroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void save(std::ostream &os) const
bool opAppendunusedtoparticlesystem(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setKeep(bool val)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
UT_StringHolder createString(const UT_Array< Points > &list) const
Definition: SOP_Add.proto.h:85
void setRemove(bool val)