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