HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupTransfer.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myPrimitives = true;
32  myPrimgroups = ""_sh;
33  myPrimnameprefix = ""_sh;
34  myPoints = true;
35  myPointgroups = ""_sh;
36  myPointnameprefix = ""_sh;
37  myEdges = true;
38  myEdgegroups = ""_sh;
39  myEdgenameprefix = ""_sh;
40  myGroupnameconflict = "skipgroup"_sh;
41  myThreshold = true;
42  myThresholddist = 10;
43  myKeepifempty = true;
44 
45  }
46 
47  explicit SOP_GroupTransferParms(const SOP_GroupTransferParms &) = default;
48 
50 
52  {
53  if (myPrimitives != src.myPrimitives) return false;
54  if (myPrimgroups != src.myPrimgroups) return false;
55  if (myPrimnameprefix != src.myPrimnameprefix) return false;
56  if (myPoints != src.myPoints) return false;
57  if (myPointgroups != src.myPointgroups) return false;
58  if (myPointnameprefix != src.myPointnameprefix) return false;
59  if (myEdges != src.myEdges) return false;
60  if (myEdgegroups != src.myEdgegroups) return false;
61  if (myEdgenameprefix != src.myEdgenameprefix) return false;
62  if (myGroupnameconflict != src.myGroupnameconflict) return false;
63  if (myThreshold != src.myThreshold) return false;
64  if (myThresholddist != src.myThresholddist) return false;
65  if (myKeepifempty != src.myKeepifempty) return false;
66 
67  return true;
68  }
70  {
71  return !operator==(src);
72  }
73 
74 
75 
76  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
77  {
78  myPrimitives = true;
79  if (true)
80  graph->evalOpParm(myPrimitives, nodeidx, "primitives", time, 0);
81  myPrimgroups = ""_sh;
82  if (true && ( (!(((getPrimitives()==0)))) ) )
83  graph->evalOpParm(myPrimgroups, nodeidx, "primgroups", time, 0);
84  myPrimnameprefix = ""_sh;
85  if (true && ( (!(((getPrimitives()==0)))) ) )
86  graph->evalOpParm(myPrimnameprefix, nodeidx, "primnameprefix", time, 0);
87  myPoints = true;
88  if (true)
89  graph->evalOpParm(myPoints, nodeidx, "points", time, 0);
90  myPointgroups = ""_sh;
91  if (true && ( (!(((getPoints()==0)))) ) )
92  graph->evalOpParm(myPointgroups, nodeidx, "pointgroups", time, 0);
93  myPointnameprefix = ""_sh;
94  if (true && ( (!(((getPoints()==0)))) ) )
95  graph->evalOpParm(myPointnameprefix, nodeidx, "pointnameprefix", time, 0);
96  myEdges = true;
97  if (true)
98  graph->evalOpParm(myEdges, nodeidx, "edges", time, 0);
99  myEdgegroups = ""_sh;
100  if (true && ( (!(((getEdges()==0)))) ) )
101  graph->evalOpParm(myEdgegroups, nodeidx, "edgegroups", time, 0);
102  myEdgenameprefix = ""_sh;
103  if (true && ( (!(((getEdges()==0)))) ) )
104  graph->evalOpParm(myEdgenameprefix, nodeidx, "edgenameprefix", time, 0);
105  myGroupnameconflict = "skipgroup"_sh;
106  if (true)
107  graph->evalOpParm(myGroupnameconflict, nodeidx, "groupnameconflict", time, 0);
108  myThreshold = true;
109  if (true)
110  graph->evalOpParm(myThreshold, nodeidx, "threshold", time, 0);
111  myThresholddist = 10;
112  if (true && ( (!(((getThreshold()==0)))) ) )
113  graph->evalOpParm(myThresholddist, nodeidx, "thresholddist", time, 0);
114  myKeepifempty = true;
115  if (true)
116  graph->evalOpParm(myKeepifempty, nodeidx, "keepifempty", time, 0);
117 
118  }
119 
120 
121  void loadFromOpSubclass(const LoadParms &loadparms) override
122  {
123  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
124  }
125 
126 
127  void copyFrom(const SOP_NodeParms *src) override
128  {
129  *this = *((const SOP_GroupTransferParms *)src);
130  }
131 
132  template <typename T>
133  void
134  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
135  {
136  if (idx.size() < 1)
137  return;
138  UT_ASSERT(idx.size() == instance.size()+1);
139  if (idx.size() != instance.size()+1)
140  return;
141  switch (idx[0])
142  {
143  case 0:
144  coerceValue(value, myPrimitives);
145  break;
146  case 1:
147  coerceValue(value, myPrimgroups);
148  break;
149  case 2:
150  coerceValue(value, myPrimnameprefix);
151  break;
152  case 3:
153  coerceValue(value, myPoints);
154  break;
155  case 4:
156  coerceValue(value, myPointgroups);
157  break;
158  case 5:
159  coerceValue(value, myPointnameprefix);
160  break;
161  case 6:
162  coerceValue(value, myEdges);
163  break;
164  case 7:
165  coerceValue(value, myEdgegroups);
166  break;
167  case 8:
168  coerceValue(value, myEdgenameprefix);
169  break;
170  case 9:
171  coerceValue(value, myGroupnameconflict);
172  break;
173  case 10:
174  coerceValue(value, myThreshold);
175  break;
176  case 11:
177  coerceValue(value, myThresholddist);
178  break;
179  case 12:
180  coerceValue(value, myKeepifempty);
181  break;
182 
183  }
184  }
185 
186  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
187  { doGetParmValue(idx, instance, value); }
188  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
189  { doGetParmValue(idx, instance, value); }
190  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
191  { doGetParmValue(idx, instance, value); }
192  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
193  { doGetParmValue(idx, instance, value); }
194  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
195  { doGetParmValue(idx, instance, value); }
196  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
197  { doGetParmValue(idx, instance, value); }
198  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
199  { doGetParmValue(idx, instance, value); }
200  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
201  { doGetParmValue(idx, instance, value); }
202  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
203  { doGetParmValue(idx, instance, value); }
204  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
207  { doGetParmValue(idx, instance, value); }
208 
209  template <typename T>
210  void
211  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
212  {
213  if (idx.size() < 1)
214  return;
215  UT_ASSERT(idx.size() == instance.size()+1);
216  if (idx.size() != instance.size()+1)
217  return;
218  switch (idx[0])
219  {
220  case 0:
221  coerceValue(myPrimitives, value);
222  break;
223  case 1:
224  coerceValue(myPrimgroups, value);
225  break;
226  case 2:
227  coerceValue(myPrimnameprefix, value);
228  break;
229  case 3:
230  coerceValue(myPoints, value);
231  break;
232  case 4:
233  coerceValue(myPointgroups, value);
234  break;
235  case 5:
236  coerceValue(myPointnameprefix, value);
237  break;
238  case 6:
239  coerceValue(myEdges, value);
240  break;
241  case 7:
242  coerceValue(myEdgegroups, value);
243  break;
244  case 8:
245  coerceValue(myEdgenameprefix, value);
246  break;
247  case 9:
248  coerceValue(myGroupnameconflict, value);
249  break;
250  case 10:
251  coerceValue(myThreshold, value);
252  break;
253  case 11:
254  coerceValue(myThresholddist, value);
255  break;
256  case 12:
257  coerceValue(myKeepifempty, value);
258  break;
259 
260  }
261  }
262 
263  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
264  { doSetParmValue(idx, instance, value); }
265  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
266  { doSetParmValue(idx, instance, value); }
267  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
268  { doSetParmValue(idx, instance, value); }
269  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
270  { doSetParmValue(idx, instance, value); }
271  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
272  { doSetParmValue(idx, instance, value); }
273  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
274  { doSetParmValue(idx, instance, value); }
275  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
276  { doSetParmValue(idx, instance, value); }
277  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
278  { doSetParmValue(idx, instance, value); }
279  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
280  { doSetParmValue(idx, instance, value); }
281  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
284  { doSetParmValue(idx, instance, value); }
285 
286  exint getNestNumParms(TempIndex idx) const override
287  {
288  if (idx.size() == 0)
289  return 13;
290  switch (idx[0])
291  {
292 
293  }
294  // Invalid
295  return 0;
296  }
297 
298  const char *getNestParmName(TempIndex fieldnum) const override
299  {
300  if (fieldnum.size() < 1)
301  return 0;
302  switch (fieldnum[0])
303  {
304  case 0:
305  return "primitives";
306  case 1:
307  return "primgroups";
308  case 2:
309  return "primnameprefix";
310  case 3:
311  return "points";
312  case 4:
313  return "pointgroups";
314  case 5:
315  return "pointnameprefix";
316  case 6:
317  return "edges";
318  case 7:
319  return "edgegroups";
320  case 8:
321  return "edgenameprefix";
322  case 9:
323  return "groupnameconflict";
324  case 10:
325  return "threshold";
326  case 11:
327  return "thresholddist";
328  case 12:
329  return "keepifempty";
330 
331  }
332  return 0;
333  }
334 
335  ParmType getNestParmType(TempIndex fieldnum) const override
336  {
337  if (fieldnum.size() < 1)
338  return PARM_UNSUPPORTED;
339  switch (fieldnum[0])
340  {
341  case 0:
342  return PARM_INTEGER;
343  case 1:
344  return PARM_STRING;
345  case 2:
346  return PARM_STRING;
347  case 3:
348  return PARM_INTEGER;
349  case 4:
350  return PARM_STRING;
351  case 5:
352  return PARM_STRING;
353  case 6:
354  return PARM_INTEGER;
355  case 7:
356  return PARM_STRING;
357  case 8:
358  return PARM_STRING;
359  case 9:
360  return PARM_STRING;
361  case 10:
362  return PARM_INTEGER;
363  case 11:
364  return PARM_FLOAT;
365  case 12:
366  return PARM_INTEGER;
367 
368  }
369  return PARM_UNSUPPORTED;
370  }
371 
372  // Boiler plate to load individual types.
373  static void loadData(UT_IStream &is, int64 &v)
374  { is.bread(&v, 1); }
375  static void loadData(UT_IStream &is, bool &v)
376  { int64 iv; is.bread(&iv, 1); v = iv; }
377  static void loadData(UT_IStream &is, fpreal64 &v)
378  { is.bread<fpreal64>(&v, 1); }
379  static void loadData(UT_IStream &is, UT_Vector2D &v)
380  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
381  static void loadData(UT_IStream &is, UT_Vector3D &v)
382  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
383  is.bread<fpreal64>(&v.z(), 1); }
384  static void loadData(UT_IStream &is, UT_Vector4D &v)
385  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
386  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
387  static void loadData(UT_IStream &is, UT_Matrix2D &v)
388  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
389  static void loadData(UT_IStream &is, UT_Matrix3D &v)
390  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
391  static void loadData(UT_IStream &is, UT_Matrix4D &v)
392  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
393  static void loadData(UT_IStream &is, UT_Vector2I &v)
394  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
395  static void loadData(UT_IStream &is, UT_Vector3I &v)
396  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
397  is.bread<int64>(&v.z(), 1); }
398  static void loadData(UT_IStream &is, UT_Vector4I &v)
399  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
400  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
402  { is.bread(v); }
404  { UT_StringHolder rampdata;
405  loadData(is, rampdata);
406  if (rampdata.isstring())
407  {
408  v.reset(new UT_Ramp());
409  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
410  v->load(istr);
411  }
412  else v.reset();
413  }
416  loadData(is, data);
417  if (data.isstring())
418  {
419  // Find the data type.
420  const char *colon = UT_StringWrap(data).findChar(':');
421  if (colon)
422  {
423  int typelen = colon - data.buffer();
425  type.strncpy(data.buffer(), typelen);
426  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
427 
428  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
429  }
430  }
431  else v.reset();
432  }
433 
434  static void saveData(std::ostream &os, int64 v)
435  { UTwrite(os, &v); }
436  static void saveData(std::ostream &os, bool v)
437  { int64 iv = v; UTwrite(os, &iv); }
438  static void saveData(std::ostream &os, fpreal64 v)
439  { UTwrite<fpreal64>(os, &v); }
440  static void saveData(std::ostream &os, UT_Vector2D v)
441  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
442  static void saveData(std::ostream &os, UT_Vector3D v)
443  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
444  UTwrite<fpreal64>(os, &v.z()); }
445  static void saveData(std::ostream &os, UT_Vector4D v)
446  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
447  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
448  static void saveData(std::ostream &os, UT_Matrix2D v)
450  static void saveData(std::ostream &os, UT_Matrix3D v)
452  static void saveData(std::ostream &os, UT_Matrix4D v)
454  static void saveData(std::ostream &os, UT_StringHolder s)
455  { UT_StringWrap(s).saveBinary(os); }
456  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
458  UT_OStringStream ostr;
459  if (s) s->save(ostr);
460  result = ostr.str();
461  saveData(os, result);
462  }
463  static void saveData(std::ostream &os, PRM_DataItemHandle s)
465  UT_OStringStream ostr;
466  if (s)
467  {
468  ostr << s->getDataTypeToken();
469  ostr << ":";
470  s->saveBinary(ostr);
471  }
472  result = ostr.str();
473  saveData(os, result);
474  }
475 
476 
477  void save(std::ostream &os) const
478  {
479  int32 v = version();
480  UTwrite(os, &v);
481  saveData(os, myPrimitives);
482  saveData(os, myPrimgroups);
483  saveData(os, myPrimnameprefix);
484  saveData(os, myPoints);
485  saveData(os, myPointgroups);
486  saveData(os, myPointnameprefix);
487  saveData(os, myEdges);
488  saveData(os, myEdgegroups);
489  saveData(os, myEdgenameprefix);
490  saveData(os, myGroupnameconflict);
491  saveData(os, myThreshold);
492  saveData(os, myThresholddist);
493  saveData(os, myKeepifempty);
494 
495  }
496 
497  bool load(UT_IStream &is)
498  {
499  int32 v;
500  is.bread(&v, 1);
501  if (version() != v)
502  {
503  // Fail incompatible versions
504  return false;
505  }
506  loadData(is, myPrimitives);
507  loadData(is, myPrimgroups);
508  loadData(is, myPrimnameprefix);
509  loadData(is, myPoints);
510  loadData(is, myPointgroups);
511  loadData(is, myPointnameprefix);
512  loadData(is, myEdges);
513  loadData(is, myEdgegroups);
514  loadData(is, myEdgenameprefix);
515  loadData(is, myGroupnameconflict);
516  loadData(is, myThreshold);
517  loadData(is, myThresholddist);
518  loadData(is, myKeepifempty);
519 
520  return true;
521  }
522 
523  bool getPrimitives() const { return myPrimitives; }
524  void setPrimitives(bool val) { myPrimitives = val; }
525  bool opPrimitives(const SOP_NodeVerb::CookParms &cookparms) const
526  {
527  SOP_Node *thissop = cookparms.getNode();
528  if (!thissop) return getPrimitives();
529  bool result;
530  OP_Utils::evalOpParm(result, thissop, "primitives", cookparms.getCookTime(), 0);
531  return result;
532  }
533  const UT_StringHolder & getPrimgroups() const { return myPrimgroups; }
534  void setPrimgroups(const UT_StringHolder & val) { myPrimgroups = val; }
536  {
537  SOP_Node *thissop = cookparms.getNode();
538  if (!thissop) return getPrimgroups();
540  OP_Utils::evalOpParm(result, thissop, "primgroups", cookparms.getCookTime(), 0);
541  return result;
542  }
543  const UT_StringHolder & getPrimnameprefix() const { return myPrimnameprefix; }
544  void setPrimnameprefix(const UT_StringHolder & val) { myPrimnameprefix = val; }
546  {
547  SOP_Node *thissop = cookparms.getNode();
548  if (!thissop) return getPrimnameprefix();
550  OP_Utils::evalOpParm(result, thissop, "primnameprefix", cookparms.getCookTime(), 0);
551  return result;
552  }
553  bool getPoints() const { return myPoints; }
554  void setPoints(bool val) { myPoints = val; }
555  bool opPoints(const SOP_NodeVerb::CookParms &cookparms) const
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getPoints();
559  bool result;
560  OP_Utils::evalOpParm(result, thissop, "points", cookparms.getCookTime(), 0);
561  return result;
562  }
563  const UT_StringHolder & getPointgroups() const { return myPointgroups; }
564  void setPointgroups(const UT_StringHolder & val) { myPointgroups = val; }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getPointgroups();
570  OP_Utils::evalOpParm(result, thissop, "pointgroups", cookparms.getCookTime(), 0);
571  return result;
572  }
573  const UT_StringHolder & getPointnameprefix() const { return myPointnameprefix; }
574  void setPointnameprefix(const UT_StringHolder & val) { myPointnameprefix = val; }
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getPointnameprefix();
580  OP_Utils::evalOpParm(result, thissop, "pointnameprefix", cookparms.getCookTime(), 0);
581  return result;
582  }
583  bool getEdges() const { return myEdges; }
584  void setEdges(bool val) { myEdges = val; }
585  bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getEdges();
589  bool result;
590  OP_Utils::evalOpParm(result, thissop, "edges", cookparms.getCookTime(), 0);
591  return result;
592  }
593  const UT_StringHolder & getEdgegroups() const { return myEdgegroups; }
594  void setEdgegroups(const UT_StringHolder & val) { myEdgegroups = val; }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getEdgegroups();
600  OP_Utils::evalOpParm(result, thissop, "edgegroups", cookparms.getCookTime(), 0);
601  return result;
602  }
603  const UT_StringHolder & getEdgenameprefix() const { return myEdgenameprefix; }
604  void setEdgenameprefix(const UT_StringHolder & val) { myEdgenameprefix = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getEdgenameprefix();
610  OP_Utils::evalOpParm(result, thissop, "edgenameprefix", cookparms.getCookTime(), 0);
611  return result;
612  }
613  const UT_StringHolder & getGroupnameconflict() const { return myGroupnameconflict; }
614  void setGroupnameconflict(const UT_StringHolder & val) { myGroupnameconflict = val; }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getGroupnameconflict();
620  OP_Utils::evalOpParm(result, thissop, "groupnameconflict", cookparms.getCookTime(), 0);
621  return result;
622  }
623  bool getThreshold() const { return myThreshold; }
624  void setThreshold(bool val) { myThreshold = val; }
625  bool opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getThreshold();
629  bool result;
630  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
631  return result;
632  }
633  fpreal64 getThresholddist() const { return myThresholddist; }
634  void setThresholddist(fpreal64 val) { myThresholddist = val; }
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getThresholddist();
640  OP_Utils::evalOpParm(result, thissop, "thresholddist", cookparms.getCookTime(), 0);
641  return result;
642  }
643  bool getKeepifempty() const { return myKeepifempty; }
644  void setKeepifempty(bool val) { myKeepifempty = val; }
645  bool opKeepifempty(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getKeepifempty();
649  bool result;
650  OP_Utils::evalOpParm(result, thissop, "keepifempty", cookparms.getCookTime(), 0);
651  return result;
652  }
653 
654 private:
655  bool myPrimitives;
656  UT_StringHolder myPrimgroups;
657  UT_StringHolder myPrimnameprefix;
658  bool myPoints;
659  UT_StringHolder myPointgroups;
660  UT_StringHolder myPointnameprefix;
661  bool myEdges;
662  UT_StringHolder myEdgegroups;
663  UT_StringHolder myEdgenameprefix;
664  UT_StringHolder myGroupnameconflict;
665  bool myThreshold;
666  fpreal64 myThresholddist;
667  bool myKeepifempty;
668 
669 };
GLdouble s
Definition: glew.h:1390
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void saveData(std::ostream &os, UT_StringHolder s)
GLenum src
Definition: glew.h:2410
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
const UT_StringHolder & getGroupnameconflict() const
UT_StringHolder opPointgroups(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setGroupnameconflict(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal getTime() const
Definition: OP_Context.h:60
bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
Definition: glew.h:2794
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
UT_StringHolder opGroupnameconflict(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opPointnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const GLdouble * v
Definition: glew.h:1391
fpreal64 getThresholddist() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_StringHolder opPrimnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
const UT_StringHolder & getPrimgroups() const
void copyFrom(const SOP_NodeParms *src) override
void setEdgegroups(const UT_StringHolder &val)
double fpreal64
Definition: SYS_Types.h:201
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opEdgenameprefix(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getPointnameprefix() const
void setEdgenameprefix(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
fpreal64 opThresholddist(const SOP_NodeVerb::CookParms &cookparms) const
bool opKeepifempty(const SOP_NodeVerb::CookParms &cookparms) const
bool opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
const UT_StringHolder & getPrimnameprefix() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const GLfloat * c
Definition: glew.h:16296
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
long long int64
Definition: SYS_Types.h:116
void setPrimgroups(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator==(const SOP_GroupTransferParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
const UT_StringHolder & getEdgenameprefix() const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_StringHolder opPrimgroups(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setPointgroups(const UT_StringHolder &val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
const UT_StringHolder & getPointgroups() const
void setThresholddist(fpreal64 val)
#define SOP_API
Definition: SOP_API.h:10
bool operator!=(const SOP_GroupTransferParms &src) const
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
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLuint64EXT * result
Definition: glew.h:14007
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix2D v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_StringHolder opEdgegroups(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GLsizei const GLfloat * value
Definition: glew.h:1849
const UT_StringHolder & getEdgegroups() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opPrimitives(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setPointnameprefix(const UT_StringHolder &val)
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setPrimnameprefix(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, bool &v)