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