HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupCopy.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  myEnableMatchByPrimAttrib = false;
35  myMatchByPrimAttrib = "name"_UTsh;
36  myPoints = true;
37  myPointgroups = ""_UTsh;
38  myPointnameprefix = ""_UTsh;
39  myEnableMatchByPointAttrib = false;
40  myMatchByPointAttrib = "id"_UTsh;
41  myEdges = true;
42  myEdgegroups = ""_UTsh;
43  myEdgenameprefix = ""_UTsh;
44  myVertices = false;
45  myVertexgroups = ""_UTsh;
46  myVertexnameprefix = ""_UTsh;
47  myEnableMatchByVertexAttrib = false;
48  myMatchByVertexAttrib = "id"_UTsh;
49  myGroupnameconflict = "skipgroup"_UTsh;
50  myCopyemptygroups = true;
51 
52  }
53 
54  explicit SOP_GroupCopyParms(const SOP_GroupCopyParms &) = default;
56  SOP_GroupCopyParms(SOP_GroupCopyParms &&) noexcept = default;
57  SOP_GroupCopyParms &operator=(SOP_GroupCopyParms &&) noexcept = default;
58 
59  ~SOP_GroupCopyParms() override {}
60 
61  bool operator==(const SOP_GroupCopyParms &src) const
62  {
63  if (myPrimitives != src.myPrimitives) return false;
64  if (myPrimgroups != src.myPrimgroups) return false;
65  if (myPrimnameprefix != src.myPrimnameprefix) return false;
66  if (myEnableMatchByPrimAttrib != src.myEnableMatchByPrimAttrib) return false;
67  if (myMatchByPrimAttrib != src.myMatchByPrimAttrib) return false;
68  if (myPoints != src.myPoints) return false;
69  if (myPointgroups != src.myPointgroups) return false;
70  if (myPointnameprefix != src.myPointnameprefix) return false;
71  if (myEnableMatchByPointAttrib != src.myEnableMatchByPointAttrib) return false;
72  if (myMatchByPointAttrib != src.myMatchByPointAttrib) return false;
73  if (myEdges != src.myEdges) return false;
74  if (myEdgegroups != src.myEdgegroups) return false;
75  if (myEdgenameprefix != src.myEdgenameprefix) return false;
76  if (myVertices != src.myVertices) return false;
77  if (myVertexgroups != src.myVertexgroups) return false;
78  if (myVertexnameprefix != src.myVertexnameprefix) return false;
79  if (myEnableMatchByVertexAttrib != src.myEnableMatchByVertexAttrib) return false;
80  if (myMatchByVertexAttrib != src.myMatchByVertexAttrib) return false;
81  if (myGroupnameconflict != src.myGroupnameconflict) return false;
82  if (myCopyemptygroups != src.myCopyemptygroups) return false;
83 
84  return true;
85  }
86  bool operator!=(const SOP_GroupCopyParms &src) const
87  {
88  return !operator==(src);
89  }
90 
91 
92 
93  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
94  {
95  myPrimitives = true;
96  if (true)
97  graph->evalOpParm(myPrimitives, nodeidx, "primitives", time, 0);
98  myPrimgroups = ""_UTsh;
99  if (true && ( (true&&!(((getPrimitives()==0)))) ) )
100  graph->evalOpParm(myPrimgroups, nodeidx, "primgroups", time, 0);
101  myPrimnameprefix = ""_UTsh;
102  if (true && ( (true&&!(((getPrimitives()==0)))) ) )
103  graph->evalOpParm(myPrimnameprefix, nodeidx, "primnameprefix", time, 0);
104  myEnableMatchByPrimAttrib = false;
105  if (true && ( (true&&!(((getPrimitives()==0)))) ) )
106  graph->evalOpParm(myEnableMatchByPrimAttrib, nodeidx, "enablematchbyprimattrib", time, 0);
107  myMatchByPrimAttrib = "name"_UTsh;
108  if (true && ( (true&&!(((getPrimitives()==0))||((getEnableMatchByPrimAttrib()==0)))) ) )
109  graph->evalOpParm(myMatchByPrimAttrib, nodeidx, "matchbyprimattrib", time, 0);
110  myPoints = true;
111  if (true)
112  graph->evalOpParm(myPoints, nodeidx, "points", time, 0);
113  myPointgroups = ""_UTsh;
114  if (true && ( (true&&!(((getPoints()==0)))) ) )
115  graph->evalOpParm(myPointgroups, nodeidx, "pointgroups", time, 0);
116  myPointnameprefix = ""_UTsh;
117  if (true && ( (true&&!(((getPoints()==0)))) ) )
118  graph->evalOpParm(myPointnameprefix, nodeidx, "pointnameprefix", time, 0);
119  myEnableMatchByPointAttrib = false;
120  if (true && ( (true&&!(((getPoints()==0)))) ) )
121  graph->evalOpParm(myEnableMatchByPointAttrib, nodeidx, "enablematchbypointattrib", time, 0);
122  myMatchByPointAttrib = "id"_UTsh;
123  if (true && ( (true&&!(((getPoints()==0))||((getEnableMatchByPointAttrib()==0)))) ) )
124  graph->evalOpParm(myMatchByPointAttrib, nodeidx, "matchbypointattrib", time, 0);
125  myEdges = true;
126  if (true)
127  graph->evalOpParm(myEdges, nodeidx, "edges", time, 0);
128  myEdgegroups = ""_UTsh;
129  if (true && ( (true&&!(((getEdges()==0)))) ) )
130  graph->evalOpParm(myEdgegroups, nodeidx, "edgegroups", time, 0);
131  myEdgenameprefix = ""_UTsh;
132  if (true && ( (true&&!(((getEdges()==0)))) ) )
133  graph->evalOpParm(myEdgenameprefix, nodeidx, "edgenameprefix", time, 0);
134  myVertices = false;
135  if (true)
136  graph->evalOpParm(myVertices, nodeidx, "vertices", time, 0);
137  myVertexgroups = ""_UTsh;
138  if (true && ( (true&&!(((getVertices()==0)))) ) )
139  graph->evalOpParm(myVertexgroups, nodeidx, "vertexgroups", time, 0);
140  myVertexnameprefix = ""_UTsh;
141  if (true && ( (true&&!(((getVertices()==0)))) ) )
142  graph->evalOpParm(myVertexnameprefix, nodeidx, "vertexnameprefix", time, 0);
143  myEnableMatchByVertexAttrib = false;
144  if (true && ( (true&&!(((getVertices()==0)))) ) )
145  graph->evalOpParm(myEnableMatchByVertexAttrib, nodeidx, "enablematchbyvertexattrib", time, 0);
146  myMatchByVertexAttrib = "id"_UTsh;
147  if (true && ( (true&&!(((getVertices()==0))||((getEnableMatchByVertexAttrib()==0)))) ) )
148  graph->evalOpParm(myMatchByVertexAttrib, nodeidx, "matchbyvertexattrib", time, 0);
149  myGroupnameconflict = "skipgroup"_UTsh;
150  if (true)
151  graph->evalOpParm(myGroupnameconflict, nodeidx, "groupnameconflict", time, 0);
152  myCopyemptygroups = true;
153  if (true)
154  graph->evalOpParm(myCopyemptygroups, nodeidx, "copyemptygroups", time, 0);
155 
156  }
157 
158 
159  void loadFromOpSubclass(const LoadParms &loadparms) override
160  {
161  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
162  }
163 
164 
165  void copyFrom(const OP_NodeParms *src) override
166  {
167  *this = *((const SOP_GroupCopyParms *)src);
168  }
169 
170  template <typename T>
171  void
172  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
173  {
174  if (idx.size() < 1)
175  return;
176  UT_ASSERT(idx.size() == instance.size()+1);
177  if (idx.size() != instance.size()+1)
178  return;
179  switch (idx[0])
180  {
181  case 0:
182  coerceValue(value, myPrimitives);
183  break;
184  case 1:
185  coerceValue(value, myPrimgroups);
186  break;
187  case 2:
188  coerceValue(value, myPrimnameprefix);
189  break;
190  case 3:
191  coerceValue(value, myEnableMatchByPrimAttrib);
192  break;
193  case 4:
194  coerceValue(value, myMatchByPrimAttrib);
195  break;
196  case 5:
197  coerceValue(value, myPoints);
198  break;
199  case 6:
200  coerceValue(value, myPointgroups);
201  break;
202  case 7:
203  coerceValue(value, myPointnameprefix);
204  break;
205  case 8:
206  coerceValue(value, myEnableMatchByPointAttrib);
207  break;
208  case 9:
209  coerceValue(value, myMatchByPointAttrib);
210  break;
211  case 10:
212  coerceValue(value, myEdges);
213  break;
214  case 11:
215  coerceValue(value, myEdgegroups);
216  break;
217  case 12:
218  coerceValue(value, myEdgenameprefix);
219  break;
220  case 13:
221  coerceValue(value, myVertices);
222  break;
223  case 14:
224  coerceValue(value, myVertexgroups);
225  break;
226  case 15:
227  coerceValue(value, myVertexnameprefix);
228  break;
229  case 16:
230  coerceValue(value, myEnableMatchByVertexAttrib);
231  break;
232  case 17:
233  coerceValue(value, myMatchByVertexAttrib);
234  break;
235  case 18:
236  coerceValue(value, myGroupnameconflict);
237  break;
238  case 19:
239  coerceValue(value, myCopyemptygroups);
240  break;
241 
242  }
243  }
244 
245  bool isParmColorRamp(exint idx) const override
246  {
247  switch (idx)
248  {
249 
250  }
251  return false;
252  }
253 
254  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
275  { doGetParmValue(idx, instance, value); }
276 
277  template <typename T>
278  void
279  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
280  {
281  if (idx.size() < 1)
282  return;
283  UT_ASSERT(idx.size() == instance.size()+1);
284  if (idx.size() != instance.size()+1)
285  return;
286  switch (idx[0])
287  {
288  case 0:
289  coerceValue(myPrimitives, ( ( value ) ));
290  break;
291  case 1:
292  coerceValue(myPrimgroups, ( ( value ) ));
293  break;
294  case 2:
295  coerceValue(myPrimnameprefix, ( ( value ) ));
296  break;
297  case 3:
298  coerceValue(myEnableMatchByPrimAttrib, ( ( value ) ));
299  break;
300  case 4:
301  coerceValue(myMatchByPrimAttrib, ( ( value ) ));
302  break;
303  case 5:
304  coerceValue(myPoints, ( ( value ) ));
305  break;
306  case 6:
307  coerceValue(myPointgroups, ( ( value ) ));
308  break;
309  case 7:
310  coerceValue(myPointnameprefix, ( ( value ) ));
311  break;
312  case 8:
313  coerceValue(myEnableMatchByPointAttrib, ( ( value ) ));
314  break;
315  case 9:
316  coerceValue(myMatchByPointAttrib, ( ( value ) ));
317  break;
318  case 10:
319  coerceValue(myEdges, ( ( value ) ));
320  break;
321  case 11:
322  coerceValue(myEdgegroups, ( ( value ) ));
323  break;
324  case 12:
325  coerceValue(myEdgenameprefix, ( ( value ) ));
326  break;
327  case 13:
328  coerceValue(myVertices, ( ( value ) ));
329  break;
330  case 14:
331  coerceValue(myVertexgroups, ( ( value ) ));
332  break;
333  case 15:
334  coerceValue(myVertexnameprefix, ( ( value ) ));
335  break;
336  case 16:
337  coerceValue(myEnableMatchByVertexAttrib, ( ( value ) ));
338  break;
339  case 17:
340  coerceValue(myMatchByVertexAttrib, ( ( value ) ));
341  break;
342  case 18:
343  coerceValue(myGroupnameconflict, ( ( value ) ));
344  break;
345  case 19:
346  coerceValue(myCopyemptygroups, ( ( value ) ));
347  break;
348 
349  }
350  }
351 
352  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
365  { doSetParmValue(idx, instance, value); }
366  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
367  { doSetParmValue(idx, instance, value); }
368  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
373  { doSetParmValue(idx, instance, value); }
374 
375  exint getNestNumParms(TempIndex idx) const override
376  {
377  if (idx.size() == 0)
378  return 20;
379  switch (idx[0])
380  {
381 
382  }
383  // Invalid
384  return 0;
385  }
386 
387  const char *getNestParmName(TempIndex fieldnum) const override
388  {
389  if (fieldnum.size() < 1)
390  return 0;
391  switch (fieldnum[0])
392  {
393  case 0:
394  return "primitives";
395  case 1:
396  return "primgroups";
397  case 2:
398  return "primnameprefix";
399  case 3:
400  return "enablematchbyprimattrib";
401  case 4:
402  return "matchbyprimattrib";
403  case 5:
404  return "points";
405  case 6:
406  return "pointgroups";
407  case 7:
408  return "pointnameprefix";
409  case 8:
410  return "enablematchbypointattrib";
411  case 9:
412  return "matchbypointattrib";
413  case 10:
414  return "edges";
415  case 11:
416  return "edgegroups";
417  case 12:
418  return "edgenameprefix";
419  case 13:
420  return "vertices";
421  case 14:
422  return "vertexgroups";
423  case 15:
424  return "vertexnameprefix";
425  case 16:
426  return "enablematchbyvertexattrib";
427  case 17:
428  return "matchbyvertexattrib";
429  case 18:
430  return "groupnameconflict";
431  case 19:
432  return "copyemptygroups";
433 
434  }
435  return 0;
436  }
437 
438  ParmType getNestParmType(TempIndex fieldnum) const override
439  {
440  if (fieldnum.size() < 1)
441  return PARM_UNSUPPORTED;
442  switch (fieldnum[0])
443  {
444  case 0:
445  return PARM_INTEGER;
446  case 1:
447  return PARM_STRING;
448  case 2:
449  return PARM_STRING;
450  case 3:
451  return PARM_INTEGER;
452  case 4:
453  return PARM_STRING;
454  case 5:
455  return PARM_INTEGER;
456  case 6:
457  return PARM_STRING;
458  case 7:
459  return PARM_STRING;
460  case 8:
461  return PARM_INTEGER;
462  case 9:
463  return PARM_STRING;
464  case 10:
465  return PARM_INTEGER;
466  case 11:
467  return PARM_STRING;
468  case 12:
469  return PARM_STRING;
470  case 13:
471  return PARM_INTEGER;
472  case 14:
473  return PARM_STRING;
474  case 15:
475  return PARM_STRING;
476  case 16:
477  return PARM_INTEGER;
478  case 17:
479  return PARM_STRING;
480  case 18:
481  return PARM_STRING;
482  case 19:
483  return PARM_INTEGER;
484 
485  }
486  return PARM_UNSUPPORTED;
487  }
488 
489  // Boiler plate to load individual types.
490  static void loadData(UT_IStream &is, int64 &v)
491  { is.bread(&v, 1); }
492  static void loadData(UT_IStream &is, bool &v)
493  { int64 iv; is.bread(&iv, 1); v = iv; }
494  static void loadData(UT_IStream &is, fpreal64 &v)
495  { is.bread<fpreal64>(&v, 1); }
496  static void loadData(UT_IStream &is, UT_Vector2D &v)
497  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
498  static void loadData(UT_IStream &is, UT_Vector3D &v)
499  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
500  is.bread<fpreal64>(&v.z(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector4D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
503  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
504  static void loadData(UT_IStream &is, UT_Matrix2D &v)
505  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
506  static void loadData(UT_IStream &is, UT_Matrix3D &v)
507  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
508  static void loadData(UT_IStream &is, UT_Matrix4D &v)
509  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
510  static void loadData(UT_IStream &is, UT_Vector2I &v)
511  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
512  static void loadData(UT_IStream &is, UT_Vector3I &v)
513  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
514  is.bread<int64>(&v.z(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector4I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
517  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
519  { is.bread(v); }
521  { UT_StringHolder rampdata;
522  loadData(is, rampdata);
523  if (rampdata.isstring())
524  {
525  v.reset(new UT_Ramp());
526  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
527  v->load(istr);
528  }
529  else v.reset();
530  }
533  loadData(is, data);
534  if (data.isstring())
535  {
536  // Find the data type.
537  const char *colon = UT_StringWrap(data).findChar(':');
538  if (colon)
539  {
540  int typelen = colon - data.buffer();
542  type.strncpy(data.buffer(), typelen);
543  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
544 
545  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
546  }
547  }
548  else v.reset();
549  }
550 
551  static void saveData(std::ostream &os, int64 v)
552  { UTwrite(os, &v); }
553  static void saveData(std::ostream &os, bool v)
554  { int64 iv = v; UTwrite(os, &iv); }
555  static void saveData(std::ostream &os, fpreal64 v)
556  { UTwrite<fpreal64>(os, &v); }
557  static void saveData(std::ostream &os, UT_Vector2D v)
558  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
559  static void saveData(std::ostream &os, UT_Vector3D v)
560  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
561  UTwrite<fpreal64>(os, &v.z()); }
562  static void saveData(std::ostream &os, UT_Vector4D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
564  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
565  static void saveData(std::ostream &os, UT_Matrix2D v)
567  static void saveData(std::ostream &os, UT_Matrix3D v)
569  static void saveData(std::ostream &os, UT_Matrix4D v)
571  static void saveData(std::ostream &os, UT_StringHolder s)
572  { UT_StringWrap(s).saveBinary(os); }
573  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
575  UT_OStringStream ostr;
576  if (s) s->save(ostr);
577  result = ostr.str();
578  saveData(os, result);
579  }
580  static void saveData(std::ostream &os, PRM_DataItemHandle s)
582  UT_OStringStream ostr;
583  if (s)
584  {
585  ostr << s->getDataTypeToken();
586  ostr << ":";
587  s->saveBinary(ostr);
588  }
589  result = ostr.str();
590  saveData(os, result);
591  }
592 
593 
594  void save(std::ostream &os) const
595  {
596  int32 v = version();
597  UTwrite(os, &v);
598  saveData(os, myPrimitives);
599  saveData(os, myPrimgroups);
600  saveData(os, myPrimnameprefix);
601  saveData(os, myEnableMatchByPrimAttrib);
602  saveData(os, myMatchByPrimAttrib);
603  saveData(os, myPoints);
604  saveData(os, myPointgroups);
605  saveData(os, myPointnameprefix);
606  saveData(os, myEnableMatchByPointAttrib);
607  saveData(os, myMatchByPointAttrib);
608  saveData(os, myEdges);
609  saveData(os, myEdgegroups);
610  saveData(os, myEdgenameprefix);
611  saveData(os, myVertices);
612  saveData(os, myVertexgroups);
613  saveData(os, myVertexnameprefix);
614  saveData(os, myEnableMatchByVertexAttrib);
615  saveData(os, myMatchByVertexAttrib);
616  saveData(os, myGroupnameconflict);
617  saveData(os, myCopyemptygroups);
618 
619  }
620 
621  bool load(UT_IStream &is)
622  {
623  int32 v;
624  is.bread(&v, 1);
625  if (version() != v)
626  {
627  // Fail incompatible versions
628  return false;
629  }
630  loadData(is, myPrimitives);
631  loadData(is, myPrimgroups);
632  loadData(is, myPrimnameprefix);
633  loadData(is, myEnableMatchByPrimAttrib);
634  loadData(is, myMatchByPrimAttrib);
635  loadData(is, myPoints);
636  loadData(is, myPointgroups);
637  loadData(is, myPointnameprefix);
638  loadData(is, myEnableMatchByPointAttrib);
639  loadData(is, myMatchByPointAttrib);
640  loadData(is, myEdges);
641  loadData(is, myEdgegroups);
642  loadData(is, myEdgenameprefix);
643  loadData(is, myVertices);
644  loadData(is, myVertexgroups);
645  loadData(is, myVertexnameprefix);
646  loadData(is, myEnableMatchByVertexAttrib);
647  loadData(is, myMatchByVertexAttrib);
648  loadData(is, myGroupnameconflict);
649  loadData(is, myCopyemptygroups);
650 
651  return true;
652  }
653 
654  bool getPrimitives() const { return myPrimitives; }
655  void setPrimitives(bool val) { myPrimitives = val; }
656  bool opPrimitives(const SOP_NodeVerb::CookParms &cookparms) const
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getPrimitives();
660  bool result;
661  OP_Utils::evalOpParm(result, thissop, "primitives", cookparms.getCookTime(), 0);
662  return result;
663  }
664  const UT_StringHolder & getPrimgroups() const { return myPrimgroups; }
665  void setPrimgroups(const UT_StringHolder & val) { myPrimgroups = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getPrimgroups();
671  OP_Utils::evalOpParm(result, thissop, "primgroups", cookparms.getCookTime(), 0);
672  return result;
673  }
674  const UT_StringHolder & getPrimnameprefix() const { return myPrimnameprefix; }
675  void setPrimnameprefix(const UT_StringHolder & val) { myPrimnameprefix = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getPrimnameprefix();
681  OP_Utils::evalOpParm(result, thissop, "primnameprefix", cookparms.getCookTime(), 0);
682  return result;
683  }
684  bool getEnableMatchByPrimAttrib() const { return myEnableMatchByPrimAttrib; }
685  void setEnableMatchByPrimAttrib(bool val) { myEnableMatchByPrimAttrib = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getEnableMatchByPrimAttrib();
690  bool result;
691  OP_Utils::evalOpParm(result, thissop, "enablematchbyprimattrib", cookparms.getCookTime(), 0);
692  return result;
693  }
694  const UT_StringHolder & getMatchByPrimAttrib() const { return myMatchByPrimAttrib; }
695  void setMatchByPrimAttrib(const UT_StringHolder & val) { myMatchByPrimAttrib = val; }
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getMatchByPrimAttrib();
701  OP_Utils::evalOpParm(result, thissop, "matchbyprimattrib", cookparms.getCookTime(), 0);
702  return result;
703  }
704  bool getPoints() const { return myPoints; }
705  void setPoints(bool val) { myPoints = val; }
706  bool opPoints(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getPoints();
710  bool result;
711  OP_Utils::evalOpParm(result, thissop, "points", cookparms.getCookTime(), 0);
712  return result;
713  }
714  const UT_StringHolder & getPointgroups() const { return myPointgroups; }
715  void setPointgroups(const UT_StringHolder & val) { myPointgroups = val; }
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getPointgroups();
721  OP_Utils::evalOpParm(result, thissop, "pointgroups", cookparms.getCookTime(), 0);
722  return result;
723  }
724  const UT_StringHolder & getPointnameprefix() const { return myPointnameprefix; }
725  void setPointnameprefix(const UT_StringHolder & val) { myPointnameprefix = val; }
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getPointnameprefix();
731  OP_Utils::evalOpParm(result, thissop, "pointnameprefix", cookparms.getCookTime(), 0);
732  return result;
733  }
734  bool getEnableMatchByPointAttrib() const { return myEnableMatchByPointAttrib; }
735  void setEnableMatchByPointAttrib(bool val) { myEnableMatchByPointAttrib = val; }
737  {
738  SOP_Node *thissop = cookparms.getNode();
739  if (!thissop) return getEnableMatchByPointAttrib();
740  bool result;
741  OP_Utils::evalOpParm(result, thissop, "enablematchbypointattrib", cookparms.getCookTime(), 0);
742  return result;
743  }
744  const UT_StringHolder & getMatchByPointAttrib() const { return myMatchByPointAttrib; }
745  void setMatchByPointAttrib(const UT_StringHolder & val) { myMatchByPointAttrib = val; }
747  {
748  SOP_Node *thissop = cookparms.getNode();
749  if (!thissop) return getMatchByPointAttrib();
751  OP_Utils::evalOpParm(result, thissop, "matchbypointattrib", cookparms.getCookTime(), 0);
752  return result;
753  }
754  bool getEdges() const { return myEdges; }
755  void setEdges(bool val) { myEdges = val; }
756  bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
757  {
758  SOP_Node *thissop = cookparms.getNode();
759  if (!thissop) return getEdges();
760  bool result;
761  OP_Utils::evalOpParm(result, thissop, "edges", cookparms.getCookTime(), 0);
762  return result;
763  }
764  const UT_StringHolder & getEdgegroups() const { return myEdgegroups; }
765  void setEdgegroups(const UT_StringHolder & val) { myEdgegroups = val; }
767  {
768  SOP_Node *thissop = cookparms.getNode();
769  if (!thissop) return getEdgegroups();
771  OP_Utils::evalOpParm(result, thissop, "edgegroups", cookparms.getCookTime(), 0);
772  return result;
773  }
774  const UT_StringHolder & getEdgenameprefix() const { return myEdgenameprefix; }
775  void setEdgenameprefix(const UT_StringHolder & val) { myEdgenameprefix = val; }
777  {
778  SOP_Node *thissop = cookparms.getNode();
779  if (!thissop) return getEdgenameprefix();
781  OP_Utils::evalOpParm(result, thissop, "edgenameprefix", cookparms.getCookTime(), 0);
782  return result;
783  }
784  bool getVertices() const { return myVertices; }
785  void setVertices(bool val) { myVertices = val; }
786  bool opVertices(const SOP_NodeVerb::CookParms &cookparms) const
787  {
788  SOP_Node *thissop = cookparms.getNode();
789  if (!thissop) return getVertices();
790  bool result;
791  OP_Utils::evalOpParm(result, thissop, "vertices", cookparms.getCookTime(), 0);
792  return result;
793  }
794  const UT_StringHolder & getVertexgroups() const { return myVertexgroups; }
795  void setVertexgroups(const UT_StringHolder & val) { myVertexgroups = val; }
797  {
798  SOP_Node *thissop = cookparms.getNode();
799  if (!thissop) return getVertexgroups();
801  OP_Utils::evalOpParm(result, thissop, "vertexgroups", cookparms.getCookTime(), 0);
802  return result;
803  }
804  const UT_StringHolder & getVertexnameprefix() const { return myVertexnameprefix; }
805  void setVertexnameprefix(const UT_StringHolder & val) { myVertexnameprefix = val; }
807  {
808  SOP_Node *thissop = cookparms.getNode();
809  if (!thissop) return getVertexnameprefix();
811  OP_Utils::evalOpParm(result, thissop, "vertexnameprefix", cookparms.getCookTime(), 0);
812  return result;
813  }
814  bool getEnableMatchByVertexAttrib() const { return myEnableMatchByVertexAttrib; }
815  void setEnableMatchByVertexAttrib(bool val) { myEnableMatchByVertexAttrib = val; }
817  {
818  SOP_Node *thissop = cookparms.getNode();
819  if (!thissop) return getEnableMatchByVertexAttrib();
820  bool result;
821  OP_Utils::evalOpParm(result, thissop, "enablematchbyvertexattrib", cookparms.getCookTime(), 0);
822  return result;
823  }
824  const UT_StringHolder & getMatchByVertexAttrib() const { return myMatchByVertexAttrib; }
825  void setMatchByVertexAttrib(const UT_StringHolder & val) { myMatchByVertexAttrib = val; }
827  {
828  SOP_Node *thissop = cookparms.getNode();
829  if (!thissop) return getMatchByVertexAttrib();
831  OP_Utils::evalOpParm(result, thissop, "matchbyvertexattrib", cookparms.getCookTime(), 0);
832  return result;
833  }
834  const UT_StringHolder & getGroupnameconflict() const { return myGroupnameconflict; }
835  void setGroupnameconflict(const UT_StringHolder & val) { myGroupnameconflict = val; }
837  {
838  SOP_Node *thissop = cookparms.getNode();
839  if (!thissop) return getGroupnameconflict();
841  OP_Utils::evalOpParm(result, thissop, "groupnameconflict", cookparms.getCookTime(), 0);
842  return result;
843  }
844  bool getCopyemptygroups() const { return myCopyemptygroups; }
845  void setCopyemptygroups(bool val) { myCopyemptygroups = val; }
846  bool opCopyemptygroups(const SOP_NodeVerb::CookParms &cookparms) const
847  {
848  SOP_Node *thissop = cookparms.getNode();
849  if (!thissop) return getCopyemptygroups();
850  bool result;
851  OP_Utils::evalOpParm(result, thissop, "copyemptygroups", cookparms.getCookTime(), 0);
852  return result;
853  }
854 
855 private:
856  bool myPrimitives;
857  UT_StringHolder myPrimgroups;
858  UT_StringHolder myPrimnameprefix;
859  bool myEnableMatchByPrimAttrib;
860  UT_StringHolder myMatchByPrimAttrib;
861  bool myPoints;
862  UT_StringHolder myPointgroups;
863  UT_StringHolder myPointnameprefix;
864  bool myEnableMatchByPointAttrib;
865  UT_StringHolder myMatchByPointAttrib;
866  bool myEdges;
867  UT_StringHolder myEdgegroups;
868  UT_StringHolder myEdgenameprefix;
869  bool myVertices;
870  UT_StringHolder myVertexgroups;
871  UT_StringHolder myVertexnameprefix;
872  bool myEnableMatchByVertexAttrib;
873  UT_StringHolder myMatchByVertexAttrib;
874  UT_StringHolder myGroupnameconflict;
875  bool myCopyemptygroups;
876 
877 };
void setEdgegroups(const UT_StringHolder &val)
bool getEnableMatchByVertexAttrib() const
UT_StringHolder opEdgenameprefix(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_GroupCopyParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setEnableMatchByPointAttrib(bool val)
static void saveData(std::ostream &os, UT_Vector2D v)
void setPoints(bool val)
static void loadData(UT_IStream &is, fpreal64 &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
const UT_StringHolder & getEdgenameprefix() const
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opMatchByPointAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPrimgroups() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
UT_StringHolder opMatchByVertexAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setPrimnameprefix(const UT_StringHolder &val)
const char * getNestParmName(TempIndex fieldnum) const override
bool getEnableMatchByPrimAttrib() const
bool isParmColorRamp(exint idx) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
UT_StringHolder opPointnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_StringHolder & getPointnameprefix() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
**But if you need a result
Definition: thread.h:613
const UT_StringHolder & getVertexnameprefix() const
void setEdgenameprefix(const UT_StringHolder &val)
bool opCopyemptygroups(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool load(UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opEnableMatchByPointAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setEnableMatchByVertexAttrib(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_StringHolder opEdgegroups(const SOP_NodeVerb::CookParms &cookparms) const
void setMatchByVertexAttrib(const UT_StringHolder &val)
const UT_StringHolder & getVertexgroups() const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool getPrimitives() const
bool getCopyemptygroups() const
bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getGroupnameconflict() const
UT_StringHolder opPrimnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_StringHolder & getMatchByPointAttrib() const
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_GroupCopyParms &src) const
exint length() const
ParmType getNestParmType(TempIndex fieldnum) const override
void setVertices(bool val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
bool opEnableMatchByVertexAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setVertexnameprefix(const UT_StringHolder &val)
bool opPrimitives(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opGroupnameconflict(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setGroupnameconflict(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setVertexgroups(const UT_StringHolder &val)
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder opVertexnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void setPointnameprefix(const UT_StringHolder &val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GT_API const UT_StringHolder version
bool opVertices(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void setPrimgroups(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setPointgroups(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setMatchByPrimAttrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opMatchByPrimAttrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
const UT_StringHolder & getEdgegroups() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setPrimitives(bool val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
bool getEnableMatchByPointAttrib() const
UT_StringHolder opPointgroups(const SOP_NodeVerb::CookParms &cookparms) const
void setMatchByPointAttrib(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
const UT_StringHolder & getMatchByPrimAttrib() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLboolean r
Definition: glcorearb.h:1222
bool opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const UT_StringHolder & getPointgroups() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setCopyemptygroups(bool val)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opEnableMatchByPrimAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_StringHolder opPrimgroups(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
type
Definition: core.h:1059
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getMatchByVertexAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opVertexgroups(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setEnableMatchByPrimAttrib(bool val)
const UT_StringHolder & getPrimnameprefix() const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663