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