HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CopyToPoints.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_CopyToPointsEnums
24 {
25  enum class Pivot
26  {
27  ORIGIN = 0,
28  CENTROID
29  };
30  enum class Viewportlod
31  {
32  FULL = 0,
33  POINTS,
34  BOX,
35  CENTROID,
36  HIDDEN
37  };
38 }
39 
40 
42 {
43 public:
44  static int version() { return 1; }
45 
47  {
48  mySourceGroup = ""_sh;
49  myTargetGroup = ""_sh;
50  myShowguide = true;
51  myPack = false;
52  myPivot = 1;
53  myViewportlod = 0;
54  myTransform = true;
55  myDoAttr = true;
56  mySetpt = "*,^v,^Alpha,^N"_sh;
57  myMulpt = "Alpha"_sh;
58  myAddpt = "v"_sh;
59  mySubpt = ""_sh;
60  mySetprim = ""_sh;
61  myMulprim = ""_sh;
62  myAddprim = ""_sh;
63  mySubprim = ""_sh;
64  mySetvtx = ""_sh;
65  myMulvtx = ""_sh;
66  myAddvtx = ""_sh;
67  mySubvtx = ""_sh;
68 
69  }
70 
71  explicit SOP_CopyToPointsParms(const SOP_CopyToPointsParms &) = default;
72 
73  ~SOP_CopyToPointsParms() override {}
74 
76  {
77  if (mySourceGroup != src.mySourceGroup) return false;
78  if (myTargetGroup != src.myTargetGroup) return false;
79  if (myShowguide != src.myShowguide) return false;
80  if (myPack != src.myPack) return false;
81  if (myPivot != src.myPivot) return false;
82  if (myViewportlod != src.myViewportlod) return false;
83  if (myTransform != src.myTransform) return false;
84  if (myDoAttr != src.myDoAttr) return false;
85  if (mySetpt != src.mySetpt) return false;
86  if (myMulpt != src.myMulpt) return false;
87  if (myAddpt != src.myAddpt) return false;
88  if (mySubpt != src.mySubpt) return false;
89  if (mySetprim != src.mySetprim) return false;
90  if (myMulprim != src.myMulprim) return false;
91  if (myAddprim != src.myAddprim) return false;
92  if (mySubprim != src.mySubprim) return false;
93  if (mySetvtx != src.mySetvtx) return false;
94  if (myMulvtx != src.myMulvtx) return false;
95  if (myAddvtx != src.myAddvtx) return false;
96  if (mySubvtx != src.mySubvtx) return false;
97 
98  return true;
99  }
101  {
102  return !operator==(src);
103  }
106 
107 
108 
109  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
110  {
111  mySourceGroup = ""_sh;
112  if (true)
113  graph->evalOpParm(mySourceGroup, nodeidx, "sourcegroup", time, 0);
114  myTargetGroup = ""_sh;
115  if (true)
116  graph->evalOpParm(myTargetGroup, nodeidx, "targetgroup", time, 0);
117  myShowguide = true;
118  if (true)
119  graph->evalOpParm(myShowguide, nodeidx, "showguide", time, 0);
120  myPack = false;
121  if (true)
122  graph->evalOpParm(myPack, nodeidx, "pack", time, 0);
123  myPivot = 1;
124  if (true && ( (!(((getPack()==0)))) ) )
125  graph->evalOpParm(myPivot, nodeidx, "pivot", time, 0);
126  myViewportlod = 0;
127  if (true && ( (!(((getPack()==0)))) ) )
128  graph->evalOpParm(myViewportlod, nodeidx, "viewportlod", time, 0);
129  myTransform = true;
130  if (true)
131  graph->evalOpParm(myTransform, nodeidx, "transform", time, 0);
132  myDoAttr = true;
133  if (true)
134  graph->evalOpParm(myDoAttr, nodeidx, "doattr", time, 0);
135  mySetpt = "*,^v,^Alpha,^N"_sh;
136  if (true && ( (!(((getDoAttr()==0)))) ) )
137  graph->evalOpParm(mySetpt, nodeidx, "setpt", time, 0);
138  myMulpt = "Alpha"_sh;
139  if (true && ( (!(((getDoAttr()==0)))) ) )
140  graph->evalOpParm(myMulpt, nodeidx, "mulpt", time, 0);
141  myAddpt = "v"_sh;
142  if (true && ( (!(((getDoAttr()==0)))) ) )
143  graph->evalOpParm(myAddpt, nodeidx, "addpt", time, 0);
144  mySubpt = ""_sh;
145  if (true && ( (!(((getDoAttr()==0)))) ) )
146  graph->evalOpParm(mySubpt, nodeidx, "subpt", time, 0);
147  mySetprim = ""_sh;
148  if (true && ( (!(((getDoAttr()==0)))) ) )
149  graph->evalOpParm(mySetprim, nodeidx, "setprim", time, 0);
150  myMulprim = ""_sh;
151  if (true && ( (!(((getDoAttr()==0)))) ) )
152  graph->evalOpParm(myMulprim, nodeidx, "mulprim", time, 0);
153  myAddprim = ""_sh;
154  if (true && ( (!(((getDoAttr()==0)))) ) )
155  graph->evalOpParm(myAddprim, nodeidx, "addprim", time, 0);
156  mySubprim = ""_sh;
157  if (true && ( (!(((getDoAttr()==0)))) ) )
158  graph->evalOpParm(mySubprim, nodeidx, "subprim", time, 0);
159  mySetvtx = ""_sh;
160  if (true && ( (!(((getDoAttr()==0)))) ) )
161  graph->evalOpParm(mySetvtx, nodeidx, "setvtx", time, 0);
162  myMulvtx = ""_sh;
163  if (true && ( (!(((getDoAttr()==0)))) ) )
164  graph->evalOpParm(myMulvtx, nodeidx, "mulvtx", time, 0);
165  myAddvtx = ""_sh;
166  if (true && ( (!(((getDoAttr()==0)))) ) )
167  graph->evalOpParm(myAddvtx, nodeidx, "addvtx", time, 0);
168  mySubvtx = ""_sh;
169  if (true && ( (!(((getDoAttr()==0)))) ) )
170  graph->evalOpParm(mySubvtx, nodeidx, "subvtx", time, 0);
171 
172  }
173 
174 
175  void loadFromOpSubclass(const LoadParms &loadparms) override
176  {
177  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
178  }
179 
180 
181  void copyFrom(const SOP_NodeParms *src) override
182  {
183  *this = *((const SOP_CopyToPointsParms *)src);
184  }
185 
186  template <typename T>
187  void
188  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
189  {
190  if (idx.size() < 1)
191  return;
192  UT_ASSERT(idx.size() == instance.size()+1);
193  if (idx.size() != instance.size()+1)
194  return;
195  switch (idx[0])
196  {
197  case 0:
198  coerceValue(value, mySourceGroup);
199  break;
200  case 1:
201  coerceValue(value, myTargetGroup);
202  break;
203  case 2:
204  coerceValue(value, myShowguide);
205  break;
206  case 3:
207  coerceValue(value, myPack);
208  break;
209  case 4:
210  coerceValue(value, myPivot);
211  break;
212  case 5:
213  coerceValue(value, myViewportlod);
214  break;
215  case 6:
216  coerceValue(value, myTransform);
217  break;
218  case 7:
219  coerceValue(value, myDoAttr);
220  break;
221  case 8:
222  coerceValue(value, mySetpt);
223  break;
224  case 9:
225  coerceValue(value, myMulpt);
226  break;
227  case 10:
228  coerceValue(value, myAddpt);
229  break;
230  case 11:
231  coerceValue(value, mySubpt);
232  break;
233  case 12:
234  coerceValue(value, mySetprim);
235  break;
236  case 13:
237  coerceValue(value, myMulprim);
238  break;
239  case 14:
240  coerceValue(value, myAddprim);
241  break;
242  case 15:
243  coerceValue(value, mySubprim);
244  break;
245  case 16:
246  coerceValue(value, mySetvtx);
247  break;
248  case 17:
249  coerceValue(value, myMulvtx);
250  break;
251  case 18:
252  coerceValue(value, myAddvtx);
253  break;
254  case 19:
255  coerceValue(value, mySubvtx);
256  break;
257 
258  }
259  }
260 
261  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
270  { doGetParmValue(idx, instance, value); }
271  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
282  { doGetParmValue(idx, instance, value); }
283 
284  template <typename T>
285  void
286  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
287  {
288  if (idx.size() < 1)
289  return;
290  UT_ASSERT(idx.size() == instance.size()+1);
291  if (idx.size() != instance.size()+1)
292  return;
293  switch (idx[0])
294  {
295  case 0:
296  coerceValue(mySourceGroup, value);
297  break;
298  case 1:
299  coerceValue(myTargetGroup, value);
300  break;
301  case 2:
302  coerceValue(myShowguide, value);
303  break;
304  case 3:
305  coerceValue(myPack, value);
306  break;
307  case 4:
308  coerceValue(myPivot, value);
309  break;
310  case 5:
311  coerceValue(myViewportlod, value);
312  break;
313  case 6:
314  coerceValue(myTransform, value);
315  break;
316  case 7:
317  coerceValue(myDoAttr, value);
318  break;
319  case 8:
320  coerceValue(mySetpt, value);
321  break;
322  case 9:
323  coerceValue(myMulpt, value);
324  break;
325  case 10:
326  coerceValue(myAddpt, value);
327  break;
328  case 11:
329  coerceValue(mySubpt, value);
330  break;
331  case 12:
332  coerceValue(mySetprim, value);
333  break;
334  case 13:
335  coerceValue(myMulprim, value);
336  break;
337  case 14:
338  coerceValue(myAddprim, value);
339  break;
340  case 15:
341  coerceValue(mySubprim, value);
342  break;
343  case 16:
344  coerceValue(mySetvtx, value);
345  break;
346  case 17:
347  coerceValue(myMulvtx, value);
348  break;
349  case 18:
350  coerceValue(myAddvtx, value);
351  break;
352  case 19:
353  coerceValue(mySubvtx, value);
354  break;
355 
356  }
357  }
358 
359  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
360  { doSetParmValue(idx, instance, value); }
361  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
362  { doSetParmValue(idx, instance, value); }
363  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
364  { doSetParmValue(idx, instance, value); }
365  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
366  { doSetParmValue(idx, instance, value); }
367  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
368  { doSetParmValue(idx, instance, value); }
369  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
370  { doSetParmValue(idx, instance, value); }
371  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
380  { doSetParmValue(idx, instance, value); }
381 
382  exint getNestNumParms(TempIndex idx) const override
383  {
384  if (idx.size() == 0)
385  return 20;
386  switch (idx[0])
387  {
388 
389  }
390  // Invalid
391  return 0;
392  }
393 
394  const char *getNestParmName(TempIndex fieldnum) const override
395  {
396  if (fieldnum.size() < 1)
397  return 0;
398  switch (fieldnum[0])
399  {
400  case 0:
401  return "sourcegroup";
402  case 1:
403  return "targetgroup";
404  case 2:
405  return "showguide";
406  case 3:
407  return "pack";
408  case 4:
409  return "pivot";
410  case 5:
411  return "viewportlod";
412  case 6:
413  return "transform";
414  case 7:
415  return "doattr";
416  case 8:
417  return "setpt";
418  case 9:
419  return "mulpt";
420  case 10:
421  return "addpt";
422  case 11:
423  return "subpt";
424  case 12:
425  return "setprim";
426  case 13:
427  return "mulprim";
428  case 14:
429  return "addprim";
430  case 15:
431  return "subprim";
432  case 16:
433  return "setvtx";
434  case 17:
435  return "mulvtx";
436  case 18:
437  return "addvtx";
438  case 19:
439  return "subvtx";
440 
441  }
442  return 0;
443  }
444 
445  ParmType getNestParmType(TempIndex fieldnum) const override
446  {
447  if (fieldnum.size() < 1)
448  return PARM_UNSUPPORTED;
449  switch (fieldnum[0])
450  {
451  case 0:
452  return PARM_STRING;
453  case 1:
454  return PARM_STRING;
455  case 2:
456  return PARM_INTEGER;
457  case 3:
458  return PARM_INTEGER;
459  case 4:
460  return PARM_INTEGER;
461  case 5:
462  return PARM_INTEGER;
463  case 6:
464  return PARM_INTEGER;
465  case 7:
466  return PARM_INTEGER;
467  case 8:
468  return PARM_STRING;
469  case 9:
470  return PARM_STRING;
471  case 10:
472  return PARM_STRING;
473  case 11:
474  return PARM_STRING;
475  case 12:
476  return PARM_STRING;
477  case 13:
478  return PARM_STRING;
479  case 14:
480  return PARM_STRING;
481  case 15:
482  return PARM_STRING;
483  case 16:
484  return PARM_STRING;
485  case 17:
486  return PARM_STRING;
487  case 18:
488  return PARM_STRING;
489  case 19:
490  return PARM_STRING;
491 
492  }
493  return PARM_UNSUPPORTED;
494  }
495 
496  // Boiler plate to load individual types.
497  static void loadData(UT_IStream &is, int64 &v)
498  { is.bread(&v, 1); }
499  static void loadData(UT_IStream &is, bool &v)
500  { int64 iv; is.bread(&iv, 1); v = iv; }
501  static void loadData(UT_IStream &is, fpreal64 &v)
502  { is.bread<fpreal64>(&v, 1); }
503  static void loadData(UT_IStream &is, UT_Vector2D &v)
504  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
505  static void loadData(UT_IStream &is, UT_Vector3D &v)
506  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
507  is.bread<fpreal64>(&v.z(), 1); }
508  static void loadData(UT_IStream &is, UT_Vector4D &v)
509  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
510  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
511  static void loadData(UT_IStream &is, UT_Matrix2D &v)
512  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
513  static void loadData(UT_IStream &is, UT_Matrix3D &v)
514  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
515  static void loadData(UT_IStream &is, UT_Matrix4D &v)
516  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
517  static void loadData(UT_IStream &is, UT_Vector2I &v)
518  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
519  static void loadData(UT_IStream &is, UT_Vector3I &v)
520  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
521  is.bread<int64>(&v.z(), 1); }
522  static void loadData(UT_IStream &is, UT_Vector4I &v)
523  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
524  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
526  { is.bread(v); }
528  { UT_StringHolder rampdata;
529  loadData(is, rampdata);
530  if (rampdata.isstring())
531  {
532  v.reset(new UT_Ramp());
533  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
534  v->load(istr);
535  }
536  else v.reset();
537  }
540  loadData(is, data);
541  if (data.isstring())
542  {
543  // Find the data type.
544  const char *colon = UT_StringWrap(data).findChar(':');
545  if (colon)
546  {
547  int typelen = colon - data.buffer();
549  type.strncpy(data.buffer(), typelen);
550  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
551 
552  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
553  }
554  }
555  else v.reset();
556  }
557 
558  static void saveData(std::ostream &os, int64 v)
559  { UTwrite(os, &v); }
560  static void saveData(std::ostream &os, bool v)
561  { int64 iv = v; UTwrite(os, &iv); }
562  static void saveData(std::ostream &os, fpreal64 v)
563  { UTwrite<fpreal64>(os, &v); }
564  static void saveData(std::ostream &os, UT_Vector2D v)
565  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
566  static void saveData(std::ostream &os, UT_Vector3D v)
567  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
568  UTwrite<fpreal64>(os, &v.z()); }
569  static void saveData(std::ostream &os, UT_Vector4D v)
570  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
571  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
572  static void saveData(std::ostream &os, UT_Matrix2D v)
574  static void saveData(std::ostream &os, UT_Matrix3D v)
576  static void saveData(std::ostream &os, UT_Matrix4D v)
578  static void saveData(std::ostream &os, UT_StringHolder s)
579  { UT_StringWrap(s).saveBinary(os); }
580  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
582  UT_OStringStream ostr;
583  if (s) s->save(ostr);
584  result = ostr.str();
585  saveData(os, result);
586  }
587  static void saveData(std::ostream &os, PRM_DataItemHandle s)
589  UT_OStringStream ostr;
590  if (s)
591  {
592  ostr << s->getDataTypeToken();
593  ostr << ":";
594  s->saveBinary(ostr);
595  }
596  result = ostr.str();
597  saveData(os, result);
598  }
599 
600 
601  void save(std::ostream &os) const
602  {
603  int32 v = version();
604  UTwrite(os, &v);
605  saveData(os, mySourceGroup);
606  saveData(os, myTargetGroup);
607  saveData(os, myShowguide);
608  saveData(os, myPack);
609  saveData(os, myPivot);
610  saveData(os, myViewportlod);
611  saveData(os, myTransform);
612  saveData(os, myDoAttr);
613  saveData(os, mySetpt);
614  saveData(os, myMulpt);
615  saveData(os, myAddpt);
616  saveData(os, mySubpt);
617  saveData(os, mySetprim);
618  saveData(os, myMulprim);
619  saveData(os, myAddprim);
620  saveData(os, mySubprim);
621  saveData(os, mySetvtx);
622  saveData(os, myMulvtx);
623  saveData(os, myAddvtx);
624  saveData(os, mySubvtx);
625 
626  }
627 
628  bool load(UT_IStream &is)
629  {
630  int32 v;
631  is.bread(&v, 1);
632  if (version() != v)
633  {
634  // Fail incompatible versions
635  return false;
636  }
637  loadData(is, mySourceGroup);
638  loadData(is, myTargetGroup);
639  loadData(is, myShowguide);
640  loadData(is, myPack);
641  loadData(is, myPivot);
642  loadData(is, myViewportlod);
643  loadData(is, myTransform);
644  loadData(is, myDoAttr);
645  loadData(is, mySetpt);
646  loadData(is, myMulpt);
647  loadData(is, myAddpt);
648  loadData(is, mySubpt);
649  loadData(is, mySetprim);
650  loadData(is, myMulprim);
651  loadData(is, myAddprim);
652  loadData(is, mySubprim);
653  loadData(is, mySetvtx);
654  loadData(is, myMulvtx);
655  loadData(is, myAddvtx);
656  loadData(is, mySubvtx);
657 
658  return true;
659  }
660 
661  const UT_StringHolder & getSourceGroup() const { return mySourceGroup; }
662  void setSourceGroup(const UT_StringHolder & val) { mySourceGroup = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getSourceGroup();
668  OP_Utils::evalOpParm(result, thissop, "sourcegroup", cookparms.getCookTime(), 0);
669  return result;
670  }
671  const UT_StringHolder & getTargetGroup() const { return myTargetGroup; }
672  void setTargetGroup(const UT_StringHolder & val) { myTargetGroup = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getTargetGroup();
678  OP_Utils::evalOpParm(result, thissop, "targetgroup", cookparms.getCookTime(), 0);
679  return result;
680  }
681  bool getShowguide() const { return myShowguide; }
682  void setShowguide(bool val) { myShowguide = val; }
683  bool opShowguide(const SOP_NodeVerb::CookParms &cookparms) const
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getShowguide();
687  bool result;
688  OP_Utils::evalOpParm(result, thissop, "showguide", cookparms.getCookTime(), 0);
689  return result;
690  }
691  bool getPack() const { return myPack; }
692  void setPack(bool val) { myPack = val; }
693  bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getPack();
697  bool result;
698  OP_Utils::evalOpParm(result, thissop, "pack", cookparms.getCookTime(), 0);
699  return result;
700  }
701  Pivot getPivot() const { return Pivot(myPivot); }
702  void setPivot(Pivot val) { myPivot = int64(val); }
703  Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getPivot();
707  int64 result;
708  OP_Utils::evalOpParm(result, thissop, "pivot", cookparms.getCookTime(), 0);
709  return Pivot(result);
710  }
711  Viewportlod getViewportlod() const { return Viewportlod(myViewportlod); }
712  void setViewportlod(Viewportlod val) { myViewportlod = int64(val); }
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getViewportlod();
717  int64 result;
718  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
719  return Viewportlod(result);
720  }
721  bool getTransform() const { return myTransform; }
722  void setTransform(bool val) { myTransform = val; }
723  bool opTransform(const SOP_NodeVerb::CookParms &cookparms) const
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getTransform();
727  bool result;
728  OP_Utils::evalOpParm(result, thissop, "transform", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getDoAttr() const { return myDoAttr; }
732  void setDoAttr(bool val) { myDoAttr = val; }
733  bool opDoAttr(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getDoAttr();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "doattr", cookparms.getCookTime(), 0);
739  return result;
740  }
741  const UT_StringHolder & getSetpt() const { return mySetpt; }
742  void setSetpt(const UT_StringHolder & val) { mySetpt = val; }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getSetpt();
748  OP_Utils::evalOpParm(result, thissop, "setpt", cookparms.getCookTime(), 0);
749  return result;
750  }
751  const UT_StringHolder & getMulpt() const { return myMulpt; }
752  void setMulpt(const UT_StringHolder & val) { myMulpt = val; }
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getMulpt();
758  OP_Utils::evalOpParm(result, thissop, "mulpt", cookparms.getCookTime(), 0);
759  return result;
760  }
761  const UT_StringHolder & getAddpt() const { return myAddpt; }
762  void setAddpt(const UT_StringHolder & val) { myAddpt = val; }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getAddpt();
768  OP_Utils::evalOpParm(result, thissop, "addpt", cookparms.getCookTime(), 0);
769  return result;
770  }
771  const UT_StringHolder & getSubpt() const { return mySubpt; }
772  void setSubpt(const UT_StringHolder & val) { mySubpt = val; }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getSubpt();
778  OP_Utils::evalOpParm(result, thissop, "subpt", cookparms.getCookTime(), 0);
779  return result;
780  }
781  const UT_StringHolder & getSetprim() const { return mySetprim; }
782  void setSetprim(const UT_StringHolder & val) { mySetprim = val; }
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getSetprim();
788  OP_Utils::evalOpParm(result, thissop, "setprim", cookparms.getCookTime(), 0);
789  return result;
790  }
791  const UT_StringHolder & getMulprim() const { return myMulprim; }
792  void setMulprim(const UT_StringHolder & val) { myMulprim = val; }
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getMulprim();
798  OP_Utils::evalOpParm(result, thissop, "mulprim", cookparms.getCookTime(), 0);
799  return result;
800  }
801  const UT_StringHolder & getAddprim() const { return myAddprim; }
802  void setAddprim(const UT_StringHolder & val) { myAddprim = val; }
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getAddprim();
808  OP_Utils::evalOpParm(result, thissop, "addprim", cookparms.getCookTime(), 0);
809  return result;
810  }
811  const UT_StringHolder & getSubprim() const { return mySubprim; }
812  void setSubprim(const UT_StringHolder & val) { mySubprim = val; }
814  {
815  SOP_Node *thissop = cookparms.getNode();
816  if (!thissop) return getSubprim();
818  OP_Utils::evalOpParm(result, thissop, "subprim", cookparms.getCookTime(), 0);
819  return result;
820  }
821  const UT_StringHolder & getSetvtx() const { return mySetvtx; }
822  void setSetvtx(const UT_StringHolder & val) { mySetvtx = val; }
824  {
825  SOP_Node *thissop = cookparms.getNode();
826  if (!thissop) return getSetvtx();
828  OP_Utils::evalOpParm(result, thissop, "setvtx", cookparms.getCookTime(), 0);
829  return result;
830  }
831  const UT_StringHolder & getMulvtx() const { return myMulvtx; }
832  void setMulvtx(const UT_StringHolder & val) { myMulvtx = val; }
834  {
835  SOP_Node *thissop = cookparms.getNode();
836  if (!thissop) return getMulvtx();
838  OP_Utils::evalOpParm(result, thissop, "mulvtx", cookparms.getCookTime(), 0);
839  return result;
840  }
841  const UT_StringHolder & getAddvtx() const { return myAddvtx; }
842  void setAddvtx(const UT_StringHolder & val) { myAddvtx = val; }
844  {
845  SOP_Node *thissop = cookparms.getNode();
846  if (!thissop) return getAddvtx();
848  OP_Utils::evalOpParm(result, thissop, "addvtx", cookparms.getCookTime(), 0);
849  return result;
850  }
851  const UT_StringHolder & getSubvtx() const { return mySubvtx; }
852  void setSubvtx(const UT_StringHolder & val) { mySubvtx = val; }
854  {
855  SOP_Node *thissop = cookparms.getNode();
856  if (!thissop) return getSubvtx();
858  OP_Utils::evalOpParm(result, thissop, "subvtx", cookparms.getCookTime(), 0);
859  return result;
860  }
861 
862 private:
863  UT_StringHolder mySourceGroup;
864  UT_StringHolder myTargetGroup;
865  bool myShowguide;
866  bool myPack;
867  int64 myPivot;
868  int64 myViewportlod;
869  bool myTransform;
870  bool myDoAttr;
871  UT_StringHolder mySetpt;
872  UT_StringHolder myMulpt;
873  UT_StringHolder myAddpt;
874  UT_StringHolder mySubpt;
875  UT_StringHolder mySetprim;
876  UT_StringHolder myMulprim;
877  UT_StringHolder myAddprim;
878  UT_StringHolder mySubprim;
879  UT_StringHolder mySetvtx;
880  UT_StringHolder myMulvtx;
881  UT_StringHolder myAddvtx;
882  UT_StringHolder mySubvtx;
883 
884 };
GLdouble s
Definition: glew.h:1390
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opDoAttr(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
UT_StringHolder opSubprim(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator==(const SOP_CopyToPointsParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setSubprim(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint bread(int32 *buffer, exint asize=1)
exint getNestNumParms(TempIndex idx) const override
const UT_StringHolder & getSubprim() const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
const UT_StringHolder & getAddprim() const
void setSubpt(const UT_StringHolder &val)
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, UT_Vector4D &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
An output stream object that owns its own string buffer storage.
UT_StringHolder opSetvtx(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getAddvtx() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const GLdouble * v
Definition: glew.h:1391
const UT_StringHolder & getAddpt() const
UT_StringHolder opMulvtx(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
void setViewportlod(Viewportlod val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getMulvtx() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
double fpreal64
Definition: SYS_Types.h:201
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
Viewportlod getViewportlod() const
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opTargetGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setSourceGroup(const UT_StringHolder &val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const UT_StringHolder & getMulpt() const
void setAddpt(const UT_StringHolder &val)
UT_StringHolder opAddvtx(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator!=(const SOP_CopyToPointsParms &src) const
UT_StringHolder opSubvtx(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSetpt() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
const UT_StringHolder & getSubvtx() const
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
UT_StringHolder opSetprim(const SOP_NodeVerb::CookParms &cookparms) const
void setSetprim(const UT_StringHolder &val)
const UT_StringHolder & getTargetGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setMulprim(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opSourceGroup(const SOP_NodeVerb::CookParms &cookparms) const
const GLfloat * c
Definition: glew.h:16296
static void saveData(std::ostream &os, UT_Vector2D v)
long long int64
Definition: SYS_Types.h:116
const UT_StringHolder & getSetprim() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
void setMulvtx(const UT_StringHolder &val)
void setSetvtx(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setSubvtx(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opShowguide(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setMulpt(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setAddprim(const UT_StringHolder &val)
UT_StringHolder opSubpt(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opAddpt(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
Viewportlod opViewportlod(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
UT_StringHolder opMulprim(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getSetvtx() const
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
bool opTransform(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setSetpt(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
UT_StringHolder opMulpt(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getMulprim() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opAddprim(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getSubpt() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setTargetGroup(const UT_StringHolder &val)
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void saveData(std::ostream &os, UT_Matrix4D v)
ParmType getNestParmType(TempIndex fieldnum) const override
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opSetpt(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setAddvtx(const UT_StringHolder &val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
const UT_StringHolder & getSourceGroup() const
static void loadData(UT_IStream &is, UT_Vector2I &v)