HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolySplit2.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_PolySplit2Enums
24 {
25  enum class Pathtype
26  {
27  SHORTEST = 0,
28  QUADCUT
29  };
30 
32  getToken(Pathtype enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Pathtype::SHORTEST: return "shortest"_sh;
37  case Pathtype::QUADCUT: return "quadcut"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  mySplitloc = ""_UTsh;
53  myPathtype = 0;
54  myClose = false;
55  myAllowfaces = true;
56  myQuadcomplete = false;
57  myNumloops = 0;
58  myParallellooptoggle = false;
59  myParallelfliptoggle = false;
60  myEdgepercenttoggle = false;
61  myEdgepercent = 0.5;
62  myUpdatenorms = true;
63  myGrouptoggle = false;
64  myGroupname = "splitPathGroup"_UTsh;
65  myGroupappend = false;
66  myGroupexclude = false;
67  myTolerance = 1e-05;
68 
69  }
70 
71  explicit SOP_PolySplit2Parms(const SOP_PolySplit2Parms &) = default;
73  SOP_PolySplit2Parms(SOP_PolySplit2Parms &&) noexcept = default;
74  SOP_PolySplit2Parms &operator=(SOP_PolySplit2Parms &&) noexcept = default;
75 
76  ~SOP_PolySplit2Parms() override {}
77 
78  bool operator==(const SOP_PolySplit2Parms &src) const
79  {
80  if (mySplitloc != src.mySplitloc) return false;
81  if (myPathtype != src.myPathtype) return false;
82  if (myClose != src.myClose) return false;
83  if (myAllowfaces != src.myAllowfaces) return false;
84  if (myQuadcomplete != src.myQuadcomplete) return false;
85  if (myNumloops != src.myNumloops) return false;
86  if (myParallellooptoggle != src.myParallellooptoggle) return false;
87  if (myParallelfliptoggle != src.myParallelfliptoggle) return false;
88  if (myEdgepercenttoggle != src.myEdgepercenttoggle) return false;
89  if (myEdgepercent != src.myEdgepercent) return false;
90  if (myUpdatenorms != src.myUpdatenorms) return false;
91  if (myGrouptoggle != src.myGrouptoggle) return false;
92  if (myGroupname != src.myGroupname) return false;
93  if (myGroupappend != src.myGroupappend) return false;
94  if (myGroupexclude != src.myGroupexclude) return false;
95  if (myTolerance != src.myTolerance) return false;
96 
97 
98  if (baseGetSignature() != src.baseGetSignature()) return false;
99 
100  return true;
101  }
102  bool operator!=(const SOP_PolySplit2Parms &src) const
103  {
104  return !operator==(src);
105  }
107 
108 
109 
110  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
111  {
112  mySplitloc = ""_UTsh;
113  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1)))) ) )
114  graph->evalOpParm(mySplitloc, nodeidx, "splitloc", time, graph->isDirect()?nullptr:depnode);
115  myPathtype = 0;
116  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1)))) ) )
117  graph->evalOpParm(myPathtype, nodeidx, "pathtype", time, graph->isDirect()?nullptr:depnode);
118  myClose = false;
119  if (true && ( (true&&!(((int64(getPathtype())!=0))||(((graph->getInput(nodeidx,1)>=0)==1)))) ) )
120  graph->evalOpParm(myClose, nodeidx, "close", time, graph->isDirect()?nullptr:depnode);
121  myAllowfaces = true;
122  if (true && ( (true&&!(((int64(getPathtype())!=0)&&((graph->getInput(nodeidx,1)>=0)==0)))) ) )
123  graph->evalOpParm(myAllowfaces, nodeidx, "allowfaces", time, graph->isDirect()?nullptr:depnode);
124  myQuadcomplete = false;
125  if (true && ( (true&&!(((int64(getPathtype())!=0)&&((graph->getInput(nodeidx,1)>=0)==0)))) ) )
126  graph->evalOpParm(myQuadcomplete, nodeidx, "quadcomplete", time, graph->isDirect()?nullptr:depnode);
127  myNumloops = 0;
128  if (true && ( (true&&!(((int64(getPathtype())!=1))||(((graph->getInput(nodeidx,1)>=0)==1)))) ) )
129  graph->evalOpParm(myNumloops, nodeidx, "numloops", time, graph->isDirect()?nullptr:depnode);
130  myParallellooptoggle = false;
131  if (true && ( (true&&!(((int64(getPathtype())!=1))||(((graph->getInput(nodeidx,1)>=0)==1)))) ) )
132  graph->evalOpParm(myParallellooptoggle, nodeidx, "parallellooptoggle", time, graph->isDirect()?nullptr:depnode);
133  myParallelfliptoggle = false;
134  if (true && ( (true&&!(((int64(getPathtype())!=1))||(((graph->getInput(nodeidx,1)>=0)==1))||((getParallellooptoggle()==0)))) ) )
135  graph->evalOpParm(myParallelfliptoggle, nodeidx, "parallelfliptoggle", time, graph->isDirect()?nullptr:depnode);
136  myEdgepercenttoggle = false;
137  if (true && ( (true&&!(((int64(getPathtype())==1)&&((graph->getInput(nodeidx,1)>=0)==0)&&(int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
138  graph->evalOpParm(myEdgepercenttoggle, nodeidx, "edgepercenttoggle", time, graph->isDirect()?nullptr:depnode);
139  myEdgepercent = 0.5;
140  if (true && ( (true&&!(((getEdgepercenttoggle()==0))||((int64(getPathtype())==1)&&((graph->getInput(nodeidx,1)>=0)==0)&&(int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
141  graph->evalOpParm(myEdgepercent, nodeidx, "edgepercent", time, graph->isDirect()?nullptr:depnode);
142  myUpdatenorms = true;
143  if (true)
144  graph->evalOpParm(myUpdatenorms, nodeidx, "updatenorms", time, graph->isDirect()?nullptr:depnode);
145  myGrouptoggle = false;
146  if (true)
147  graph->evalOpParm(myGrouptoggle, nodeidx, "grouptoggle", time, graph->isDirect()?nullptr:depnode);
148  myGroupname = "splitPathGroup"_UTsh;
149  if (true && ( (true&&!(((getGrouptoggle()==0)))) ) )
150  graph->evalOpParm(myGroupname, nodeidx, "groupname", time, graph->isDirect()?nullptr:depnode);
151  myGroupappend = false;
152  if (true && ( (true&&!(((getGrouptoggle()==0)))) ) )
153  graph->evalOpParm(myGroupappend, nodeidx, "groupappend", time, graph->isDirect()?nullptr:depnode);
154  myGroupexclude = false;
155  if (true && ( (true&&!(((getGrouptoggle()==0)))) ) )
156  graph->evalOpParm(myGroupexclude, nodeidx, "groupexclude", time, graph->isDirect()?nullptr:depnode);
157  myTolerance = 1e-05;
158  if (true)
159  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, graph->isDirect()?nullptr:depnode);
160 
161  }
162 
163 
164  void loadFromOpSubclass(const LoadParms &loadparms) override
165  {
166  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
167  }
168 
169 
170  void copyFrom(const OP_NodeParms *src) override
171  {
172  *this = *((const SOP_PolySplit2Parms *)src);
173  }
174 
175  template <typename T>
176  void
177  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
178  {
179  if (idx.size() < 1)
180  return;
181  UT_ASSERT(idx.size() == instance.size()+1);
182  if (idx.size() != instance.size()+1)
183  return;
184  switch (idx[0])
185  {
186  case 0:
187  coerceValue(value, mySplitloc);
188  break;
189  case 1:
190  coerceValue(value, myPathtype);
191  break;
192  case 2:
193  coerceValue(value, myClose);
194  break;
195  case 3:
196  coerceValue(value, myAllowfaces);
197  break;
198  case 4:
199  coerceValue(value, myQuadcomplete);
200  break;
201  case 5:
202  coerceValue(value, myNumloops);
203  break;
204  case 6:
205  coerceValue(value, myParallellooptoggle);
206  break;
207  case 7:
208  coerceValue(value, myParallelfliptoggle);
209  break;
210  case 8:
211  coerceValue(value, myEdgepercenttoggle);
212  break;
213  case 9:
214  coerceValue(value, myEdgepercent);
215  break;
216  case 10:
217  coerceValue(value, myUpdatenorms);
218  break;
219  case 11:
220  coerceValue(value, myGrouptoggle);
221  break;
222  case 12:
223  coerceValue(value, myGroupname);
224  break;
225  case 13:
226  coerceValue(value, myGroupappend);
227  break;
228  case 14:
229  coerceValue(value, myGroupexclude);
230  break;
231  case 15:
232  coerceValue(value, myTolerance);
233  break;
234 
235  }
236  }
237 
238  bool isParmColorRamp(exint idx) const override
239  {
240  switch (idx)
241  {
242 
243  }
244  return false;
245  }
246 
247  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
268  { doGetParmValue(idx, instance, value); }
269 
270  template <typename T>
271  void
272  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
273  {
274  if (idx.size() < 1)
275  return;
276  UT_ASSERT(idx.size() == instance.size()+1);
277  if (idx.size() != instance.size()+1)
278  return;
279  switch (idx[0])
280  {
281  case 0:
282  coerceValue(mySplitloc, ( ( value ) ));
283  break;
284  case 1:
285  coerceValue(myPathtype, clampMinValue(0, clampMaxValue(1, value ) ));
286  break;
287  case 2:
288  coerceValue(myClose, ( ( value ) ));
289  break;
290  case 3:
291  coerceValue(myAllowfaces, ( ( value ) ));
292  break;
293  case 4:
294  coerceValue(myQuadcomplete, ( ( value ) ));
295  break;
296  case 5:
297  coerceValue(myNumloops, ( ( value ) ));
298  break;
299  case 6:
300  coerceValue(myParallellooptoggle, ( ( value ) ));
301  break;
302  case 7:
303  coerceValue(myParallelfliptoggle, ( ( value ) ));
304  break;
305  case 8:
306  coerceValue(myEdgepercenttoggle, ( ( value ) ));
307  break;
308  case 9:
309  coerceValue(myEdgepercent, clampMinValue(0, clampMaxValue(1, value ) ));
310  break;
311  case 10:
312  coerceValue(myUpdatenorms, ( ( value ) ));
313  break;
314  case 11:
315  coerceValue(myGrouptoggle, ( ( value ) ));
316  break;
317  case 12:
318  coerceValue(myGroupname, ( ( value ) ));
319  break;
320  case 13:
321  coerceValue(myGroupappend, ( ( value ) ));
322  break;
323  case 14:
324  coerceValue(myGroupexclude, ( ( value ) ));
325  break;
326  case 15:
327  coerceValue(myTolerance, clampMinValue(0, ( value ) ));
328  break;
329 
330  }
331  }
332 
333  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
348  { doSetParmValue(idx, instance, value); }
349  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
350  { doSetParmValue(idx, instance, value); }
351  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
352  { doSetParmValue(idx, instance, value); }
353  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
354  { doSetParmValue(idx, instance, value); }
355 
356  exint getNestNumParms(TempIndex idx) const override
357  {
358  if (idx.size() == 0)
359  return 16;
360  switch (idx[0])
361  {
362 
363  }
364  // Invalid
365  return 0;
366  }
367 
368  const char *getNestParmName(TempIndex fieldnum) const override
369  {
370  if (fieldnum.size() < 1)
371  return 0;
372  switch (fieldnum[0])
373  {
374  case 0:
375  return "splitloc";
376  case 1:
377  return "pathtype";
378  case 2:
379  return "close";
380  case 3:
381  return "allowfaces";
382  case 4:
383  return "quadcomplete";
384  case 5:
385  return "numloops";
386  case 6:
387  return "parallellooptoggle";
388  case 7:
389  return "parallelfliptoggle";
390  case 8:
391  return "edgepercenttoggle";
392  case 9:
393  return "edgepercent";
394  case 10:
395  return "updatenorms";
396  case 11:
397  return "grouptoggle";
398  case 12:
399  return "groupname";
400  case 13:
401  return "groupappend";
402  case 14:
403  return "groupexclude";
404  case 15:
405  return "tolerance";
406 
407  }
408  return 0;
409  }
410 
411  ParmType getNestParmType(TempIndex fieldnum) const override
412  {
413  if (fieldnum.size() < 1)
414  return PARM_UNSUPPORTED;
415  switch (fieldnum[0])
416  {
417  case 0:
418  return PARM_STRING;
419  case 1:
420  return PARM_INTEGER;
421  case 2:
422  return PARM_INTEGER;
423  case 3:
424  return PARM_INTEGER;
425  case 4:
426  return PARM_INTEGER;
427  case 5:
428  return PARM_INTEGER;
429  case 6:
430  return PARM_INTEGER;
431  case 7:
432  return PARM_INTEGER;
433  case 8:
434  return PARM_INTEGER;
435  case 9:
436  return PARM_FLOAT;
437  case 10:
438  return PARM_INTEGER;
439  case 11:
440  return PARM_INTEGER;
441  case 12:
442  return PARM_STRING;
443  case 13:
444  return PARM_INTEGER;
445  case 14:
446  return PARM_INTEGER;
447  case 15:
448  return PARM_FLOAT;
449 
450  }
451  return PARM_UNSUPPORTED;
452  }
453 
454  // Boiler plate to load individual types.
455  static void loadData(UT_IStream &is, int64 &v)
456  { is.bread(&v, 1); }
457  static void loadData(UT_IStream &is, bool &v)
458  { int64 iv; is.bread(&iv, 1); v = iv; }
459  static void loadData(UT_IStream &is, fpreal64 &v)
460  { is.bread<fpreal64>(&v, 1); }
461  static void loadData(UT_IStream &is, UT_Vector2D &v)
462  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
463  static void loadData(UT_IStream &is, UT_Vector3D &v)
464  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
465  is.bread<fpreal64>(&v.z(), 1); }
466  static void loadData(UT_IStream &is, UT_Vector4D &v)
467  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
468  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
469  static void loadData(UT_IStream &is, UT_Matrix2D &v)
470  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
471  static void loadData(UT_IStream &is, UT_Matrix3D &v)
472  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
473  static void loadData(UT_IStream &is, UT_Matrix4D &v)
474  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
475  static void loadData(UT_IStream &is, UT_Vector2I &v)
476  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
477  static void loadData(UT_IStream &is, UT_Vector3I &v)
478  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
479  is.bread<int64>(&v.z(), 1); }
480  static void loadData(UT_IStream &is, UT_Vector4I &v)
481  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
482  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
484  { is.bread(v); }
486  { UT_StringHolder rampdata;
487  loadData(is, rampdata);
488  if (rampdata.isstring())
489  {
490  v.reset(new UT_Ramp());
491  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
492  v->load(istr);
493  }
494  else v.reset();
495  }
498  loadData(is, data);
499  if (data.isstring())
500  {
501  // Find the data type.
502  const char *colon = UT_StringWrap(data).findChar(':');
503  if (colon)
504  {
505  int typelen = colon - data.buffer();
507  type.strncpy(data.buffer(), typelen);
508  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
509 
510  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
511  }
512  }
513  else v.reset();
514  }
515 
516  static void saveData(std::ostream &os, int64 v)
517  { UTwrite(os, &v); }
518  static void saveData(std::ostream &os, bool v)
519  { int64 iv = v; UTwrite(os, &iv); }
520  static void saveData(std::ostream &os, fpreal64 v)
521  { UTwrite<fpreal64>(os, &v); }
522  static void saveData(std::ostream &os, UT_Vector2D v)
523  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
524  static void saveData(std::ostream &os, UT_Vector3D v)
525  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
526  UTwrite<fpreal64>(os, &v.z()); }
527  static void saveData(std::ostream &os, UT_Vector4D v)
528  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
529  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
530  static void saveData(std::ostream &os, UT_Matrix2D v)
532  static void saveData(std::ostream &os, UT_Matrix3D v)
534  static void saveData(std::ostream &os, UT_Matrix4D v)
536  static void saveData(std::ostream &os, UT_StringHolder s)
537  { UT_StringWrap(s).saveBinary(os); }
538  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
540  UT_OStringStream ostr;
541  if (s) s->save(ostr);
542  result = ostr.str();
543  saveData(os, result);
544  }
545  static void saveData(std::ostream &os, PRM_DataItemHandle s)
547  UT_OStringStream ostr;
548  if (s)
549  {
550  ostr << s->getDataTypeToken();
551  ostr << ":";
552  s->saveBinary(ostr);
553  }
554  result = ostr.str();
555  saveData(os, result);
556  }
557 
558 
559  void save(std::ostream &os) const
560  {
561  int32 v = version();
562  UTwrite(os, &v);
563  saveData(os, mySplitloc);
564  saveData(os, myPathtype);
565  saveData(os, myClose);
566  saveData(os, myAllowfaces);
567  saveData(os, myQuadcomplete);
568  saveData(os, myNumloops);
569  saveData(os, myParallellooptoggle);
570  saveData(os, myParallelfliptoggle);
571  saveData(os, myEdgepercenttoggle);
572  saveData(os, myEdgepercent);
573  saveData(os, myUpdatenorms);
574  saveData(os, myGrouptoggle);
575  saveData(os, myGroupname);
576  saveData(os, myGroupappend);
577  saveData(os, myGroupexclude);
578  saveData(os, myTolerance);
579 
580  }
581 
582  bool load(UT_IStream &is)
583  {
584  int32 v;
585  is.bread(&v, 1);
586  if (version() != v)
587  {
588  // Fail incompatible versions
589  return false;
590  }
591  loadData(is, mySplitloc);
592  loadData(is, myPathtype);
593  loadData(is, myClose);
594  loadData(is, myAllowfaces);
595  loadData(is, myQuadcomplete);
596  loadData(is, myNumloops);
597  loadData(is, myParallellooptoggle);
598  loadData(is, myParallelfliptoggle);
599  loadData(is, myEdgepercenttoggle);
600  loadData(is, myEdgepercent);
601  loadData(is, myUpdatenorms);
602  loadData(is, myGrouptoggle);
603  loadData(is, myGroupname);
604  loadData(is, myGroupappend);
605  loadData(is, myGroupexclude);
606  loadData(is, myTolerance);
607 
608  return true;
609  }
610 
611  const UT_StringHolder & getSplitloc() const { return mySplitloc; }
612  void setSplitloc(const UT_StringHolder & val) { mySplitloc = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getSplitloc();
618  OP_Utils::evalOpParm(result, thissop, "splitloc", cookparms.getCookTime(), 0);
619  return result;
620  }
621  Pathtype getPathtype() const { return Pathtype(myPathtype); }
622  void setPathtype(Pathtype val) { myPathtype = int64(val); }
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getPathtype();
627  int64 result;
628  OP_Utils::evalOpParm(result, thissop, "pathtype", cookparms.getCookTime(), 0);
629  return Pathtype(result);
630  }
631  bool getClose() const { return myClose; }
632  void setClose(bool val) { myClose = val; }
633  bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getClose();
637  bool result;
638  OP_Utils::evalOpParm(result, thissop, "close", cookparms.getCookTime(), 0);
639  return result;
640  }
641  bool getAllowfaces() const { return myAllowfaces; }
642  void setAllowfaces(bool val) { myAllowfaces = val; }
643  bool opAllowfaces(const SOP_NodeVerb::CookParms &cookparms) const
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getAllowfaces();
647  bool result;
648  OP_Utils::evalOpParm(result, thissop, "allowfaces", cookparms.getCookTime(), 0);
649  return result;
650  }
651  bool getQuadcomplete() const { return myQuadcomplete; }
652  void setQuadcomplete(bool val) { myQuadcomplete = val; }
653  bool opQuadcomplete(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getQuadcomplete();
657  bool result;
658  OP_Utils::evalOpParm(result, thissop, "quadcomplete", cookparms.getCookTime(), 0);
659  return result;
660  }
661  int64 getNumloops() const { return myNumloops; }
662  void setNumloops(int64 val) { myNumloops = val; }
663  int64 opNumloops(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getNumloops();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "numloops", cookparms.getCookTime(), 0);
669  return result;
670  }
671  bool getParallellooptoggle() const { return myParallellooptoggle; }
672  void setParallellooptoggle(bool val) { myParallellooptoggle = val; }
673  bool opParallellooptoggle(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getParallellooptoggle();
677  bool result;
678  OP_Utils::evalOpParm(result, thissop, "parallellooptoggle", cookparms.getCookTime(), 0);
679  return result;
680  }
681  bool getParallelfliptoggle() const { return myParallelfliptoggle; }
682  void setParallelfliptoggle(bool val) { myParallelfliptoggle = val; }
683  bool opParallelfliptoggle(const SOP_NodeVerb::CookParms &cookparms) const
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getParallelfliptoggle();
687  bool result;
688  OP_Utils::evalOpParm(result, thissop, "parallelfliptoggle", cookparms.getCookTime(), 0);
689  return result;
690  }
691  bool getEdgepercenttoggle() const { return myEdgepercenttoggle; }
692  void setEdgepercenttoggle(bool val) { myEdgepercenttoggle = val; }
693  bool opEdgepercenttoggle(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getEdgepercenttoggle();
697  bool result;
698  OP_Utils::evalOpParm(result, thissop, "edgepercenttoggle", cookparms.getCookTime(), 0);
699  return result;
700  }
701  fpreal64 getEdgepercent() const { return myEdgepercent; }
702  void setEdgepercent(fpreal64 val) { myEdgepercent = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getEdgepercent();
708  OP_Utils::evalOpParm(result, thissop, "edgepercent", cookparms.getCookTime(), 0);
709  return result;
710  }
711  bool getUpdatenorms() const { return myUpdatenorms; }
712  void setUpdatenorms(bool val) { myUpdatenorms = val; }
713  bool opUpdatenorms(const SOP_NodeVerb::CookParms &cookparms) const
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getUpdatenorms();
717  bool result;
718  OP_Utils::evalOpParm(result, thissop, "updatenorms", cookparms.getCookTime(), 0);
719  return result;
720  }
721  bool getGrouptoggle() const { return myGrouptoggle; }
722  void setGrouptoggle(bool val) { myGrouptoggle = val; }
723  bool opGrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getGrouptoggle();
727  bool result;
728  OP_Utils::evalOpParm(result, thissop, "grouptoggle", cookparms.getCookTime(), 0);
729  return result;
730  }
731  const UT_StringHolder & getGroupname() const { return myGroupname; }
732  void setGroupname(const UT_StringHolder & val) { myGroupname = val; }
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getGroupname();
738  OP_Utils::evalOpParm(result, thissop, "groupname", cookparms.getCookTime(), 0);
739  return result;
740  }
741  bool getGroupappend() const { return myGroupappend; }
742  void setGroupappend(bool val) { myGroupappend = val; }
743  bool opGroupappend(const SOP_NodeVerb::CookParms &cookparms) const
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getGroupappend();
747  bool result;
748  OP_Utils::evalOpParm(result, thissop, "groupappend", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getGroupexclude() const { return myGroupexclude; }
752  void setGroupexclude(bool val) { myGroupexclude = val; }
753  bool opGroupexclude(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getGroupexclude();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "groupexclude", cookparms.getCookTime(), 0);
759  return result;
760  }
761  fpreal64 getTolerance() const { return myTolerance; }
762  void setTolerance(fpreal64 val) { myTolerance = val; }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getTolerance();
768  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
769  return result;
770  }
771 
772 private:
773  UT_StringHolder mySplitloc;
774  int64 myPathtype;
775  bool myClose;
776  bool myAllowfaces;
777  bool myQuadcomplete;
778  int64 myNumloops;
779  bool myParallellooptoggle;
780  bool myParallelfliptoggle;
781  bool myEdgepercenttoggle;
782  fpreal64 myEdgepercent;
783  bool myUpdatenorms;
784  bool myGrouptoggle;
785  UT_StringHolder myGroupname;
786  bool myGroupappend;
787  bool myGroupexclude;
788  fpreal64 myTolerance;
789 
790 };
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
bool opParallelfliptoggle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getSplitloc() const
type
Definition: core.h:556
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opSplitloc(const SOP_NodeVerb::CookParms &cookparms) const
void setEdgepercent(fpreal64 val)
bool opUpdatenorms(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
bool operator!=(const SOP_PolySplit2Parms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
int int32
Definition: SYS_Types.h:39
void setGroupappend(bool val)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
fpreal64 getEdgepercent() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 opEdgepercent(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
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
fpreal getTime() const
Definition: OP_Context.h:63
static void saveData(std::ostream &os, UT_Vector4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void copyFrom(const OP_NodeParms *src) override
void setNumloops(int64 val)
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setAllowfaces(bool val)
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
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void setParallellooptoggle(bool val)
An output stream object that owns its own string buffer storage.
int64 opNumloops(const SOP_NodeVerb::CookParms &cookparms) const
bool opGrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
**But if you need a result
Definition: thread.h:622
static void saveData(std::ostream &os, UT_Vector3D v)
bool opParallellooptoggle(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opAllowfaces(const SOP_NodeVerb::CookParms &cookparms) const
void setSplitloc(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Matrix3D 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
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Pathtype enum_value)
static void saveData(std::ostream &os, int64 v)
void setUpdatenorms(bool val)
void setEdgepercenttoggle(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
bool opEdgepercenttoggle(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getParallellooptoggle() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setGrouptoggle(bool val)
ParmType getNestParmType(TempIndex fieldnum) const override
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setParallelfliptoggle(bool val)
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
bool opQuadcomplete(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool isParmColorRamp(exint idx) const override
void setQuadcomplete(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool load(UT_IStream &is)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool getEdgepercenttoggle() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getParallelfliptoggle() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
bool opGroupexclude(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
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 opGroupappend(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void setGroupexclude(bool val)
Pathtype opPathtype(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal64 getTolerance() const
void setPathtype(Pathtype val)
void setTolerance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_StringHolder opGroupname(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
Pathtype getPathtype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool operator==(const SOP_PolySplit2Parms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
void save(std::ostream &os) const
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getGroupname() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setGroupname(const UT_StringHolder &val)
GLenum src
Definition: glcorearb.h:1793
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override