HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupExpand.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_GroupExpandEnums
24 {
25  enum class Grouptype
26  {
27  AUTO = 0,
28  VERTICES,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33  enum class Colgrouptype
34  {
35  AUTO = 0,
36  EDGES,
37  POINTS,
38  PRIMS,
39  VERTICES
40  };
41 }
42 
43 
45 {
46 public:
47  static int version() { return 1; }
48 
50  {
51  myOutputgroup = ""_sh;
52  myGroup = ""_sh;
53  myGrouptype = 0;
54  myPrimshareedge = false;
55  myFloodfill = false;
56  myNumsteps = 1;
57  myUsestepattrib = false;
58  myStepattrib = "step"_sh;
59  myBynormal = false;
60  myNormalangle = 60;
61  myOverridenormal = false;
62  myNormalattrib = "N"_sh;
63  myUseconnectivityattrib = false;
64  myConnectivityattrib = "uv"_sh;
65  myUsecolgroup = false;
66  myColgroup = ""_sh;
67  myColgrouptype = 0;
68  myColgroupinvert = false;
69  myColgroupallowonbound = false;
70 
71  }
72 
73  explicit SOP_GroupExpandParms(const SOP_GroupExpandParms &) = default;
74 
75  ~SOP_GroupExpandParms() override {}
76 
77  bool operator==(const SOP_GroupExpandParms &src) const
78  {
79  if (myOutputgroup != src.myOutputgroup) return false;
80  if (myGroup != src.myGroup) return false;
81  if (myGrouptype != src.myGrouptype) return false;
82  if (myPrimshareedge != src.myPrimshareedge) return false;
83  if (myFloodfill != src.myFloodfill) return false;
84  if (myNumsteps != src.myNumsteps) return false;
85  if (myUsestepattrib != src.myUsestepattrib) return false;
86  if (myStepattrib != src.myStepattrib) return false;
87  if (myBynormal != src.myBynormal) return false;
88  if (myNormalangle != src.myNormalangle) return false;
89  if (myOverridenormal != src.myOverridenormal) return false;
90  if (myNormalattrib != src.myNormalattrib) return false;
91  if (myUseconnectivityattrib != src.myUseconnectivityattrib) return false;
92  if (myConnectivityattrib != src.myConnectivityattrib) return false;
93  if (myUsecolgroup != src.myUsecolgroup) return false;
94  if (myColgroup != src.myColgroup) return false;
95  if (myColgrouptype != src.myColgrouptype) return false;
96  if (myColgroupinvert != src.myColgroupinvert) return false;
97  if (myColgroupallowonbound != src.myColgroupallowonbound) return false;
98 
99  return true;
100  }
102  {
103  return !operator==(src);
104  }
107 
108 
109 
110  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
111  {
112  myOutputgroup = ""_sh;
113  if (true)
114  graph->evalOpParm(myOutputgroup, nodeidx, "outputgroup", time, 0);
115  myGroup = ""_sh;
116  if (true)
117  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
118  myGrouptype = 0;
119  if (true)
120  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
121  myPrimshareedge = false;
122  if (true && ( (!(((int64(getGrouptype())==1))||((int64(getGrouptype())==2))||((int64(getGrouptype())==3)))) ) )
123  graph->evalOpParm(myPrimshareedge, nodeidx, "primshareedge", time, 0);
124  myFloodfill = false;
125  if (true)
126  graph->evalOpParm(myFloodfill, nodeidx, "floodfill", time, 0);
127  myNumsteps = 1;
128  if (true && ( (!(((getFloodfill()==1)))) ) )
129  graph->evalOpParm(myNumsteps, nodeidx, "numsteps", time, 0);
130  myUsestepattrib = false;
131  if (true)
132  graph->evalOpParm(myUsestepattrib, nodeidx, "usestepattrib", time, 0);
133  myStepattrib = "step"_sh;
134  if (true && ( (!(((getUsestepattrib()==0)))) ) )
135  graph->evalOpParm(myStepattrib, nodeidx, "stepattrib", time, 0);
136  myBynormal = false;
137  if (true)
138  graph->evalOpParm(myBynormal, nodeidx, "bynormal", time, 0);
139  myNormalangle = 60;
140  if (true && ( (!(((getBynormal()==0)))) ) )
141  graph->evalOpParm(myNormalangle, nodeidx, "normalangle", time, 0);
142  myOverridenormal = false;
143  if (true && ( (!(((getBynormal()==0)))) ) )
144  graph->evalOpParm(myOverridenormal, nodeidx, "overridenormal", time, 0);
145  myNormalattrib = "N"_sh;
146  if (true && ( (!(((getBynormal()==0))||((getOverridenormal()==0)))) ) )
147  graph->evalOpParm(myNormalattrib, nodeidx, "normalattrib", time, 0);
148  myUseconnectivityattrib = false;
149  if (true)
150  graph->evalOpParm(myUseconnectivityattrib, nodeidx, "useconnectivityattrib", time, 0);
151  myConnectivityattrib = "uv"_sh;
152  if (true && ( (!(((getUseconnectivityattrib()==0)))) ) )
153  graph->evalOpParm(myConnectivityattrib, nodeidx, "connectivityattrib", time, 0);
154  myUsecolgroup = false;
155  if (true)
156  graph->evalOpParm(myUsecolgroup, nodeidx, "usecolgroup", time, 0);
157  myColgroup = ""_sh;
158  if (true && ( (!(((getUsecolgroup()==0)))) ) )
159  graph->evalOpParm(myColgroup, nodeidx, "colgroup", time, 0);
160  myColgrouptype = 0;
161  if (true && ( (!(((getUsecolgroup()==0)))) ) )
162  graph->evalOpParm(myColgrouptype, nodeidx, "colgrouptype", time, 0);
163  myColgroupinvert = false;
164  if (true && ( (!(((getUsecolgroup()==0)))) ) )
165  graph->evalOpParm(myColgroupinvert, nodeidx, "colgroupinvert", time, 0);
166  myColgroupallowonbound = false;
167  if (true && ( (!(((getUsecolgroup()==0))||((getColgroupinvert()==1)))) ) )
168  graph->evalOpParm(myColgroupallowonbound, nodeidx, "colgroupallowonbound", time, 0);
169 
170  }
171 
172 
173  void loadFromOpSubclass(const LoadParms &loadparms) override
174  {
175  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
176  }
177 
178 
179  void copyFrom(const SOP_NodeParms *src) override
180  {
181  *this = *((const SOP_GroupExpandParms *)src);
182  }
183 
184  template <typename T>
185  void
186  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
187  {
188  if (idx.size() < 1)
189  return;
190  UT_ASSERT(idx.size() == instance.size()+1);
191  if (idx.size() != instance.size()+1)
192  return;
193  switch (idx[0])
194  {
195  case 0:
196  coerceValue(value, myOutputgroup);
197  break;
198  case 1:
199  coerceValue(value, myGroup);
200  break;
201  case 2:
202  coerceValue(value, myGrouptype);
203  break;
204  case 3:
205  coerceValue(value, myPrimshareedge);
206  break;
207  case 4:
208  coerceValue(value, myFloodfill);
209  break;
210  case 5:
211  coerceValue(value, myNumsteps);
212  break;
213  case 6:
214  coerceValue(value, myUsestepattrib);
215  break;
216  case 7:
217  coerceValue(value, myStepattrib);
218  break;
219  case 8:
220  coerceValue(value, myBynormal);
221  break;
222  case 9:
223  coerceValue(value, myNormalangle);
224  break;
225  case 10:
226  coerceValue(value, myOverridenormal);
227  break;
228  case 11:
229  coerceValue(value, myNormalattrib);
230  break;
231  case 12:
232  coerceValue(value, myUseconnectivityattrib);
233  break;
234  case 13:
235  coerceValue(value, myConnectivityattrib);
236  break;
237  case 14:
238  coerceValue(value, myUsecolgroup);
239  break;
240  case 15:
241  coerceValue(value, myColgroup);
242  break;
243  case 16:
244  coerceValue(value, myColgrouptype);
245  break;
246  case 17:
247  coerceValue(value, myColgroupinvert);
248  break;
249  case 18:
250  coerceValue(value, myColgroupallowonbound);
251  break;
252 
253  }
254  }
255 
256  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
277  { doGetParmValue(idx, instance, value); }
278 
279  template <typename T>
280  void
281  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
282  {
283  if (idx.size() < 1)
284  return;
285  UT_ASSERT(idx.size() == instance.size()+1);
286  if (idx.size() != instance.size()+1)
287  return;
288  switch (idx[0])
289  {
290  case 0:
291  coerceValue(myOutputgroup, value);
292  break;
293  case 1:
294  coerceValue(myGroup, value);
295  break;
296  case 2:
297  coerceValue(myGrouptype, value);
298  break;
299  case 3:
300  coerceValue(myPrimshareedge, value);
301  break;
302  case 4:
303  coerceValue(myFloodfill, value);
304  break;
305  case 5:
306  coerceValue(myNumsteps, value);
307  break;
308  case 6:
309  coerceValue(myUsestepattrib, value);
310  break;
311  case 7:
312  coerceValue(myStepattrib, value);
313  break;
314  case 8:
315  coerceValue(myBynormal, value);
316  break;
317  case 9:
318  coerceValue(myNormalangle, value);
319  break;
320  case 10:
321  coerceValue(myOverridenormal, value);
322  break;
323  case 11:
324  coerceValue(myNormalattrib, value);
325  break;
326  case 12:
327  coerceValue(myUseconnectivityattrib, value);
328  break;
329  case 13:
330  coerceValue(myConnectivityattrib, value);
331  break;
332  case 14:
333  coerceValue(myUsecolgroup, value);
334  break;
335  case 15:
336  coerceValue(myColgroup, value);
337  break;
338  case 16:
339  coerceValue(myColgrouptype, value);
340  break;
341  case 17:
342  coerceValue(myColgroupinvert, value);
343  break;
344  case 18:
345  coerceValue(myColgroupallowonbound, value);
346  break;
347 
348  }
349  }
350 
351  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
352  { doSetParmValue(idx, instance, value); }
353  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
354  { doSetParmValue(idx, instance, value); }
355  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
356  { doSetParmValue(idx, instance, value); }
357  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
358  { doSetParmValue(idx, instance, value); }
359  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
360  { doSetParmValue(idx, instance, value); }
361  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
362  { doSetParmValue(idx, instance, value); }
363  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
364  { doSetParmValue(idx, instance, value); }
365  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
366  { doSetParmValue(idx, instance, value); }
367  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
372  { doSetParmValue(idx, instance, value); }
373 
374  exint getNestNumParms(TempIndex idx) const override
375  {
376  if (idx.size() == 0)
377  return 19;
378  switch (idx[0])
379  {
380 
381  }
382  // Invalid
383  return 0;
384  }
385 
386  const char *getNestParmName(TempIndex fieldnum) const override
387  {
388  if (fieldnum.size() < 1)
389  return 0;
390  switch (fieldnum[0])
391  {
392  case 0:
393  return "outputgroup";
394  case 1:
395  return "group";
396  case 2:
397  return "grouptype";
398  case 3:
399  return "primshareedge";
400  case 4:
401  return "floodfill";
402  case 5:
403  return "numsteps";
404  case 6:
405  return "usestepattrib";
406  case 7:
407  return "stepattrib";
408  case 8:
409  return "bynormal";
410  case 9:
411  return "normalangle";
412  case 10:
413  return "overridenormal";
414  case 11:
415  return "normalattrib";
416  case 12:
417  return "useconnectivityattrib";
418  case 13:
419  return "connectivityattrib";
420  case 14:
421  return "usecolgroup";
422  case 15:
423  return "colgroup";
424  case 16:
425  return "colgrouptype";
426  case 17:
427  return "colgroupinvert";
428  case 18:
429  return "colgroupallowonbound";
430 
431  }
432  return 0;
433  }
434 
435  ParmType getNestParmType(TempIndex fieldnum) const override
436  {
437  if (fieldnum.size() < 1)
438  return PARM_UNSUPPORTED;
439  switch (fieldnum[0])
440  {
441  case 0:
442  return PARM_STRING;
443  case 1:
444  return PARM_STRING;
445  case 2:
446  return PARM_INTEGER;
447  case 3:
448  return PARM_INTEGER;
449  case 4:
450  return PARM_INTEGER;
451  case 5:
452  return PARM_INTEGER;
453  case 6:
454  return PARM_INTEGER;
455  case 7:
456  return PARM_STRING;
457  case 8:
458  return PARM_INTEGER;
459  case 9:
460  return PARM_FLOAT;
461  case 10:
462  return PARM_INTEGER;
463  case 11:
464  return PARM_STRING;
465  case 12:
466  return PARM_INTEGER;
467  case 13:
468  return PARM_STRING;
469  case 14:
470  return PARM_INTEGER;
471  case 15:
472  return PARM_STRING;
473  case 16:
474  return PARM_INTEGER;
475  case 17:
476  return PARM_INTEGER;
477  case 18:
478  return PARM_INTEGER;
479 
480  }
481  return PARM_UNSUPPORTED;
482  }
483 
484  // Boiler plate to load individual types.
485  static void loadData(UT_IStream &is, int64 &v)
486  { is.bread(&v, 1); }
487  static void loadData(UT_IStream &is, bool &v)
488  { int64 iv; is.bread(&iv, 1); v = iv; }
489  static void loadData(UT_IStream &is, fpreal64 &v)
490  { is.bread<fpreal64>(&v, 1); }
491  static void loadData(UT_IStream &is, UT_Vector2D &v)
492  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
493  static void loadData(UT_IStream &is, UT_Vector3D &v)
494  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
495  is.bread<fpreal64>(&v.z(), 1); }
496  static void loadData(UT_IStream &is, UT_Vector4D &v)
497  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
498  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
499  static void loadData(UT_IStream &is, UT_Matrix2D &v)
500  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
501  static void loadData(UT_IStream &is, UT_Matrix3D &v)
502  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
503  static void loadData(UT_IStream &is, UT_Matrix4D &v)
504  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
505  static void loadData(UT_IStream &is, UT_Vector2I &v)
506  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
507  static void loadData(UT_IStream &is, UT_Vector3I &v)
508  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
509  is.bread<int64>(&v.z(), 1); }
510  static void loadData(UT_IStream &is, UT_Vector4I &v)
511  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
512  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
514  { is.bread(v); }
516  { UT_StringHolder rampdata;
517  loadData(is, rampdata);
518  if (rampdata.isstring())
519  {
520  v.reset(new UT_Ramp());
521  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
522  v->load(istr);
523  }
524  else v.reset();
525  }
528  loadData(is, data);
529  if (data.isstring())
530  {
531  // Find the data type.
532  const char *colon = UT_StringWrap(data).findChar(':');
533  if (colon)
534  {
535  int typelen = colon - data.buffer();
537  type.strncpy(data.buffer(), typelen);
538  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
539 
540  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
541  }
542  }
543  else v.reset();
544  }
545 
546  static void saveData(std::ostream &os, int64 v)
547  { UTwrite(os, &v); }
548  static void saveData(std::ostream &os, bool v)
549  { int64 iv = v; UTwrite(os, &iv); }
550  static void saveData(std::ostream &os, fpreal64 v)
551  { UTwrite<fpreal64>(os, &v); }
552  static void saveData(std::ostream &os, UT_Vector2D v)
553  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
554  static void saveData(std::ostream &os, UT_Vector3D v)
555  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
556  UTwrite<fpreal64>(os, &v.z()); }
557  static void saveData(std::ostream &os, UT_Vector4D v)
558  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
559  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
560  static void saveData(std::ostream &os, UT_Matrix2D v)
562  static void saveData(std::ostream &os, UT_Matrix3D v)
564  static void saveData(std::ostream &os, UT_Matrix4D v)
566  static void saveData(std::ostream &os, UT_StringHolder s)
567  { UT_StringWrap(s).saveBinary(os); }
568  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
570  UT_OStringStream ostr;
571  if (s) s->save(ostr);
572  result = ostr.str();
573  saveData(os, result);
574  }
575  static void saveData(std::ostream &os, PRM_DataItemHandle s)
577  UT_OStringStream ostr;
578  if (s)
579  {
580  ostr << s->getDataTypeToken();
581  ostr << ":";
582  s->saveBinary(ostr);
583  }
584  result = ostr.str();
585  saveData(os, result);
586  }
587 
588 
589  void save(std::ostream &os) const
590  {
591  int32 v = version();
592  UTwrite(os, &v);
593  saveData(os, myOutputgroup);
594  saveData(os, myGroup);
595  saveData(os, myGrouptype);
596  saveData(os, myPrimshareedge);
597  saveData(os, myFloodfill);
598  saveData(os, myNumsteps);
599  saveData(os, myUsestepattrib);
600  saveData(os, myStepattrib);
601  saveData(os, myBynormal);
602  saveData(os, myNormalangle);
603  saveData(os, myOverridenormal);
604  saveData(os, myNormalattrib);
605  saveData(os, myUseconnectivityattrib);
606  saveData(os, myConnectivityattrib);
607  saveData(os, myUsecolgroup);
608  saveData(os, myColgroup);
609  saveData(os, myColgrouptype);
610  saveData(os, myColgroupinvert);
611  saveData(os, myColgroupallowonbound);
612 
613  }
614 
615  bool load(UT_IStream &is)
616  {
617  int32 v;
618  is.bread(&v, 1);
619  if (version() != v)
620  {
621  // Fail incompatible versions
622  return false;
623  }
624  loadData(is, myOutputgroup);
625  loadData(is, myGroup);
626  loadData(is, myGrouptype);
627  loadData(is, myPrimshareedge);
628  loadData(is, myFloodfill);
629  loadData(is, myNumsteps);
630  loadData(is, myUsestepattrib);
631  loadData(is, myStepattrib);
632  loadData(is, myBynormal);
633  loadData(is, myNormalangle);
634  loadData(is, myOverridenormal);
635  loadData(is, myNormalattrib);
636  loadData(is, myUseconnectivityattrib);
637  loadData(is, myConnectivityattrib);
638  loadData(is, myUsecolgroup);
639  loadData(is, myColgroup);
640  loadData(is, myColgrouptype);
641  loadData(is, myColgroupinvert);
642  loadData(is, myColgroupallowonbound);
643 
644  return true;
645  }
646 
647  const UT_StringHolder & getOutputgroup() const { return myOutputgroup; }
648  void setOutputgroup(const UT_StringHolder & val) { myOutputgroup = val; }
650  {
651  SOP_Node *thissop = cookparms.getNode();
652  if (!thissop) return getOutputgroup();
654  OP_Utils::evalOpParm(result, thissop, "outputgroup", cookparms.getCookTime(), 0);
655  return result;
656  }
657  const UT_StringHolder & getGroup() const { return myGroup; }
658  void setGroup(const UT_StringHolder & val) { myGroup = val; }
660  {
661  SOP_Node *thissop = cookparms.getNode();
662  if (!thissop) return getGroup();
664  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
665  return result;
666  }
667  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
668  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getGrouptype();
673  int64 result;
674  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
675  return Grouptype(result);
676  }
677  bool getPrimshareedge() const { return myPrimshareedge; }
678  void setPrimshareedge(bool val) { myPrimshareedge = val; }
679  bool opPrimshareedge(const SOP_NodeVerb::CookParms &cookparms) const
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getPrimshareedge();
683  bool result;
684  OP_Utils::evalOpParm(result, thissop, "primshareedge", cookparms.getCookTime(), 0);
685  return result;
686  }
687  bool getFloodfill() const { return myFloodfill; }
688  void setFloodfill(bool val) { myFloodfill = val; }
689  bool opFloodfill(const SOP_NodeVerb::CookParms &cookparms) const
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getFloodfill();
693  bool result;
694  OP_Utils::evalOpParm(result, thissop, "floodfill", cookparms.getCookTime(), 0);
695  return result;
696  }
697  int64 getNumsteps() const { return myNumsteps; }
698  void setNumsteps(int64 val) { myNumsteps = val; }
699  int64 opNumsteps(const SOP_NodeVerb::CookParms &cookparms) const
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getNumsteps();
703  int64 result;
704  OP_Utils::evalOpParm(result, thissop, "numsteps", cookparms.getCookTime(), 0);
705  return result;
706  }
707  bool getUsestepattrib() const { return myUsestepattrib; }
708  void setUsestepattrib(bool val) { myUsestepattrib = val; }
709  bool opUsestepattrib(const SOP_NodeVerb::CookParms &cookparms) const
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getUsestepattrib();
713  bool result;
714  OP_Utils::evalOpParm(result, thissop, "usestepattrib", cookparms.getCookTime(), 0);
715  return result;
716  }
717  const UT_StringHolder & getStepattrib() const { return myStepattrib; }
718  void setStepattrib(const UT_StringHolder & val) { myStepattrib = val; }
720  {
721  SOP_Node *thissop = cookparms.getNode();
722  if (!thissop) return getStepattrib();
724  OP_Utils::evalOpParm(result, thissop, "stepattrib", cookparms.getCookTime(), 0);
725  return result;
726  }
727  bool getBynormal() const { return myBynormal; }
728  void setBynormal(bool val) { myBynormal = val; }
729  bool opBynormal(const SOP_NodeVerb::CookParms &cookparms) const
730  {
731  SOP_Node *thissop = cookparms.getNode();
732  if (!thissop) return getBynormal();
733  bool result;
734  OP_Utils::evalOpParm(result, thissop, "bynormal", cookparms.getCookTime(), 0);
735  return result;
736  }
737  fpreal64 getNormalangle() const { return myNormalangle; }
738  void setNormalangle(fpreal64 val) { myNormalangle = val; }
740  {
741  SOP_Node *thissop = cookparms.getNode();
742  if (!thissop) return getNormalangle();
744  OP_Utils::evalOpParm(result, thissop, "normalangle", cookparms.getCookTime(), 0);
745  return result;
746  }
747  bool getOverridenormal() const { return myOverridenormal; }
748  void setOverridenormal(bool val) { myOverridenormal = val; }
749  bool opOverridenormal(const SOP_NodeVerb::CookParms &cookparms) const
750  {
751  SOP_Node *thissop = cookparms.getNode();
752  if (!thissop) return getOverridenormal();
753  bool result;
754  OP_Utils::evalOpParm(result, thissop, "overridenormal", cookparms.getCookTime(), 0);
755  return result;
756  }
757  const UT_StringHolder & getNormalattrib() const { return myNormalattrib; }
758  void setNormalattrib(const UT_StringHolder & val) { myNormalattrib = val; }
760  {
761  SOP_Node *thissop = cookparms.getNode();
762  if (!thissop) return getNormalattrib();
764  OP_Utils::evalOpParm(result, thissop, "normalattrib", cookparms.getCookTime(), 0);
765  return result;
766  }
767  bool getUseconnectivityattrib() const { return myUseconnectivityattrib; }
768  void setUseconnectivityattrib(bool val) { myUseconnectivityattrib = val; }
770  {
771  SOP_Node *thissop = cookparms.getNode();
772  if (!thissop) return getUseconnectivityattrib();
773  bool result;
774  OP_Utils::evalOpParm(result, thissop, "useconnectivityattrib", cookparms.getCookTime(), 0);
775  return result;
776  }
777  const UT_StringHolder & getConnectivityattrib() const { return myConnectivityattrib; }
778  void setConnectivityattrib(const UT_StringHolder & val) { myConnectivityattrib = val; }
780  {
781  SOP_Node *thissop = cookparms.getNode();
782  if (!thissop) return getConnectivityattrib();
784  OP_Utils::evalOpParm(result, thissop, "connectivityattrib", cookparms.getCookTime(), 0);
785  return result;
786  }
787  bool getUsecolgroup() const { return myUsecolgroup; }
788  void setUsecolgroup(bool val) { myUsecolgroup = val; }
789  bool opUsecolgroup(const SOP_NodeVerb::CookParms &cookparms) const
790  {
791  SOP_Node *thissop = cookparms.getNode();
792  if (!thissop) return getUsecolgroup();
793  bool result;
794  OP_Utils::evalOpParm(result, thissop, "usecolgroup", cookparms.getCookTime(), 0);
795  return result;
796  }
797  const UT_StringHolder & getColgroup() const { return myColgroup; }
798  void setColgroup(const UT_StringHolder & val) { myColgroup = val; }
800  {
801  SOP_Node *thissop = cookparms.getNode();
802  if (!thissop) return getColgroup();
804  OP_Utils::evalOpParm(result, thissop, "colgroup", cookparms.getCookTime(), 0);
805  return result;
806  }
807  Colgrouptype getColgrouptype() const { return Colgrouptype(myColgrouptype); }
808  void setColgrouptype(Colgrouptype val) { myColgrouptype = int64(val); }
810  {
811  SOP_Node *thissop = cookparms.getNode();
812  if (!thissop) return getColgrouptype();
813  int64 result;
814  OP_Utils::evalOpParm(result, thissop, "colgrouptype", cookparms.getCookTime(), 0);
815  return Colgrouptype(result);
816  }
817  bool getColgroupinvert() const { return myColgroupinvert; }
818  void setColgroupinvert(bool val) { myColgroupinvert = val; }
819  bool opColgroupinvert(const SOP_NodeVerb::CookParms &cookparms) const
820  {
821  SOP_Node *thissop = cookparms.getNode();
822  if (!thissop) return getColgroupinvert();
823  bool result;
824  OP_Utils::evalOpParm(result, thissop, "colgroupinvert", cookparms.getCookTime(), 0);
825  return result;
826  }
827  bool getColgroupallowonbound() const { return myColgroupallowonbound; }
828  void setColgroupallowonbound(bool val) { myColgroupallowonbound = val; }
829  bool opColgroupallowonbound(const SOP_NodeVerb::CookParms &cookparms) const
830  {
831  SOP_Node *thissop = cookparms.getNode();
832  if (!thissop) return getColgroupallowonbound();
833  bool result;
834  OP_Utils::evalOpParm(result, thissop, "colgroupallowonbound", cookparms.getCookTime(), 0);
835  return result;
836  }
837 
838 private:
839  UT_StringHolder myOutputgroup;
840  UT_StringHolder myGroup;
841  int64 myGrouptype;
842  bool myPrimshareedge;
843  bool myFloodfill;
844  int64 myNumsteps;
845  bool myUsestepattrib;
846  UT_StringHolder myStepattrib;
847  bool myBynormal;
848  fpreal64 myNormalangle;
849  bool myOverridenormal;
850  UT_StringHolder myNormalattrib;
851  bool myUseconnectivityattrib;
852  UT_StringHolder myConnectivityattrib;
853  bool myUsecolgroup;
854  UT_StringHolder myColgroup;
855  int64 myColgrouptype;
856  bool myColgroupinvert;
857  bool myColgroupallowonbound;
858 
859 };
GLdouble s
Definition: glew.h:1390
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opOutputgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setConnectivityattrib(const UT_StringHolder &val)
const UT_StringHolder & getConnectivityattrib() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLenum src
Definition: glew.h:2410
bool opColgroupinvert(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const UT_StringHolder & getColgroup() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void loadData(UT_IStream &is, int64 &v)
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool load(UT_IStream &is)
exint bread(int32 *buffer, exint asize=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
fpreal64 getNormalangle() const
void setColgroupinvert(bool val)
GLuint const GLfloat * val
Definition: glew.h:2794
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void copyFrom(const SOP_NodeParms *src) override
bool getUseconnectivityattrib() const
const UT_StringHolder & getStepattrib() const
bool opOverridenormal(const SOP_NodeVerb::CookParms &cookparms) const
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void saveData(std::ostream &os, UT_Matrix3D v)
Colgrouptype opColgrouptype(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setStepattrib(const UT_StringHolder &val)
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opPrimshareedge(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setOverridenormal(bool val)
exint getNestNumParms(TempIndex idx) const override
Colgrouptype getColgrouptype() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
bool opUseconnectivityattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opColgroupallowonbound(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint length() const
UT_StringHolder opColgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void setOutputgroup(const UT_StringHolder &val)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, int64 v)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const GLfloat * c
Definition: glew.h:16296
void setColgrouptype(Colgrouptype val)
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_StringHolder & getOutputgroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Grouptype getGrouptype() const
void setUseconnectivityattrib(bool val)
UT_StringHolder opConnectivityattrib(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_StringHolder & getNormalattrib() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator==(const SOP_GroupExpandParms &src) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, bool &v)
void setColgroupallowonbound(bool val)
void setNormalattrib(const UT_StringHolder &val)
void setColgroup(const UT_StringHolder &val)
bool opUsestepattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
UT_StringHolder opNormalattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void save(std::ostream &os) const
bool opUsecolgroup(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void setGrouptype(Grouptype val)
#define SOP_API
Definition: SOP_API.h:10
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
bool getColgroupallowonbound() const
GLuint64EXT * result
Definition: glew.h:14007
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 opNumsteps(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 opNormalangle(const SOP_NodeVerb::CookParms &cookparms) const
void setNormalangle(fpreal64 val)
bool opBynormal(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool opFloodfill(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
UT_StringHolder opStepattrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
bool operator!=(const SOP_GroupExpandParms &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const