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 class DEP_MicroNode;
23 namespace SOP_EdgeTransportEnums
24 {
25  enum class Method
26  {
27  CURVE = 0,
28  NET,
29  PARENT
30  };
31  enum class CurveDir
32  {
33  FORWARD = 0,
34  BACKWARD
35  };
36  enum class RootType
37  {
38  FIRST = 0,
39  LAST,
40  GROUP
41  };
42  enum class Operation
43  {
44  COPY = 0,
45  COPYROOT,
46  SUM,
47  MAX,
48  MIN
49  };
50  enum class Normalization
51  {
52  COMPONENT = 0,
53  GLOBAL
54  };
55  enum class RootValue
56  {
57  ZERO = 0,
58  HOLD
59  };
60  enum class SplitMethod
61  {
62  COPY = 0,
63  SPLIT
64  };
65  enum class MergeMethod
66  {
67  SUM = 0,
68  MAX,
69  MIN
70  };
71 }
72 
73 
75 {
76 public:
77  static int version() { return 1; }
78 
80  {
81  myMethod = 0;
82  myPointGroup = ""_UTsh;
83  myPrimitiveGroup = ""_UTsh;
84  myAttribute = "dist"_UTsh;
85  myCurveDir = 0;
86  myParentAttribute = "parent"_UTsh;
87  myRootType = 0;
88  myRootGroup = "0"_UTsh;
89  myOperation = 2;
90  myUseNormalization = false;
91  myNormalization = 0;
92  myRootValue = 0;
93  myIgnoreAttribute = true;
94  myScaleByEdge = true;
95  myRotateByEdge = false;
96  mySplitMethod = 0;
97  myMergeMethod = 0;
98 
99  }
100 
101  explicit SOP_EdgeTransportParms(const SOP_EdgeTransportParms &) = default;
103  SOP_EdgeTransportParms(SOP_EdgeTransportParms &&) noexcept = default;
104  SOP_EdgeTransportParms &operator=(SOP_EdgeTransportParms &&) noexcept = default;
105 
106  ~SOP_EdgeTransportParms() override {}
107 
109  {
110  if (myMethod != src.myMethod) return false;
111  if (myPointGroup != src.myPointGroup) return false;
112  if (myPrimitiveGroup != src.myPrimitiveGroup) return false;
113  if (myAttribute != src.myAttribute) return false;
114  if (myCurveDir != src.myCurveDir) return false;
115  if (myParentAttribute != src.myParentAttribute) return false;
116  if (myRootType != src.myRootType) return false;
117  if (myRootGroup != src.myRootGroup) return false;
118  if (myOperation != src.myOperation) return false;
119  if (myUseNormalization != src.myUseNormalization) return false;
120  if (myNormalization != src.myNormalization) return false;
121  if (myRootValue != src.myRootValue) return false;
122  if (myIgnoreAttribute != src.myIgnoreAttribute) return false;
123  if (myScaleByEdge != src.myScaleByEdge) return false;
124  if (myRotateByEdge != src.myRotateByEdge) return false;
125  if (mySplitMethod != src.mySplitMethod) return false;
126  if (myMergeMethod != src.myMergeMethod) return false;
127 
128  return true;
129  }
131  {
132  return !operator==(src);
133  }
142 
143 
144 
145  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
146  {
147  myMethod = 0;
148  if (true)
149  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
150  myPointGroup = ""_UTsh;
151  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
152  graph->evalOpParm(myPointGroup, nodeidx, "ptgroup", time, 0);
153  myPrimitiveGroup = ""_UTsh;
154  if (true && ( (true&&!(((int64(getMethod())!=0)))) ) )
155  graph->evalOpParm(myPrimitiveGroup, nodeidx, "primgroup", time, 0);
156  myAttribute = "dist"_UTsh;
157  if (true)
158  graph->evalOpParm(myAttribute, nodeidx, "attribute", time, 0);
159  myCurveDir = 0;
160  if (true)
161  graph->evalOpParm(myCurveDir, nodeidx, "curvedir", time, 0);
162  myParentAttribute = "parent"_UTsh;
163  if (true && ( (true&&!(((int64(getMethod())!=2)))) ) )
164  graph->evalOpParm(myParentAttribute, nodeidx, "parentattribute", time, 0);
165  myRootType = 0;
166  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
167  graph->evalOpParm(myRootType, nodeidx, "roottype", time, 0);
168  myRootGroup = "0"_UTsh;
169  if (true && ( (true&&!(((int64(getRootType())!=2))||((int64(getMethod())!=1)))) ) )
170  graph->evalOpParm(myRootGroup, nodeidx, "rootgroup", time, 0);
171  myOperation = 2;
172  if (true)
173  graph->evalOpParm(myOperation, nodeidx, "operation", time, 0);
174  myUseNormalization = false;
175  if (true)
176  graph->evalOpParm(myUseNormalization, nodeidx, "donormalization", time, 0);
177  myNormalization = 0;
178  if (true && ( (true&&!(((getUseNormalization()==0)))) ) )
179  graph->evalOpParm(myNormalization, nodeidx, "normalization", time, 0);
180  myRootValue = 0;
181  if (true && ( (true&&!(((int64(getOperation())!=0)))) ) )
182  graph->evalOpParm(myRootValue, nodeidx, "rootvalue", time, 0);
183  myIgnoreAttribute = true;
184  if (true && ( (true&&!(((int64(getOperation())!=2)))) ) )
185  graph->evalOpParm(myIgnoreAttribute, nodeidx, "ignoreattribute", time, 0);
186  myScaleByEdge = true;
187  if (true && ( (true&&!(((int64(getOperation())!=2)))) ) )
188  graph->evalOpParm(myScaleByEdge, nodeidx, "scalebyedge", time, 0);
189  myRotateByEdge = false;
190  if (true && ( (true&&!(((int64(getMethod())!=0)&&(int64(getCurveDir())==1)))) ) )
191  graph->evalOpParm(myRotateByEdge, nodeidx, "rotatebyedge", time, 0);
192  mySplitMethod = 0;
193  if (true && ( (true&&!(((int64(getMethod())==0))||((int64(getCurveDir())!=0)))) ) )
194  graph->evalOpParm(mySplitMethod, nodeidx, "splitmethod", time, 0);
195  myMergeMethod = 0;
196  if (true && ( (true&&!(((int64(getMethod())==0))||((int64(getCurveDir())!=1)))) ) )
197  graph->evalOpParm(myMergeMethod, nodeidx, "mergemethod", time, 0);
198 
199  }
200 
201 
202  void loadFromOpSubclass(const LoadParms &loadparms) override
203  {
204  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
205  }
206 
207 
208  void copyFrom(const OP_NodeParms *src) override
209  {
210  *this = *((const SOP_EdgeTransportParms *)src);
211  }
212 
213  template <typename T>
214  void
215  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
216  {
217  if (idx.size() < 1)
218  return;
219  UT_ASSERT(idx.size() == instance.size()+1);
220  if (idx.size() != instance.size()+1)
221  return;
222  switch (idx[0])
223  {
224  case 0:
225  coerceValue(value, myMethod);
226  break;
227  case 1:
228  coerceValue(value, myPointGroup);
229  break;
230  case 2:
231  coerceValue(value, myPrimitiveGroup);
232  break;
233  case 3:
234  coerceValue(value, myAttribute);
235  break;
236  case 4:
237  coerceValue(value, myCurveDir);
238  break;
239  case 5:
240  coerceValue(value, myParentAttribute);
241  break;
242  case 6:
243  coerceValue(value, myRootType);
244  break;
245  case 7:
246  coerceValue(value, myRootGroup);
247  break;
248  case 8:
249  coerceValue(value, myOperation);
250  break;
251  case 9:
252  coerceValue(value, myUseNormalization);
253  break;
254  case 10:
255  coerceValue(value, myNormalization);
256  break;
257  case 11:
258  coerceValue(value, myRootValue);
259  break;
260  case 12:
261  coerceValue(value, myIgnoreAttribute);
262  break;
263  case 13:
264  coerceValue(value, myScaleByEdge);
265  break;
266  case 14:
267  coerceValue(value, myRotateByEdge);
268  break;
269  case 15:
270  coerceValue(value, mySplitMethod);
271  break;
272  case 16:
273  coerceValue(value, myMergeMethod);
274  break;
275 
276  }
277  }
278 
279  bool isParmColorRamp(exint idx) const override
280  {
281  switch (idx)
282  {
283 
284  }
285  return false;
286  }
287 
288  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
305  { doGetParmValue(idx, instance, value); }
306  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
307  { doGetParmValue(idx, instance, value); }
308  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
309  { doGetParmValue(idx, instance, value); }
310 
311  template <typename T>
312  void
313  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
314  {
315  if (idx.size() < 1)
316  return;
317  UT_ASSERT(idx.size() == instance.size()+1);
318  if (idx.size() != instance.size()+1)
319  return;
320  switch (idx[0])
321  {
322  case 0:
323  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
324  break;
325  case 1:
326  coerceValue(myPointGroup, ( ( value ) ));
327  break;
328  case 2:
329  coerceValue(myPrimitiveGroup, ( ( value ) ));
330  break;
331  case 3:
332  coerceValue(myAttribute, ( ( value ) ));
333  break;
334  case 4:
335  coerceValue(myCurveDir, clampMinValue(0, clampMaxValue(1, value ) ));
336  break;
337  case 5:
338  coerceValue(myParentAttribute, ( ( value ) ));
339  break;
340  case 6:
341  coerceValue(myRootType, clampMinValue(0, clampMaxValue(2, value ) ));
342  break;
343  case 7:
344  coerceValue(myRootGroup, ( ( value ) ));
345  break;
346  case 8:
347  coerceValue(myOperation, clampMinValue(0, clampMaxValue(4, value ) ));
348  break;
349  case 9:
350  coerceValue(myUseNormalization, ( ( value ) ));
351  break;
352  case 10:
353  coerceValue(myNormalization, clampMinValue(0, clampMaxValue(1, value ) ));
354  break;
355  case 11:
356  coerceValue(myRootValue, clampMinValue(0, clampMaxValue(1, value ) ));
357  break;
358  case 12:
359  coerceValue(myIgnoreAttribute, ( ( value ) ));
360  break;
361  case 13:
362  coerceValue(myScaleByEdge, ( ( value ) ));
363  break;
364  case 14:
365  coerceValue(myRotateByEdge, ( ( value ) ));
366  break;
367  case 15:
368  coerceValue(mySplitMethod, clampMinValue(0, clampMaxValue(1, value ) ));
369  break;
370  case 16:
371  coerceValue(myMergeMethod, clampMinValue(0, clampMaxValue(2, value ) ));
372  break;
373 
374  }
375  }
376 
377  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
394  { doSetParmValue(idx, instance, value); }
395  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
396  { doSetParmValue(idx, instance, value); }
397  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
398  { doSetParmValue(idx, instance, value); }
399 
400  exint getNestNumParms(TempIndex idx) const override
401  {
402  if (idx.size() == 0)
403  return 17;
404  switch (idx[0])
405  {
406 
407  }
408  // Invalid
409  return 0;
410  }
411 
412  const char *getNestParmName(TempIndex fieldnum) const override
413  {
414  if (fieldnum.size() < 1)
415  return 0;
416  switch (fieldnum[0])
417  {
418  case 0:
419  return "method";
420  case 1:
421  return "ptgroup";
422  case 2:
423  return "primgroup";
424  case 3:
425  return "attribute";
426  case 4:
427  return "curvedir";
428  case 5:
429  return "parentattribute";
430  case 6:
431  return "roottype";
432  case 7:
433  return "rootgroup";
434  case 8:
435  return "operation";
436  case 9:
437  return "donormalization";
438  case 10:
439  return "normalization";
440  case 11:
441  return "rootvalue";
442  case 12:
443  return "ignoreattribute";
444  case 13:
445  return "scalebyedge";
446  case 14:
447  return "rotatebyedge";
448  case 15:
449  return "splitmethod";
450  case 16:
451  return "mergemethod";
452 
453  }
454  return 0;
455  }
456 
457  ParmType getNestParmType(TempIndex fieldnum) const override
458  {
459  if (fieldnum.size() < 1)
460  return PARM_UNSUPPORTED;
461  switch (fieldnum[0])
462  {
463  case 0:
464  return PARM_INTEGER;
465  case 1:
466  return PARM_STRING;
467  case 2:
468  return PARM_STRING;
469  case 3:
470  return PARM_STRING;
471  case 4:
472  return PARM_INTEGER;
473  case 5:
474  return PARM_STRING;
475  case 6:
476  return PARM_INTEGER;
477  case 7:
478  return PARM_STRING;
479  case 8:
480  return PARM_INTEGER;
481  case 9:
482  return PARM_INTEGER;
483  case 10:
484  return PARM_INTEGER;
485  case 11:
486  return PARM_INTEGER;
487  case 12:
488  return PARM_INTEGER;
489  case 13:
490  return PARM_INTEGER;
491  case 14:
492  return PARM_INTEGER;
493  case 15:
494  return PARM_INTEGER;
495  case 16:
496  return PARM_INTEGER;
497 
498  }
499  return PARM_UNSUPPORTED;
500  }
501 
502  // Boiler plate to load individual types.
503  static void loadData(UT_IStream &is, int64 &v)
504  { is.bread(&v, 1); }
505  static void loadData(UT_IStream &is, bool &v)
506  { int64 iv; is.bread(&iv, 1); v = iv; }
507  static void loadData(UT_IStream &is, fpreal64 &v)
508  { is.bread<fpreal64>(&v, 1); }
509  static void loadData(UT_IStream &is, UT_Vector2D &v)
510  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
511  static void loadData(UT_IStream &is, UT_Vector3D &v)
512  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
513  is.bread<fpreal64>(&v.z(), 1); }
514  static void loadData(UT_IStream &is, UT_Vector4D &v)
515  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
516  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
517  static void loadData(UT_IStream &is, UT_Matrix2D &v)
518  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
519  static void loadData(UT_IStream &is, UT_Matrix3D &v)
520  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
521  static void loadData(UT_IStream &is, UT_Matrix4D &v)
522  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
523  static void loadData(UT_IStream &is, UT_Vector2I &v)
524  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
525  static void loadData(UT_IStream &is, UT_Vector3I &v)
526  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
527  is.bread<int64>(&v.z(), 1); }
528  static void loadData(UT_IStream &is, UT_Vector4I &v)
529  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
530  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
532  { is.bread(v); }
534  { UT_StringHolder rampdata;
535  loadData(is, rampdata);
536  if (rampdata.isstring())
537  {
538  v.reset(new UT_Ramp());
539  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
540  v->load(istr);
541  }
542  else v.reset();
543  }
546  loadData(is, data);
547  if (data.isstring())
548  {
549  // Find the data type.
550  const char *colon = UT_StringWrap(data).findChar(':');
551  if (colon)
552  {
553  int typelen = colon - data.buffer();
555  type.strncpy(data.buffer(), typelen);
556  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
557 
558  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
559  }
560  }
561  else v.reset();
562  }
563 
564  static void saveData(std::ostream &os, int64 v)
565  { UTwrite(os, &v); }
566  static void saveData(std::ostream &os, bool v)
567  { int64 iv = v; UTwrite(os, &iv); }
568  static void saveData(std::ostream &os, fpreal64 v)
569  { UTwrite<fpreal64>(os, &v); }
570  static void saveData(std::ostream &os, UT_Vector2D v)
571  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
572  static void saveData(std::ostream &os, UT_Vector3D v)
573  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
574  UTwrite<fpreal64>(os, &v.z()); }
575  static void saveData(std::ostream &os, UT_Vector4D v)
576  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
577  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
578  static void saveData(std::ostream &os, UT_Matrix2D v)
580  static void saveData(std::ostream &os, UT_Matrix3D v)
582  static void saveData(std::ostream &os, UT_Matrix4D v)
584  static void saveData(std::ostream &os, UT_StringHolder s)
585  { UT_StringWrap(s).saveBinary(os); }
586  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
588  UT_OStringStream ostr;
589  if (s) s->save(ostr);
590  result = ostr.str();
591  saveData(os, result);
592  }
593  static void saveData(std::ostream &os, PRM_DataItemHandle s)
595  UT_OStringStream ostr;
596  if (s)
597  {
598  ostr << s->getDataTypeToken();
599  ostr << ":";
600  s->saveBinary(ostr);
601  }
602  result = ostr.str();
603  saveData(os, result);
604  }
605 
606 
607  void save(std::ostream &os) const
608  {
609  int32 v = version();
610  UTwrite(os, &v);
611  saveData(os, myMethod);
612  saveData(os, myPointGroup);
613  saveData(os, myPrimitiveGroup);
614  saveData(os, myAttribute);
615  saveData(os, myCurveDir);
616  saveData(os, myParentAttribute);
617  saveData(os, myRootType);
618  saveData(os, myRootGroup);
619  saveData(os, myOperation);
620  saveData(os, myUseNormalization);
621  saveData(os, myNormalization);
622  saveData(os, myRootValue);
623  saveData(os, myIgnoreAttribute);
624  saveData(os, myScaleByEdge);
625  saveData(os, myRotateByEdge);
626  saveData(os, mySplitMethod);
627  saveData(os, myMergeMethod);
628 
629  }
630 
631  bool load(UT_IStream &is)
632  {
633  int32 v;
634  is.bread(&v, 1);
635  if (version() != v)
636  {
637  // Fail incompatible versions
638  return false;
639  }
640  loadData(is, myMethod);
641  loadData(is, myPointGroup);
642  loadData(is, myPrimitiveGroup);
643  loadData(is, myAttribute);
644  loadData(is, myCurveDir);
645  loadData(is, myParentAttribute);
646  loadData(is, myRootType);
647  loadData(is, myRootGroup);
648  loadData(is, myOperation);
649  loadData(is, myUseNormalization);
650  loadData(is, myNormalization);
651  loadData(is, myRootValue);
652  loadData(is, myIgnoreAttribute);
653  loadData(is, myScaleByEdge);
654  loadData(is, myRotateByEdge);
655  loadData(is, mySplitMethod);
656  loadData(is, myMergeMethod);
657 
658  return true;
659  }
660 
661  Method getMethod() const { return Method(myMethod); }
662  void setMethod(Method val) { myMethod = int64(val); }
663  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getMethod();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
669  return Method(result);
670  }
671  const UT_StringHolder & getPointGroup() const { return myPointGroup; }
672  void setPointGroup(const UT_StringHolder & val) { myPointGroup = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getPointGroup();
678  OP_Utils::evalOpParm(result, thissop, "ptgroup", cookparms.getCookTime(), 0);
679  return result;
680  }
681  const UT_StringHolder & getPrimitiveGroup() const { return myPrimitiveGroup; }
682  void setPrimitiveGroup(const UT_StringHolder & val) { myPrimitiveGroup = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getPrimitiveGroup();
688  OP_Utils::evalOpParm(result, thissop, "primgroup", cookparms.getCookTime(), 0);
689  return result;
690  }
691  const UT_StringHolder & getAttribute() const { return myAttribute; }
692  void setAttribute(const UT_StringHolder & val) { myAttribute = val; }
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getAttribute();
698  OP_Utils::evalOpParm(result, thissop, "attribute", cookparms.getCookTime(), 0);
699  return result;
700  }
701  CurveDir getCurveDir() const { return CurveDir(myCurveDir); }
702  void setCurveDir(CurveDir val) { myCurveDir = int64(val); }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getCurveDir();
707  int64 result;
708  OP_Utils::evalOpParm(result, thissop, "curvedir", cookparms.getCookTime(), 0);
709  return CurveDir(result);
710  }
711  const UT_StringHolder & getParentAttribute() const { return myParentAttribute; }
712  void setParentAttribute(const UT_StringHolder & val) { myParentAttribute = val; }
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getParentAttribute();
718  OP_Utils::evalOpParm(result, thissop, "parentattribute", cookparms.getCookTime(), 0);
719  return result;
720  }
721  RootType getRootType() const { return RootType(myRootType); }
722  void setRootType(RootType val) { myRootType = int64(val); }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getRootType();
727  int64 result;
728  OP_Utils::evalOpParm(result, thissop, "roottype", cookparms.getCookTime(), 0);
729  return RootType(result);
730  }
731  const UT_StringHolder & getRootGroup() const { return myRootGroup; }
732  void setRootGroup(const UT_StringHolder & val) { myRootGroup = val; }
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getRootGroup();
738  OP_Utils::evalOpParm(result, thissop, "rootgroup", cookparms.getCookTime(), 0);
739  return result;
740  }
741  Operation getOperation() const { return Operation(myOperation); }
742  void setOperation(Operation val) { myOperation = int64(val); }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getOperation();
747  int64 result;
748  OP_Utils::evalOpParm(result, thissop, "operation", cookparms.getCookTime(), 0);
749  return Operation(result);
750  }
751  bool getUseNormalization() const { return myUseNormalization; }
752  void setUseNormalization(bool val) { myUseNormalization = val; }
753  bool opUseNormalization(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getUseNormalization();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "donormalization", cookparms.getCookTime(), 0);
759  return result;
760  }
761  Normalization getNormalization() const { return Normalization(myNormalization); }
762  void setNormalization(Normalization val) { myNormalization = int64(val); }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getNormalization();
767  int64 result;
768  OP_Utils::evalOpParm(result, thissop, "normalization", cookparms.getCookTime(), 0);
769  return Normalization(result);
770  }
771  RootValue getRootValue() const { return RootValue(myRootValue); }
772  void setRootValue(RootValue val) { myRootValue = int64(val); }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getRootValue();
777  int64 result;
778  OP_Utils::evalOpParm(result, thissop, "rootvalue", cookparms.getCookTime(), 0);
779  return RootValue(result);
780  }
781  bool getIgnoreAttribute() const { return myIgnoreAttribute; }
782  void setIgnoreAttribute(bool val) { myIgnoreAttribute = val; }
783  bool opIgnoreAttribute(const SOP_NodeVerb::CookParms &cookparms) const
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getIgnoreAttribute();
787  bool result;
788  OP_Utils::evalOpParm(result, thissop, "ignoreattribute", cookparms.getCookTime(), 0);
789  return result;
790  }
791  bool getScaleByEdge() const { return myScaleByEdge; }
792  void setScaleByEdge(bool val) { myScaleByEdge = val; }
793  bool opScaleByEdge(const SOP_NodeVerb::CookParms &cookparms) const
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getScaleByEdge();
797  bool result;
798  OP_Utils::evalOpParm(result, thissop, "scalebyedge", cookparms.getCookTime(), 0);
799  return result;
800  }
801  bool getRotateByEdge() const { return myRotateByEdge; }
802  void setRotateByEdge(bool val) { myRotateByEdge = val; }
803  bool opRotateByEdge(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getRotateByEdge();
807  bool result;
808  OP_Utils::evalOpParm(result, thissop, "rotatebyedge", cookparms.getCookTime(), 0);
809  return result;
810  }
811  SplitMethod getSplitMethod() const { return SplitMethod(mySplitMethod); }
812  void setSplitMethod(SplitMethod val) { mySplitMethod = int64(val); }
814  {
815  SOP_Node *thissop = cookparms.getNode();
816  if (!thissop) return getSplitMethod();
817  int64 result;
818  OP_Utils::evalOpParm(result, thissop, "splitmethod", cookparms.getCookTime(), 0);
819  return SplitMethod(result);
820  }
821  MergeMethod getMergeMethod() const { return MergeMethod(myMergeMethod); }
822  void setMergeMethod(MergeMethod val) { myMergeMethod = int64(val); }
824  {
825  SOP_Node *thissop = cookparms.getNode();
826  if (!thissop) return getMergeMethod();
827  int64 result;
828  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
829  return MergeMethod(result);
830  }
831 
832 private:
833  int64 myMethod;
834  UT_StringHolder myPointGroup;
835  UT_StringHolder myPrimitiveGroup;
836  UT_StringHolder myAttribute;
837  int64 myCurveDir;
838  UT_StringHolder myParentAttribute;
839  int64 myRootType;
840  UT_StringHolder myRootGroup;
841  int64 myOperation;
842  bool myUseNormalization;
843  int64 myNormalization;
844  int64 myRootValue;
845  bool myIgnoreAttribute;
846  bool myScaleByEdge;
847  bool myRotateByEdge;
848  int64 mySplitMethod;
849  int64 myMergeMethod;
850 
851 };
Normalization getNormalization() const
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)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool isParmColorRamp(exint idx) const override
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
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
Normalization opNormalization(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)
GLboolean * data
Definition: glcorearb.h:131
RootType opRootType(const SOP_NodeVerb::CookParms &cookparms) const
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:62
void setOperation(Operation val)
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opRootGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
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
GLdouble s
Definition: glad.h:3009
void setNormalization(Normalization val)
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
**But if you need a result
Definition: thread.h:613
UT_StringHolder opAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
SplitMethod opSplitMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const 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.
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
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
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 saveData(std::ostream &os, UT_Matrix2D v)
bool opRotateByEdge(const SOP_NodeVerb::CookParms &cookparms) const
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
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
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
static void saveData(std::ostream &os, bool v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
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 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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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:296
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
void setSplitMethod(SplitMethod val)
void setRootValue(RootValue val)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setRootGroup(const UT_StringHolder &val)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
void setPrimitiveGroup(const UT_StringHolder &val)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
RootValue opRootValue(const SOP_NodeVerb::CookParms &cookparms) const
void setMergeMethod(MergeMethod val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
GLuint GLfloat * val
Definition: glcorearb.h:1608
const UT_StringHolder & getParentAttribute() const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
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:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
ParmType getNestParmType(TempIndex fieldnum) const override
bool opIgnoreAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
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
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
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
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
bool opUseNormalization(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opParentAttribute(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const