HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Curvesect.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_CurvesectEnums
24 {
25  enum class Left
26  {
27  LKEEPALL = 0,
28  LKEEPODD,
29  LKEEPEVEN,
30  LKEEPNONE
31  };
32 
34  getToken(Left enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Left::LKEEPALL: return "lkeepall"_sh;
39  case Left::LKEEPODD: return "lkeepodd"_sh;
40  case Left::LKEEPEVEN: return "lkeepeven"_sh;
41  case Left::LKEEPNONE: return "lkeepnone"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Right
47  {
48  RKEEPALL = 0,
49  RKEEPODD,
50  RKEEPEVEN,
51  RKEEPNONE
52  };
53 
55  getToken(Right enum_value)
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case Right::RKEEPALL: return "rkeepall"_sh;
60  case Right::RKEEPODD: return "rkeepodd"_sh;
61  case Right::RKEEPEVEN: return "rkeepeven"_sh;
62  case Right::RKEEPNONE: return "rkeepnone"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67  enum class Affect
68  {
69  LEFT = 0,
70  RIGHT,
71  BOTH
72  };
73 
75  getToken(Affect enum_value)
76  {
77  using namespace UT::Literal;
78  switch (enum_value) {
79  case Affect::LEFT: return "left"_sh;
80  case Affect::RIGHT: return "right"_sh;
81  case Affect::BOTH: return "both"_sh;
82  default: UT_ASSERT(false); return ""_sh;
83  }
84  }
85 
86 }
87 
88 
90 {
91 public:
92  static int version() { return 1; }
93 
95  {
96  myLeftgroup = ""_UTsh;
97  myRightgroup = ""_UTsh;
98  myXsect = true;
99  myTolerance = 0.001;
100  myLeft = 0;
101  myRight = 3;
102  myStdswitcher = 0;
103  myAffect = 0;
104  myExtractpt = true;
105  myKeeporiginal = false;
106 
107  }
108 
109  explicit SOP_CurvesectParms(const SOP_CurvesectParms &) = default;
110  SOP_CurvesectParms &operator=(const SOP_CurvesectParms &) = default;
111  SOP_CurvesectParms(SOP_CurvesectParms &&) noexcept = default;
112  SOP_CurvesectParms &operator=(SOP_CurvesectParms &&) noexcept = default;
113 
114  ~SOP_CurvesectParms() override {}
115 
116  bool operator==(const SOP_CurvesectParms &src) const
117  {
118  if (myLeftgroup != src.myLeftgroup) return false;
119  if (myRightgroup != src.myRightgroup) return false;
120  if (myXsect != src.myXsect) return false;
121  if (myTolerance != src.myTolerance) return false;
122  if (myLeft != src.myLeft) return false;
123  if (myRight != src.myRight) return false;
124  if (myStdswitcher != src.myStdswitcher) return false;
125  if (myAffect != src.myAffect) return false;
126  if (myExtractpt != src.myExtractpt) return false;
127  if (myKeeporiginal != src.myKeeporiginal) return false;
128 
129 
130  if (baseGetSignature() != src.baseGetSignature()) return false;
131 
132  return true;
133  }
134  bool operator!=(const SOP_CurvesectParms &src) const
135  {
136  return !operator==(src);
137  }
141 
142 
143 
144  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
145  {
146  myLeftgroup = ""_UTsh;
147  if (true)
148  graph->evalOpParm(myLeftgroup, nodeidx, "leftgroup", time, graph->isDirect()?nullptr:depnode);
149  myRightgroup = ""_UTsh;
150  if (true)
151  graph->evalOpParm(myRightgroup, nodeidx, "rightgroup", time, graph->isDirect()?nullptr:depnode);
152  myXsect = true;
153  if (true)
154  graph->evalOpParm(myXsect, nodeidx, "xsect", time, graph->isDirect()?nullptr:depnode);
155  myTolerance = 0.001;
156  if (true && ( (true&&!(((getXsect()==0)))) ) )
157  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, graph->isDirect()?nullptr:depnode);
158  myLeft = 0;
159  if (true)
160  graph->evalOpParm(myLeft, nodeidx, "left", time, graph->isDirect()?nullptr:depnode);
161  myRight = 3;
162  if (true)
163  graph->evalOpParm(myRight, nodeidx, "right", time, graph->isDirect()?nullptr:depnode);
164  myStdswitcher = 0;
165  if (true)
166  graph->evalOpParm(myStdswitcher, nodeidx, "stdswitcher", time, graph->isDirect()?nullptr:depnode);
167  myAffect = 0;
168  if (true)
169  graph->evalOpParm(myAffect, nodeidx, "affect", time, graph->isDirect()?nullptr:depnode);
170  myExtractpt = true;
171  if (true)
172  graph->evalOpParm(myExtractpt, nodeidx, "extractPt", time, graph->isDirect()?nullptr:depnode);
173  myKeeporiginal = false;
174  if (true)
175  graph->evalOpParm(myKeeporiginal, nodeidx, "keepOriginal", time, graph->isDirect()?nullptr:depnode);
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 OP_NodeParms *src) override
187  {
188  *this = *((const SOP_CurvesectParms *)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, myLeftgroup);
204  break;
205  case 1:
206  coerceValue(value, myRightgroup);
207  break;
208  case 2:
209  coerceValue(value, myXsect);
210  break;
211  case 3:
212  coerceValue(value, myTolerance);
213  break;
214  case 4:
215  coerceValue(value, myLeft);
216  break;
217  case 5:
218  coerceValue(value, myRight);
219  break;
220  case 6:
221  coerceValue(value, myStdswitcher);
222  break;
223  case 7:
224  coerceValue(value, myAffect);
225  break;
226  case 8:
227  coerceValue(value, myExtractpt);
228  break;
229  case 9:
230  coerceValue(value, myKeeporiginal);
231  break;
232 
233  }
234  }
235 
236  bool isParmColorRamp(exint idx) const override
237  {
238  switch (idx)
239  {
240 
241  }
242  return false;
243  }
244 
245  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
266  { doGetParmValue(idx, instance, value); }
267 
268  template <typename T>
269  void
270  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
271  {
272  if (idx.size() < 1)
273  return;
274  UT_ASSERT(idx.size() == instance.size()+1);
275  if (idx.size() != instance.size()+1)
276  return;
277  switch (idx[0])
278  {
279  case 0:
280  coerceValue(myLeftgroup, ( ( value ) ));
281  break;
282  case 1:
283  coerceValue(myRightgroup, ( ( value ) ));
284  break;
285  case 2:
286  coerceValue(myXsect, ( ( value ) ));
287  break;
288  case 3:
289  coerceValue(myTolerance, clampMinValue(0, clampMaxValue(1, value ) ));
290  break;
291  case 4:
292  coerceValue(myLeft, clampMinValue(0, clampMaxValue(3, value ) ));
293  break;
294  case 5:
295  coerceValue(myRight, clampMinValue(0, clampMaxValue(3, value ) ));
296  break;
297  case 6:
298  coerceValue(myStdswitcher, ( ( value ) ));
299  break;
300  case 7:
301  coerceValue(myAffect, clampMinValue(0, clampMaxValue(2, value ) ));
302  break;
303  case 8:
304  coerceValue(myExtractpt, ( ( value ) ));
305  break;
306  case 9:
307  coerceValue(myKeeporiginal, ( ( value ) ));
308  break;
309 
310  }
311  }
312 
313  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
334  { doSetParmValue(idx, instance, value); }
335 
336  exint getNestNumParms(TempIndex idx) const override
337  {
338  if (idx.size() == 0)
339  return 10;
340  switch (idx[0])
341  {
342 
343  }
344  // Invalid
345  return 0;
346  }
347 
348  const char *getNestParmName(TempIndex fieldnum) const override
349  {
350  if (fieldnum.size() < 1)
351  return 0;
352  switch (fieldnum[0])
353  {
354  case 0:
355  return "leftgroup";
356  case 1:
357  return "rightgroup";
358  case 2:
359  return "xsect";
360  case 3:
361  return "tolerance";
362  case 4:
363  return "left";
364  case 5:
365  return "right";
366  case 6:
367  return "stdswitcher";
368  case 7:
369  return "affect";
370  case 8:
371  return "extractPt";
372  case 9:
373  return "keepOriginal";
374 
375  }
376  return 0;
377  }
378 
379  ParmType getNestParmType(TempIndex fieldnum) const override
380  {
381  if (fieldnum.size() < 1)
382  return PARM_UNSUPPORTED;
383  switch (fieldnum[0])
384  {
385  case 0:
386  return PARM_STRING;
387  case 1:
388  return PARM_STRING;
389  case 2:
390  return PARM_INTEGER;
391  case 3:
392  return PARM_FLOAT;
393  case 4:
394  return PARM_INTEGER;
395  case 5:
396  return PARM_INTEGER;
397  case 6:
398  return PARM_INTEGER;
399  case 7:
400  return PARM_INTEGER;
401  case 8:
402  return PARM_INTEGER;
403  case 9:
404  return PARM_INTEGER;
405 
406  }
407  return PARM_UNSUPPORTED;
408  }
409 
410  // Boiler plate to load individual types.
411  static void loadData(UT_IStream &is, int64 &v)
412  { is.bread(&v, 1); }
413  static void loadData(UT_IStream &is, bool &v)
414  { int64 iv; is.bread(&iv, 1); v = iv; }
415  static void loadData(UT_IStream &is, fpreal64 &v)
416  { is.bread<fpreal64>(&v, 1); }
417  static void loadData(UT_IStream &is, UT_Vector2D &v)
418  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
419  static void loadData(UT_IStream &is, UT_Vector3D &v)
420  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
421  is.bread<fpreal64>(&v.z(), 1); }
422  static void loadData(UT_IStream &is, UT_Vector4D &v)
423  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
424  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
425  static void loadData(UT_IStream &is, UT_Matrix2D &v)
426  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
427  static void loadData(UT_IStream &is, UT_Matrix3D &v)
428  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
429  static void loadData(UT_IStream &is, UT_Matrix4D &v)
430  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
431  static void loadData(UT_IStream &is, UT_Vector2I &v)
432  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector3I &v)
434  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
435  is.bread<int64>(&v.z(), 1); }
436  static void loadData(UT_IStream &is, UT_Vector4I &v)
437  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
438  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
440  { is.bread(v); }
442  { UT_StringHolder rampdata;
443  loadData(is, rampdata);
444  if (rampdata.isstring())
445  {
446  v.reset(new UT_Ramp());
447  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
448  v->load(istr);
449  }
450  else v.reset();
451  }
454  loadData(is, data);
455  if (data.isstring())
456  {
457  // Find the data type.
458  const char *colon = UT_StringWrap(data).findChar(':');
459  if (colon)
460  {
461  int typelen = colon - data.buffer();
463  type.strncpy(data.buffer(), typelen);
464  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
465 
466  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
467  }
468  }
469  else v.reset();
470  }
471 
472  static void saveData(std::ostream &os, int64 v)
473  { UTwrite(os, &v); }
474  static void saveData(std::ostream &os, bool v)
475  { int64 iv = v; UTwrite(os, &iv); }
476  static void saveData(std::ostream &os, fpreal64 v)
477  { UTwrite<fpreal64>(os, &v); }
478  static void saveData(std::ostream &os, UT_Vector2D v)
479  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
480  static void saveData(std::ostream &os, UT_Vector3D v)
481  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
482  UTwrite<fpreal64>(os, &v.z()); }
483  static void saveData(std::ostream &os, UT_Vector4D v)
484  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
485  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
486  static void saveData(std::ostream &os, UT_Matrix2D v)
488  static void saveData(std::ostream &os, UT_Matrix3D v)
490  static void saveData(std::ostream &os, UT_Matrix4D v)
492  static void saveData(std::ostream &os, UT_StringHolder s)
493  { UT_StringWrap(s).saveBinary(os); }
494  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
496  UT_OStringStream ostr;
497  if (s) s->save(ostr);
498  result = ostr.str();
499  saveData(os, result);
500  }
501  static void saveData(std::ostream &os, PRM_DataItemHandle s)
503  UT_OStringStream ostr;
504  if (s)
505  {
506  ostr << s->getDataTypeToken();
507  ostr << ":";
508  s->saveBinary(ostr);
509  }
510  result = ostr.str();
511  saveData(os, result);
512  }
513 
514 
515  void save(std::ostream &os) const
516  {
517  int32 v = version();
518  UTwrite(os, &v);
519  saveData(os, myLeftgroup);
520  saveData(os, myRightgroup);
521  saveData(os, myXsect);
522  saveData(os, myTolerance);
523  saveData(os, myLeft);
524  saveData(os, myRight);
525  saveData(os, myStdswitcher);
526  saveData(os, myAffect);
527  saveData(os, myExtractpt);
528  saveData(os, myKeeporiginal);
529 
530  }
531 
532  bool load(UT_IStream &is)
533  {
534  int32 v;
535  is.bread(&v, 1);
536  if (version() != v)
537  {
538  // Fail incompatible versions
539  return false;
540  }
541  loadData(is, myLeftgroup);
542  loadData(is, myRightgroup);
543  loadData(is, myXsect);
544  loadData(is, myTolerance);
545  loadData(is, myLeft);
546  loadData(is, myRight);
547  loadData(is, myStdswitcher);
548  loadData(is, myAffect);
549  loadData(is, myExtractpt);
550  loadData(is, myKeeporiginal);
551 
552  return true;
553  }
554 
555  const UT_StringHolder & getLeftgroup() const { return myLeftgroup; }
556  void setLeftgroup(const UT_StringHolder & val) { myLeftgroup = val; }
558  {
559  SOP_Node *thissop = cookparms.getNode();
560  if (!thissop) return getLeftgroup();
562  OP_Utils::evalOpParm(result, thissop, "leftgroup", cookparms.getCookTime(), 0);
563  return result;
564  }
565  const UT_StringHolder & getRightgroup() const { return myRightgroup; }
566  void setRightgroup(const UT_StringHolder & val) { myRightgroup = val; }
568  {
569  SOP_Node *thissop = cookparms.getNode();
570  if (!thissop) return getRightgroup();
572  OP_Utils::evalOpParm(result, thissop, "rightgroup", cookparms.getCookTime(), 0);
573  return result;
574  }
575  bool getXsect() const { return myXsect; }
576  void setXsect(bool val) { myXsect = val; }
577  bool opXsect(const SOP_NodeVerb::CookParms &cookparms) const
578  {
579  SOP_Node *thissop = cookparms.getNode();
580  if (!thissop) return getXsect();
581  bool result;
582  OP_Utils::evalOpParm(result, thissop, "xsect", cookparms.getCookTime(), 0);
583  return result;
584  }
585  fpreal64 getTolerance() const { return myTolerance; }
586  void setTolerance(fpreal64 val) { myTolerance = val; }
588  {
589  SOP_Node *thissop = cookparms.getNode();
590  if (!thissop) return getTolerance();
592  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
593  return result;
594  }
595  Left getLeft() const { return Left(myLeft); }
596  void setLeft(Left val) { myLeft = int64(val); }
597  Left opLeft(const SOP_NodeVerb::CookParms &cookparms) const
598  {
599  SOP_Node *thissop = cookparms.getNode();
600  if (!thissop) return getLeft();
601  int64 result;
602  OP_Utils::evalOpParm(result, thissop, "left", cookparms.getCookTime(), 0);
603  return Left(result);
604  }
605  Right getRight() const { return Right(myRight); }
606  void setRight(Right val) { myRight = int64(val); }
607  Right opRight(const SOP_NodeVerb::CookParms &cookparms) const
608  {
609  SOP_Node *thissop = cookparms.getNode();
610  if (!thissop) return getRight();
611  int64 result;
612  OP_Utils::evalOpParm(result, thissop, "right", cookparms.getCookTime(), 0);
613  return Right(result);
614  }
615  int64 getStdswitcher() const { return myStdswitcher; }
616  void setStdswitcher(int64 val) { myStdswitcher = val; }
618  {
619  SOP_Node *thissop = cookparms.getNode();
620  if (!thissop) return getStdswitcher();
621  int64 result;
622  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
623  return result;
624  }
625  Affect getAffect() const { return Affect(myAffect); }
626  void setAffect(Affect val) { myAffect = int64(val); }
627  Affect opAffect(const SOP_NodeVerb::CookParms &cookparms) const
628  {
629  SOP_Node *thissop = cookparms.getNode();
630  if (!thissop) return getAffect();
631  int64 result;
632  OP_Utils::evalOpParm(result, thissop, "affect", cookparms.getCookTime(), 0);
633  return Affect(result);
634  }
635  bool getExtractpt() const { return myExtractpt; }
636  void setExtractpt(bool val) { myExtractpt = val; }
637  bool opExtractpt(const SOP_NodeVerb::CookParms &cookparms) const
638  {
639  SOP_Node *thissop = cookparms.getNode();
640  if (!thissop) return getExtractpt();
641  bool result;
642  OP_Utils::evalOpParm(result, thissop, "extractPt", cookparms.getCookTime(), 0);
643  return result;
644  }
645  bool getKeeporiginal() const { return myKeeporiginal; }
646  void setKeeporiginal(bool val) { myKeeporiginal = val; }
647  bool opKeeporiginal(const SOP_NodeVerb::CookParms &cookparms) const
648  {
649  SOP_Node *thissop = cookparms.getNode();
650  if (!thissop) return getKeeporiginal();
651  bool result;
652  OP_Utils::evalOpParm(result, thissop, "keepOriginal", cookparms.getCookTime(), 0);
653  return result;
654  }
655 
656 private:
657  UT_StringHolder myLeftgroup;
658  UT_StringHolder myRightgroup;
659  bool myXsect;
660  fpreal64 myTolerance;
661  int64 myLeft;
662  int64 myRight;
663  int64 myStdswitcher;
664  int64 myAffect;
665  bool myExtractpt;
666  bool myKeeporiginal;
667 
668 };
type
Definition: core.h:556
void save(std::ostream &os) const
bool operator!=(const SOP_CurvesectParms &src) const
bool operator==(const SOP_CurvesectParms &src) const
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
Affect getAffect() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
Right opRight(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 opStdswitcher(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
SYS_FORCE_INLINE UT_StringHolder getToken(Left enum_value)
fpreal getTime() const
Definition: OP_Context.h:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void saveData(std::ostream &os, UT_Matrix3D v)
void setKeeporiginal(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLdouble s
Definition: glad.h:3009
void setExtractpt(bool val)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, bool v)
**But if you need a result
Definition: thread.h:622
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setRightgroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, bool &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opLeftgroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setStdswitcher(int64 val)
void setAffect(Affect val)
exint length() const
Affect opAffect(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getRightgroup() const
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector4D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
bool opKeeporiginal(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void copyFrom(const OP_NodeParms *src) override
fpreal64 getTolerance() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool getKeeporiginal() const
bool load(UT_IStream &is)
long long int64
Definition: SYS_Types.h:116
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setRight(Right val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
ParmType getNestParmType(TempIndex fieldnum) const override
bool getExtractpt() const
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opExtractpt(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getLeftgroup() const
void setLeftgroup(const UT_StringHolder &val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
Left opLeft(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
bool isParmColorRamp(exint idx) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setTolerance(fpreal64 val)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
bool opXsect(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opRightgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
int64 getStdswitcher() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663