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