HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_EdgeTransport.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 <SOP/SOP_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 using namespace UT::Literal;
23 
24 class DEP_MicroNode;
25 namespace SOP_EdgeTransportEnums
26 {
27  enum class Method
28  {
29  CURVE = 0,
30  NET,
31  PARENT
32  };
33  enum class CurveDir
34  {
35  FORWARD = 0,
36  BACKWARD
37  };
38  enum class RootType
39  {
40  FIRST = 0,
41  LAST,
42  GROUP
43  };
44  enum class Operation
45  {
46  COPY = 0,
47  COPYROOT,
48  SUM,
49  MAX,
50  MIN
51  };
52  enum class RootValue
53  {
54  ZERO = 0,
55  HOLD
56  };
57  enum class SplitMethod
58  {
59  COPY = 0,
60  SPLIT
61  };
62  enum class MergeMethod
63  {
64  SUM = 0,
65  MAX,
66  MIN
67  };
68 }
69 
70 
72 {
73 public:
74  static int version() { return 1; }
75 
77  {
78  myMethod = 0;
79  myPointGroup = ""_sh;
80  myPrimitiveGroup = ""_sh;
81  myAttribute = "dist"_sh;
82  myCurveDir = 0;
83  myParentAttribute = "parent"_sh;
84  myRootType = 0;
85  myRootGroup = "0"_sh;
86  myOperation = 2;
87  myRootValue = 0;
88  myIgnoreAttribute = true;
89  myScaleByEdge = true;
90  mySplitMethod = 0;
91  myMergeMethod = 0;
92 
93  }
94 
95  explicit SOP_EdgeTransportParms(const SOP_EdgeTransportParms &) = default;
96 
98 
100  {
101  if (myMethod != src.myMethod) return false;
102  if (myPointGroup != src.myPointGroup) return false;
103  if (myPrimitiveGroup != src.myPrimitiveGroup) return false;
104  if (myAttribute != src.myAttribute) return false;
105  if (myCurveDir != src.myCurveDir) return false;
106  if (myParentAttribute != src.myParentAttribute) return false;
107  if (myRootType != src.myRootType) return false;
108  if (myRootGroup != src.myRootGroup) return false;
109  if (myOperation != src.myOperation) return false;
110  if (myRootValue != src.myRootValue) return false;
111  if (myIgnoreAttribute != src.myIgnoreAttribute) return false;
112  if (myScaleByEdge != src.myScaleByEdge) return false;
113  if (mySplitMethod != src.mySplitMethod) return false;
114  if (myMergeMethod != src.myMergeMethod) return false;
115 
116  return true;
117  }
119  {
120  return !operator==(src);
121  }
129 
130 
131 
132  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
133  {
134  myMethod = 0;
135  if (true)
136  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
137  myPointGroup = ""_sh;
138  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
139  graph->evalOpParm(myPointGroup, nodeidx, "ptgroup", time, 0);
140  myPrimitiveGroup = ""_sh;
141  if (true && ( (true&&!(((int64(getMethod())!=0)))) ) )
142  graph->evalOpParm(myPrimitiveGroup, nodeidx, "primgroup", time, 0);
143  myAttribute = "dist"_sh;
144  if (true)
145  graph->evalOpParm(myAttribute, nodeidx, "attribute", time, 0);
146  myCurveDir = 0;
147  if (true)
148  graph->evalOpParm(myCurveDir, nodeidx, "curvedir", time, 0);
149  myParentAttribute = "parent"_sh;
150  if (true && ( (true&&!(((int64(getMethod())!=2)))) ) )
151  graph->evalOpParm(myParentAttribute, nodeidx, "parentattribute", time, 0);
152  myRootType = 0;
153  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
154  graph->evalOpParm(myRootType, nodeidx, "roottype", time, 0);
155  myRootGroup = "0"_sh;
156  if (true && ( (true&&!(((int64(getRootType())!=2))||((int64(getMethod())!=1)))) ) )
157  graph->evalOpParm(myRootGroup, nodeidx, "rootgroup", time, 0);
158  myOperation = 2;
159  if (true)
160  graph->evalOpParm(myOperation, nodeidx, "operation", time, 0);
161  myRootValue = 0;
162  if (true && ( (true&&!(((int64(getOperation())!=0)))) ) )
163  graph->evalOpParm(myRootValue, nodeidx, "rootvalue", time, 0);
164  myIgnoreAttribute = true;
165  if (true && ( (true&&!(((int64(getOperation())!=2)))) ) )
166  graph->evalOpParm(myIgnoreAttribute, nodeidx, "ignoreattribute", time, 0);
167  myScaleByEdge = true;
168  if (true && ( (true&&!(((int64(getOperation())!=2)))) ) )
169  graph->evalOpParm(myScaleByEdge, nodeidx, "scalebyedge", time, 0);
170  mySplitMethod = 0;
171  if (true && ( (true&&!(((int64(getMethod())==0))||((int64(getCurveDir())!=0)))) ) )
172  graph->evalOpParm(mySplitMethod, nodeidx, "splitmethod", time, 0);
173  myMergeMethod = 0;
174  if (true && ( (true&&!(((int64(getMethod())==0))||((int64(getCurveDir())!=1)))) ) )
175  graph->evalOpParm(myMergeMethod, nodeidx, "mergemethod", time, 0);
176 
177  }
178 
179 
180  void loadFromOpSubclass(const LoadParms &loadparms) override
181  {
182  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
183  }
184 
185 
186  void copyFrom(const SOP_NodeParms *src) override
187  {
188  *this = *((const SOP_EdgeTransportParms *)src);
189  }
190 
191  template <typename T>
192  void
193  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
194  {
195  if (idx.size() < 1)
196  return;
197  UT_ASSERT(idx.size() == instance.size()+1);
198  if (idx.size() != instance.size()+1)
199  return;
200  switch (idx[0])
201  {
202  case 0:
203  coerceValue(value, myMethod);
204  break;
205  case 1:
206  coerceValue(value, myPointGroup);
207  break;
208  case 2:
209  coerceValue(value, myPrimitiveGroup);
210  break;
211  case 3:
212  coerceValue(value, myAttribute);
213  break;
214  case 4:
215  coerceValue(value, myCurveDir);
216  break;
217  case 5:
218  coerceValue(value, myParentAttribute);
219  break;
220  case 6:
221  coerceValue(value, myRootType);
222  break;
223  case 7:
224  coerceValue(value, myRootGroup);
225  break;
226  case 8:
227  coerceValue(value, myOperation);
228  break;
229  case 9:
230  coerceValue(value, myRootValue);
231  break;
232  case 10:
233  coerceValue(value, myIgnoreAttribute);
234  break;
235  case 11:
236  coerceValue(value, myScaleByEdge);
237  break;
238  case 12:
239  coerceValue(value, mySplitMethod);
240  break;
241  case 13:
242  coerceValue(value, myMergeMethod);
243  break;
244 
245  }
246  }
247 
248  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
269  { doGetParmValue(idx, instance, value); }
270 
271  template <typename T>
272  void
273  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
274  {
275  if (idx.size() < 1)
276  return;
277  UT_ASSERT(idx.size() == instance.size()+1);
278  if (idx.size() != instance.size()+1)
279  return;
280  switch (idx[0])
281  {
282  case 0:
283  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
284  break;
285  case 1:
286  coerceValue(myPointGroup, ( ( value ) ));
287  break;
288  case 2:
289  coerceValue(myPrimitiveGroup, ( ( value ) ));
290  break;
291  case 3:
292  coerceValue(myAttribute, ( ( value ) ));
293  break;
294  case 4:
295  coerceValue(myCurveDir, clampMinValue(0, clampMaxValue(1, value ) ));
296  break;
297  case 5:
298  coerceValue(myParentAttribute, ( ( value ) ));
299  break;
300  case 6:
301  coerceValue(myRootType, clampMinValue(0, clampMaxValue(2, value ) ));
302  break;
303  case 7:
304  coerceValue(myRootGroup, ( ( value ) ));
305  break;
306  case 8:
307  coerceValue(myOperation, clampMinValue(0, clampMaxValue(4, value ) ));
308  break;
309  case 9:
310  coerceValue(myRootValue, clampMinValue(0, clampMaxValue(1, value ) ));
311  break;
312  case 10:
313  coerceValue(myIgnoreAttribute, ( ( value ) ));
314  break;
315  case 11:
316  coerceValue(myScaleByEdge, ( ( value ) ));
317  break;
318  case 12:
319  coerceValue(mySplitMethod, clampMinValue(0, clampMaxValue(1, value ) ));
320  break;
321  case 13:
322  coerceValue(myMergeMethod, clampMinValue(0, clampMaxValue(2, value ) ));
323  break;
324 
325  }
326  }
327 
328  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
349  { doSetParmValue(idx, instance, value); }
350 
351  exint getNestNumParms(TempIndex idx) const override
352  {
353  if (idx.size() == 0)
354  return 14;
355  switch (idx[0])
356  {
357 
358  }
359  // Invalid
360  return 0;
361  }
362 
363  const char *getNestParmName(TempIndex fieldnum) const override
364  {
365  if (fieldnum.size() < 1)
366  return 0;
367  switch (fieldnum[0])
368  {
369  case 0:
370  return "method";
371  case 1:
372  return "ptgroup";
373  case 2:
374  return "primgroup";
375  case 3:
376  return "attribute";
377  case 4:
378  return "curvedir";
379  case 5:
380  return "parentattribute";
381  case 6:
382  return "roottype";
383  case 7:
384  return "rootgroup";
385  case 8:
386  return "operation";
387  case 9:
388  return "rootvalue";
389  case 10:
390  return "ignoreattribute";
391  case 11:
392  return "scalebyedge";
393  case 12:
394  return "splitmethod";
395  case 13:
396  return "mergemethod";
397 
398  }
399  return 0;
400  }
401 
402  ParmType getNestParmType(TempIndex fieldnum) const override
403  {
404  if (fieldnum.size() < 1)
405  return PARM_UNSUPPORTED;
406  switch (fieldnum[0])
407  {
408  case 0:
409  return PARM_INTEGER;
410  case 1:
411  return PARM_STRING;
412  case 2:
413  return PARM_STRING;
414  case 3:
415  return PARM_STRING;
416  case 4:
417  return PARM_INTEGER;
418  case 5:
419  return PARM_STRING;
420  case 6:
421  return PARM_INTEGER;
422  case 7:
423  return PARM_STRING;
424  case 8:
425  return PARM_INTEGER;
426  case 9:
427  return PARM_INTEGER;
428  case 10:
429  return PARM_INTEGER;
430  case 11:
431  return PARM_INTEGER;
432  case 12:
433  return PARM_INTEGER;
434  case 13:
435  return PARM_INTEGER;
436 
437  }
438  return PARM_UNSUPPORTED;
439  }
440 
441  // Boiler plate to load individual types.
442  static void loadData(UT_IStream &is, int64 &v)
443  { is.bread(&v, 1); }
444  static void loadData(UT_IStream &is, bool &v)
445  { int64 iv; is.bread(&iv, 1); v = iv; }
446  static void loadData(UT_IStream &is, fpreal64 &v)
447  { is.bread<fpreal64>(&v, 1); }
448  static void loadData(UT_IStream &is, UT_Vector2D &v)
449  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
450  static void loadData(UT_IStream &is, UT_Vector3D &v)
451  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
452  is.bread<fpreal64>(&v.z(), 1); }
453  static void loadData(UT_IStream &is, UT_Vector4D &v)
454  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
455  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
456  static void loadData(UT_IStream &is, UT_Matrix2D &v)
457  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
458  static void loadData(UT_IStream &is, UT_Matrix3D &v)
459  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
460  static void loadData(UT_IStream &is, UT_Matrix4D &v)
461  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
462  static void loadData(UT_IStream &is, UT_Vector2I &v)
463  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
464  static void loadData(UT_IStream &is, UT_Vector3I &v)
465  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
466  is.bread<int64>(&v.z(), 1); }
467  static void loadData(UT_IStream &is, UT_Vector4I &v)
468  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
469  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
471  { is.bread(v); }
473  { UT_StringHolder rampdata;
474  loadData(is, rampdata);
475  if (rampdata.isstring())
476  {
477  v.reset(new UT_Ramp());
478  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
479  v->load(istr);
480  }
481  else v.reset();
482  }
485  loadData(is, data);
486  if (data.isstring())
487  {
488  // Find the data type.
489  const char *colon = UT_StringWrap(data).findChar(':');
490  if (colon)
491  {
492  int typelen = colon - data.buffer();
494  type.strncpy(data.buffer(), typelen);
495  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
496 
497  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
498  }
499  }
500  else v.reset();
501  }
502 
503  static void saveData(std::ostream &os, int64 v)
504  { UTwrite(os, &v); }
505  static void saveData(std::ostream &os, bool v)
506  { int64 iv = v; UTwrite(os, &iv); }
507  static void saveData(std::ostream &os, fpreal64 v)
508  { UTwrite<fpreal64>(os, &v); }
509  static void saveData(std::ostream &os, UT_Vector2D v)
510  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
511  static void saveData(std::ostream &os, UT_Vector3D v)
512  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
513  UTwrite<fpreal64>(os, &v.z()); }
514  static void saveData(std::ostream &os, UT_Vector4D v)
515  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
516  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
517  static void saveData(std::ostream &os, UT_Matrix2D v)
519  static void saveData(std::ostream &os, UT_Matrix3D v)
521  static void saveData(std::ostream &os, UT_Matrix4D v)
523  static void saveData(std::ostream &os, UT_StringHolder s)
524  { UT_StringWrap(s).saveBinary(os); }
525  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
527  UT_OStringStream ostr;
528  if (s) s->save(ostr);
529  result = ostr.str();
530  saveData(os, result);
531  }
532  static void saveData(std::ostream &os, PRM_DataItemHandle s)
534  UT_OStringStream ostr;
535  if (s)
536  {
537  ostr << s->getDataTypeToken();
538  ostr << ":";
539  s->saveBinary(ostr);
540  }
541  result = ostr.str();
542  saveData(os, result);
543  }
544 
545 
546  void save(std::ostream &os) const
547  {
548  int32 v = version();
549  UTwrite(os, &v);
550  saveData(os, myMethod);
551  saveData(os, myPointGroup);
552  saveData(os, myPrimitiveGroup);
553  saveData(os, myAttribute);
554  saveData(os, myCurveDir);
555  saveData(os, myParentAttribute);
556  saveData(os, myRootType);
557  saveData(os, myRootGroup);
558  saveData(os, myOperation);
559  saveData(os, myRootValue);
560  saveData(os, myIgnoreAttribute);
561  saveData(os, myScaleByEdge);
562  saveData(os, mySplitMethod);
563  saveData(os, myMergeMethod);
564 
565  }
566 
567  bool load(UT_IStream &is)
568  {
569  int32 v;
570  is.bread(&v, 1);
571  if (version() != v)
572  {
573  // Fail incompatible versions
574  return false;
575  }
576  loadData(is, myMethod);
577  loadData(is, myPointGroup);
578  loadData(is, myPrimitiveGroup);
579  loadData(is, myAttribute);
580  loadData(is, myCurveDir);
581  loadData(is, myParentAttribute);
582  loadData(is, myRootType);
583  loadData(is, myRootGroup);
584  loadData(is, myOperation);
585  loadData(is, myRootValue);
586  loadData(is, myIgnoreAttribute);
587  loadData(is, myScaleByEdge);
588  loadData(is, mySplitMethod);
589  loadData(is, myMergeMethod);
590 
591  return true;
592  }
593 
594  Method getMethod() const { return Method(myMethod); }
595  void setMethod(Method val) { myMethod = int64(val); }
596  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getMethod();
600  int64 result;
601  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
602  return Method(result);
603  }
604  const UT_StringHolder & getPointGroup() const { return myPointGroup; }
605  void setPointGroup(const UT_StringHolder & val) { myPointGroup = val; }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getPointGroup();
611  OP_Utils::evalOpParm(result, thissop, "ptgroup", cookparms.getCookTime(), 0);
612  return result;
613  }
614  const UT_StringHolder & getPrimitiveGroup() const { return myPrimitiveGroup; }
615  void setPrimitiveGroup(const UT_StringHolder & val) { myPrimitiveGroup = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getPrimitiveGroup();
621  OP_Utils::evalOpParm(result, thissop, "primgroup", cookparms.getCookTime(), 0);
622  return result;
623  }
624  const UT_StringHolder & getAttribute() const { return myAttribute; }
625  void setAttribute(const UT_StringHolder & val) { myAttribute = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getAttribute();
631  OP_Utils::evalOpParm(result, thissop, "attribute", cookparms.getCookTime(), 0);
632  return result;
633  }
634  CurveDir getCurveDir() const { return CurveDir(myCurveDir); }
635  void setCurveDir(CurveDir val) { myCurveDir = int64(val); }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getCurveDir();
640  int64 result;
641  OP_Utils::evalOpParm(result, thissop, "curvedir", cookparms.getCookTime(), 0);
642  return CurveDir(result);
643  }
644  const UT_StringHolder & getParentAttribute() const { return myParentAttribute; }
645  void setParentAttribute(const UT_StringHolder & val) { myParentAttribute = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getParentAttribute();
651  OP_Utils::evalOpParm(result, thissop, "parentattribute", cookparms.getCookTime(), 0);
652  return result;
653  }
654  RootType getRootType() const { return RootType(myRootType); }
655  void setRootType(RootType val) { myRootType = int64(val); }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getRootType();
660  int64 result;
661  OP_Utils::evalOpParm(result, thissop, "roottype", cookparms.getCookTime(), 0);
662  return RootType(result);
663  }
664  const UT_StringHolder & getRootGroup() const { return myRootGroup; }
665  void setRootGroup(const UT_StringHolder & val) { myRootGroup = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getRootGroup();
671  OP_Utils::evalOpParm(result, thissop, "rootgroup", cookparms.getCookTime(), 0);
672  return result;
673  }
674  Operation getOperation() const { return Operation(myOperation); }
675  void setOperation(Operation val) { myOperation = int64(val); }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getOperation();
680  int64 result;
681  OP_Utils::evalOpParm(result, thissop, "operation", cookparms.getCookTime(), 0);
682  return Operation(result);
683  }
684  RootValue getRootValue() const { return RootValue(myRootValue); }
685  void setRootValue(RootValue val) { myRootValue = int64(val); }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getRootValue();
690  int64 result;
691  OP_Utils::evalOpParm(result, thissop, "rootvalue", cookparms.getCookTime(), 0);
692  return RootValue(result);
693  }
694  bool getIgnoreAttribute() const { return myIgnoreAttribute; }
695  void setIgnoreAttribute(bool val) { myIgnoreAttribute = val; }
696  bool opIgnoreAttribute(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getIgnoreAttribute();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "ignoreattribute", cookparms.getCookTime(), 0);
702  return result;
703  }
704  bool getScaleByEdge() const { return myScaleByEdge; }
705  void setScaleByEdge(bool val) { myScaleByEdge = val; }
706  bool opScaleByEdge(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getScaleByEdge();
710  bool result;
711  OP_Utils::evalOpParm(result, thissop, "scalebyedge", cookparms.getCookTime(), 0);
712  return result;
713  }
714  SplitMethod getSplitMethod() const { return SplitMethod(mySplitMethod); }
715  void setSplitMethod(SplitMethod val) { mySplitMethod = int64(val); }
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getSplitMethod();
720  int64 result;
721  OP_Utils::evalOpParm(result, thissop, "splitmethod", cookparms.getCookTime(), 0);
722  return SplitMethod(result);
723  }
724  MergeMethod getMergeMethod() const { return MergeMethod(myMergeMethod); }
725  void setMergeMethod(MergeMethod val) { myMergeMethod = int64(val); }
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getMergeMethod();
730  int64 result;
731  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
732  return MergeMethod(result);
733  }
734 
735 private:
736  int64 myMethod;
737  UT_StringHolder myPointGroup;
738  UT_StringHolder myPrimitiveGroup;
739  UT_StringHolder myAttribute;
740  int64 myCurveDir;
741  UT_StringHolder myParentAttribute;
742  int64 myRootType;
743  UT_StringHolder myRootGroup;
744  int64 myOperation;
745  int64 myRootValue;
746  bool myIgnoreAttribute;
747  bool myScaleByEdge;
748  int64 mySplitMethod;
749  int64 myMergeMethod;
750 
751 };
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setPointGroup(const UT_StringHolder &val)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
int int32
Definition: SYS_Types.h:39
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
void setParentAttribute(const UT_StringHolder &val)
const UT_StringHolder & getPrimitiveGroup() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opScaleByEdge(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint bread(int32 *buffer, exint asize=1)
RootType opRootType(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:59
void setOperation(Operation val)
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opRootGroup(const SOP_NodeVerb::CookParms &cookparms) const
const GLfloat * c
Definition: glew.h:16631
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:656
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, UT_Vector2D v)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getAttribute() const
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const UT_StringHolder & getPointGroup() const
UT_StringHolder opAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
GLenum src
Definition: glcorearb.h:1793
SplitMethod opSplitMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool operator==(const SOP_EdgeTransportParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Matrix2D v)
exint length() const
bool operator!=(const SOP_EdgeTransportParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const GLdouble * v
Definition: glcorearb.h:837
static void saveData(std::ostream &os, bool v)
SplitMethod getSplitMethod() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
long long int64
Definition: SYS_Types.h:116
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void copyFrom(const SOP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_StringHolder & getRootGroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
MergeMethod opMergeMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
void setSplitMethod(SplitMethod val)
void setRootValue(RootValue val)
static void loadData(UT_IStream &is, int64 &v)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setRootGroup(const UT_StringHolder &val)
void setPrimitiveGroup(const UT_StringHolder &val)
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
RootValue opRootValue(const SOP_NodeVerb::CookParms &cookparms) const
void setMergeMethod(MergeMethod val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getParentAttribute() const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector3D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
void setAttribute(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * findChar(int c) const
Definition: UT_String.h:1372
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:153
Definition: core.h:1131
ParmType getNestParmType(TempIndex fieldnum) const override
bool opIgnoreAttribute(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:1059
GLboolean r
Definition: glcorearb.h:1222
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:654
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opPrimitiveGroup(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glew.h:1395
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
CurveDir opCurveDir(const SOP_NodeVerb::CookParms &cookparms) const
MergeMethod getMergeMethod() const
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opParentAttribute(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:652
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const