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