HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CopyTransform.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_CopyTransformEnums
24 {
25  enum class SourceGroupType
26  {
27  GUESS = 0,
28  PRIMS,
29  POINTS
30  };
31  enum class Pivot
32  {
33  ORIGIN = 0,
34  CENTROID
35  };
36  enum class ViewportLOD
37  {
38  FULL = 0,
39  POINTS,
40  BOX,
41  CENTROID,
42  HIDDEN
43  };
44  enum class Xord
45  {
46  SRT = 0,
47  STR,
48  RST,
49  RTS,
50  TSR,
51  TRS
52  };
53  enum class Rord
54  {
55  XYZ = 0,
56  XZY,
57  YXZ,
58  YZX,
59  ZXY,
60  ZYX
61  };
62 }
63 
64 
66 {
67 public:
68  static int version() { return 1; }
69 
71  {
72  mySourceGroup = ""_sh;
73  mySourceGroupType = 0;
74  myNcy = 2;
75  myPack = false;
76  myPivot = 1;
77  myViewportLOD = 0;
78  myXord = 0;
79  myRord = 0;
80  myT = UT_Vector3D(0,0,0);
81  myR = UT_Vector3D(0,0,0);
82  myS = UT_Vector3D(1,1,1);
83  myShear = UT_Vector3D(0,0,0);
84  myScale = 1;
85  myP = UT_Vector3D(0,0,0);
86  myPr = UT_Vector3D(0,0,0);
87  myNewgroups = false;
88  myNewgroupprefix = "copyGroup"_sh;
89  myDocopyattrib = false;
90  myCopyattrib = "copynum"_sh;
91 
92  }
93 
94  explicit SOP_CopyTransformParms(const SOP_CopyTransformParms &) = default;
95 
97 
99  {
100  if (mySourceGroup != src.mySourceGroup) return false;
101  if (mySourceGroupType != src.mySourceGroupType) return false;
102  if (myNcy != src.myNcy) return false;
103  if (myPack != src.myPack) return false;
104  if (myPivot != src.myPivot) return false;
105  if (myViewportLOD != src.myViewportLOD) return false;
106  if (myXord != src.myXord) return false;
107  if (myRord != src.myRord) return false;
108  if (myT != src.myT) return false;
109  if (myR != src.myR) return false;
110  if (myS != src.myS) return false;
111  if (myShear != src.myShear) return false;
112  if (myScale != src.myScale) return false;
113  if (myP != src.myP) return false;
114  if (myPr != src.myPr) return false;
115  if (myNewgroups != src.myNewgroups) return false;
116  if (myNewgroupprefix != src.myNewgroupprefix) return false;
117  if (myDocopyattrib != src.myDocopyattrib) return false;
118  if (myCopyattrib != src.myCopyattrib) return false;
119 
120  return true;
121  }
123  {
124  return !operator==(src);
125  }
131 
132 
133 
134  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
135  {
136  mySourceGroup = ""_sh;
137  if (true)
138  graph->evalOpParm(mySourceGroup, nodeidx, "sourcegroup", time, 0);
139  mySourceGroupType = 0;
140  if (true)
141  graph->evalOpParm(mySourceGroupType, nodeidx, "sourcegrouptype", time, 0);
142  myNcy = 2;
143  if (true)
144  graph->evalOpParm(myNcy, nodeidx, "ncy", time, 0);
145  myPack = false;
146  if (true)
147  graph->evalOpParm(myPack, nodeidx, "pack", time, 0);
148  myPivot = 1;
149  if (true && ( (!(((getPack()==0)))) ) )
150  graph->evalOpParm(myPivot, nodeidx, "pivot", time, 0);
151  myViewportLOD = 0;
152  if (true && ( (!(((getPack()==0)))) ) )
153  graph->evalOpParm(myViewportLOD, nodeidx, "viewportlod", time, 0);
154  myXord = 0;
155  if (true)
156  graph->evalOpParm(myXord, nodeidx, "xOrd", time, 0);
157  myRord = 0;
158  if (true)
159  graph->evalOpParm(myRord, nodeidx, "rOrd", time, 0);
160  myT = UT_Vector3D(0,0,0);
161  if (true)
162  graph->evalOpParm(myT, nodeidx, "t", time, 0);
163  myR = UT_Vector3D(0,0,0);
164  if (true)
165  graph->evalOpParm(myR, nodeidx, "r", time, 0);
166  myS = UT_Vector3D(1,1,1);
167  if (true)
168  graph->evalOpParm(myS, nodeidx, "s", time, 0);
169  myShear = UT_Vector3D(0,0,0);
170  if (true)
171  graph->evalOpParm(myShear, nodeidx, "shear", time, 0);
172  myScale = 1;
173  if (true)
174  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
175  myP = UT_Vector3D(0,0,0);
176  if (true)
177  graph->evalOpParm(myP, nodeidx, "p", time, 0);
178  myPr = UT_Vector3D(0,0,0);
179  if (true)
180  graph->evalOpParm(myPr, nodeidx, "pr", time, 0);
181  myNewgroups = false;
182  if (true)
183  graph->evalOpParm(myNewgroups, nodeidx, "newgroups", time, 0);
184  myNewgroupprefix = "copyGroup"_sh;
185  if (true && ( (!(((getNewgroups()==0)))) ) )
186  graph->evalOpParm(myNewgroupprefix, nodeidx, "newgroupprefix", time, 0);
187  myDocopyattrib = false;
188  if (true)
189  graph->evalOpParm(myDocopyattrib, nodeidx, "docopyattrib", time, 0);
190  myCopyattrib = "copynum"_sh;
191  if (true && ( (!(((getDocopyattrib()==0)))) ) )
192  graph->evalOpParm(myCopyattrib, nodeidx, "copyattrib", time, 0);
193 
194  }
195 
196 
197  void loadFromOpSubclass(const LoadParms &loadparms) override
198  {
199  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
200  }
201 
202 
203  void copyFrom(const SOP_NodeParms *src) override
204  {
205  *this = *((const SOP_CopyTransformParms *)src);
206  }
207 
208  template <typename T>
209  void
210  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
211  {
212  if (idx.size() < 1)
213  return;
214  UT_ASSERT(idx.size() == instance.size()+1);
215  if (idx.size() != instance.size()+1)
216  return;
217  switch (idx[0])
218  {
219  case 0:
220  coerceValue(value, mySourceGroup);
221  break;
222  case 1:
223  coerceValue(value, mySourceGroupType);
224  break;
225  case 2:
226  coerceValue(value, myNcy);
227  break;
228  case 3:
229  coerceValue(value, myPack);
230  break;
231  case 4:
232  coerceValue(value, myPivot);
233  break;
234  case 5:
235  coerceValue(value, myViewportLOD);
236  break;
237  case 6:
238  coerceValue(value, myXord);
239  break;
240  case 7:
241  coerceValue(value, myRord);
242  break;
243  case 8:
244  coerceValue(value, myT);
245  break;
246  case 9:
247  coerceValue(value, myR);
248  break;
249  case 10:
250  coerceValue(value, myS);
251  break;
252  case 11:
253  coerceValue(value, myShear);
254  break;
255  case 12:
256  coerceValue(value, myScale);
257  break;
258  case 13:
259  coerceValue(value, myP);
260  break;
261  case 14:
262  coerceValue(value, myPr);
263  break;
264  case 15:
265  coerceValue(value, myNewgroups);
266  break;
267  case 16:
268  coerceValue(value, myNewgroupprefix);
269  break;
270  case 17:
271  coerceValue(value, myDocopyattrib);
272  break;
273  case 18:
274  coerceValue(value, myCopyattrib);
275  break;
276 
277  }
278  }
279 
280  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
301  { doGetParmValue(idx, instance, value); }
302 
303  template <typename T>
304  void
305  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
306  {
307  if (idx.size() < 1)
308  return;
309  UT_ASSERT(idx.size() == instance.size()+1);
310  if (idx.size() != instance.size()+1)
311  return;
312  switch (idx[0])
313  {
314  case 0:
315  coerceValue(mySourceGroup, value);
316  break;
317  case 1:
318  coerceValue(mySourceGroupType, value);
319  break;
320  case 2:
321  coerceValue(myNcy, value);
322  break;
323  case 3:
324  coerceValue(myPack, value);
325  break;
326  case 4:
327  coerceValue(myPivot, value);
328  break;
329  case 5:
330  coerceValue(myViewportLOD, value);
331  break;
332  case 6:
333  coerceValue(myXord, value);
334  break;
335  case 7:
336  coerceValue(myRord, value);
337  break;
338  case 8:
339  coerceValue(myT, value);
340  break;
341  case 9:
342  coerceValue(myR, value);
343  break;
344  case 10:
345  coerceValue(myS, value);
346  break;
347  case 11:
348  coerceValue(myShear, value);
349  break;
350  case 12:
351  coerceValue(myScale, value);
352  break;
353  case 13:
354  coerceValue(myP, value);
355  break;
356  case 14:
357  coerceValue(myPr, value);
358  break;
359  case 15:
360  coerceValue(myNewgroups, value);
361  break;
362  case 16:
363  coerceValue(myNewgroupprefix, value);
364  break;
365  case 17:
366  coerceValue(myDocopyattrib, value);
367  break;
368  case 18:
369  coerceValue(myCopyattrib, value);
370  break;
371 
372  }
373  }
374 
375  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
394  { doSetParmValue(idx, instance, value); }
395  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
396  { doSetParmValue(idx, instance, value); }
397 
398  exint getNestNumParms(TempIndex idx) const override
399  {
400  if (idx.size() == 0)
401  return 19;
402  switch (idx[0])
403  {
404 
405  }
406  // Invalid
407  return 0;
408  }
409 
410  const char *getNestParmName(TempIndex fieldnum) const override
411  {
412  if (fieldnum.size() < 1)
413  return 0;
414  switch (fieldnum[0])
415  {
416  case 0:
417  return "sourcegroup";
418  case 1:
419  return "sourcegrouptype";
420  case 2:
421  return "ncy";
422  case 3:
423  return "pack";
424  case 4:
425  return "pivot";
426  case 5:
427  return "viewportlod";
428  case 6:
429  return "xOrd";
430  case 7:
431  return "rOrd";
432  case 8:
433  return "t";
434  case 9:
435  return "r";
436  case 10:
437  return "s";
438  case 11:
439  return "shear";
440  case 12:
441  return "scale";
442  case 13:
443  return "p";
444  case 14:
445  return "pr";
446  case 15:
447  return "newgroups";
448  case 16:
449  return "newgroupprefix";
450  case 17:
451  return "docopyattrib";
452  case 18:
453  return "copyattrib";
454 
455  }
456  return 0;
457  }
458 
459  ParmType getNestParmType(TempIndex fieldnum) const override
460  {
461  if (fieldnum.size() < 1)
462  return PARM_UNSUPPORTED;
463  switch (fieldnum[0])
464  {
465  case 0:
466  return PARM_STRING;
467  case 1:
468  return PARM_INTEGER;
469  case 2:
470  return PARM_INTEGER;
471  case 3:
472  return PARM_INTEGER;
473  case 4:
474  return PARM_INTEGER;
475  case 5:
476  return PARM_INTEGER;
477  case 6:
478  return PARM_INTEGER;
479  case 7:
480  return PARM_INTEGER;
481  case 8:
482  return PARM_VECTOR3;
483  case 9:
484  return PARM_VECTOR3;
485  case 10:
486  return PARM_VECTOR3;
487  case 11:
488  return PARM_VECTOR3;
489  case 12:
490  return PARM_FLOAT;
491  case 13:
492  return PARM_VECTOR3;
493  case 14:
494  return PARM_VECTOR3;
495  case 15:
496  return PARM_INTEGER;
497  case 16:
498  return PARM_STRING;
499  case 17:
500  return PARM_INTEGER;
501  case 18:
502  return PARM_STRING;
503 
504  }
505  return PARM_UNSUPPORTED;
506  }
507 
508  // Boiler plate to load individual types.
509  static void loadData(UT_IStream &is, int64 &v)
510  { is.bread(&v, 1); }
511  static void loadData(UT_IStream &is, bool &v)
512  { int64 iv; is.bread(&iv, 1); v = iv; }
513  static void loadData(UT_IStream &is, fpreal64 &v)
514  { is.bread<fpreal64>(&v, 1); }
515  static void loadData(UT_IStream &is, UT_Vector2D &v)
516  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
517  static void loadData(UT_IStream &is, UT_Vector3D &v)
518  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
519  is.bread<fpreal64>(&v.z(), 1); }
520  static void loadData(UT_IStream &is, UT_Vector4D &v)
521  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
522  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
523  static void loadData(UT_IStream &is, UT_Matrix2D &v)
524  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
525  static void loadData(UT_IStream &is, UT_Matrix3D &v)
526  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
527  static void loadData(UT_IStream &is, UT_Matrix4D &v)
528  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
529  static void loadData(UT_IStream &is, UT_Vector2I &v)
530  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
531  static void loadData(UT_IStream &is, UT_Vector3I &v)
532  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
533  is.bread<int64>(&v.z(), 1); }
534  static void loadData(UT_IStream &is, UT_Vector4I &v)
535  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
536  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
538  { is.bread(v); }
540  { UT_StringHolder rampdata;
541  loadData(is, rampdata);
542  if (rampdata.isstring())
543  {
544  v.reset(new UT_Ramp());
545  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
546  v->load(istr);
547  }
548  else v.reset();
549  }
552  loadData(is, data);
553  if (data.isstring())
554  {
555  // Find the data type.
556  const char *colon = UT_StringWrap(data).findChar(':');
557  if (colon)
558  {
559  int typelen = colon - data.buffer();
561  type.strncpy(data.buffer(), typelen);
562  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
563 
564  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
565  }
566  }
567  else v.reset();
568  }
569 
570  static void saveData(std::ostream &os, int64 v)
571  { UTwrite(os, &v); }
572  static void saveData(std::ostream &os, bool v)
573  { int64 iv = v; UTwrite(os, &iv); }
574  static void saveData(std::ostream &os, fpreal64 v)
575  { UTwrite<fpreal64>(os, &v); }
576  static void saveData(std::ostream &os, UT_Vector2D v)
577  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
578  static void saveData(std::ostream &os, UT_Vector3D v)
579  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
580  UTwrite<fpreal64>(os, &v.z()); }
581  static void saveData(std::ostream &os, UT_Vector4D v)
582  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
583  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
584  static void saveData(std::ostream &os, UT_Matrix2D v)
586  static void saveData(std::ostream &os, UT_Matrix3D v)
588  static void saveData(std::ostream &os, UT_Matrix4D v)
590  static void saveData(std::ostream &os, UT_StringHolder s)
591  { UT_StringWrap(s).saveBinary(os); }
592  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
594  UT_OStringStream ostr;
595  if (s) s->save(ostr);
596  result = ostr.str();
597  saveData(os, result);
598  }
599  static void saveData(std::ostream &os, PRM_DataItemHandle s)
601  UT_OStringStream ostr;
602  if (s)
603  {
604  ostr << s->getDataTypeToken();
605  ostr << ":";
606  s->saveBinary(ostr);
607  }
608  result = ostr.str();
609  saveData(os, result);
610  }
611 
612 
613  void save(std::ostream &os) const
614  {
615  int32 v = version();
616  UTwrite(os, &v);
617  saveData(os, mySourceGroup);
618  saveData(os, mySourceGroupType);
619  saveData(os, myNcy);
620  saveData(os, myPack);
621  saveData(os, myPivot);
622  saveData(os, myViewportLOD);
623  saveData(os, myXord);
624  saveData(os, myRord);
625  saveData(os, myT);
626  saveData(os, myR);
627  saveData(os, myS);
628  saveData(os, myShear);
629  saveData(os, myScale);
630  saveData(os, myP);
631  saveData(os, myPr);
632  saveData(os, myNewgroups);
633  saveData(os, myNewgroupprefix);
634  saveData(os, myDocopyattrib);
635  saveData(os, myCopyattrib);
636 
637  }
638 
639  bool load(UT_IStream &is)
640  {
641  int32 v;
642  is.bread(&v, 1);
643  if (version() != v)
644  {
645  // Fail incompatible versions
646  return false;
647  }
648  loadData(is, mySourceGroup);
649  loadData(is, mySourceGroupType);
650  loadData(is, myNcy);
651  loadData(is, myPack);
652  loadData(is, myPivot);
653  loadData(is, myViewportLOD);
654  loadData(is, myXord);
655  loadData(is, myRord);
656  loadData(is, myT);
657  loadData(is, myR);
658  loadData(is, myS);
659  loadData(is, myShear);
660  loadData(is, myScale);
661  loadData(is, myP);
662  loadData(is, myPr);
663  loadData(is, myNewgroups);
664  loadData(is, myNewgroupprefix);
665  loadData(is, myDocopyattrib);
666  loadData(is, myCopyattrib);
667 
668  return true;
669  }
670 
671  const UT_StringHolder & getSourceGroup() const { return mySourceGroup; }
672  void setSourceGroup(const UT_StringHolder & val) { mySourceGroup = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getSourceGroup();
678  OP_Utils::evalOpParm(result, thissop, "sourcegroup", cookparms.getCookTime(), 0);
679  return result;
680  }
681  SourceGroupType getSourceGroupType() const { return SourceGroupType(mySourceGroupType); }
682  void setSourceGroupType(SourceGroupType val) { mySourceGroupType = int64(val); }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getSourceGroupType();
687  int64 result;
688  OP_Utils::evalOpParm(result, thissop, "sourcegrouptype", cookparms.getCookTime(), 0);
689  return SourceGroupType(result);
690  }
691  int64 getNcy() const { return myNcy; }
692  void setNcy(int64 val) { myNcy = val; }
693  int64 opNcy(const SOP_NodeVerb::CookParms &cookparms) const
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getNcy();
697  int64 result;
698  OP_Utils::evalOpParm(result, thissop, "ncy", cookparms.getCookTime(), 0);
699  return result;
700  }
701  bool getPack() const { return myPack; }
702  void setPack(bool val) { myPack = val; }
703  bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getPack();
707  bool result;
708  OP_Utils::evalOpParm(result, thissop, "pack", cookparms.getCookTime(), 0);
709  return result;
710  }
711  Pivot getPivot() const { return Pivot(myPivot); }
712  void setPivot(Pivot val) { myPivot = int64(val); }
713  Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getPivot();
717  int64 result;
718  OP_Utils::evalOpParm(result, thissop, "pivot", cookparms.getCookTime(), 0);
719  return Pivot(result);
720  }
721  ViewportLOD getViewportLOD() const { return ViewportLOD(myViewportLOD); }
722  void setViewportLOD(ViewportLOD val) { myViewportLOD = int64(val); }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getViewportLOD();
727  int64 result;
728  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
729  return ViewportLOD(result);
730  }
731  Xord getXord() const { return Xord(myXord); }
732  void setXord(Xord val) { myXord = int64(val); }
733  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getXord();
737  int64 result;
738  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
739  return Xord(result);
740  }
741  Rord getRord() const { return Rord(myRord); }
742  void setRord(Rord val) { myRord = int64(val); }
743  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getRord();
747  int64 result;
748  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
749  return Rord(result);
750  }
751  UT_Vector3D getT() const { return myT; }
752  void setT(UT_Vector3D val) { myT = val; }
753  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getT();
758  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
759  return result;
760  }
761  UT_Vector3D getR() const { return myR; }
762  void setR(UT_Vector3D val) { myR = val; }
763  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getR();
768  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
769  return result;
770  }
771  UT_Vector3D getS() const { return myS; }
772  void setS(UT_Vector3D val) { myS = val; }
773  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getS();
778  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
779  return result;
780  }
781  UT_Vector3D getShear() const { return myShear; }
782  void setShear(UT_Vector3D val) { myShear = val; }
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getShear();
788  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
789  return result;
790  }
791  fpreal64 getScale() const { return myScale; }
792  void setScale(fpreal64 val) { myScale = val; }
793  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getScale();
798  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
799  return result;
800  }
801  UT_Vector3D getP() const { return myP; }
802  void setP(UT_Vector3D val) { myP = val; }
803  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getP();
808  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
809  return result;
810  }
811  UT_Vector3D getPr() const { return myPr; }
812  void setPr(UT_Vector3D val) { myPr = val; }
813  UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
814  {
815  SOP_Node *thissop = cookparms.getNode();
816  if (!thissop) return getPr();
818  OP_Utils::evalOpParm(result, thissop, "pr", cookparms.getCookTime(), 0);
819  return result;
820  }
821  bool getNewgroups() const { return myNewgroups; }
822  void setNewgroups(bool val) { myNewgroups = val; }
823  bool opNewgroups(const SOP_NodeVerb::CookParms &cookparms) const
824  {
825  SOP_Node *thissop = cookparms.getNode();
826  if (!thissop) return getNewgroups();
827  bool result;
828  OP_Utils::evalOpParm(result, thissop, "newgroups", cookparms.getCookTime(), 0);
829  return result;
830  }
831  const UT_StringHolder & getNewgroupprefix() const { return myNewgroupprefix; }
832  void setNewgroupprefix(const UT_StringHolder & val) { myNewgroupprefix = val; }
834  {
835  SOP_Node *thissop = cookparms.getNode();
836  if (!thissop) return getNewgroupprefix();
838  OP_Utils::evalOpParm(result, thissop, "newgroupprefix", cookparms.getCookTime(), 0);
839  return result;
840  }
841  bool getDocopyattrib() const { return myDocopyattrib; }
842  void setDocopyattrib(bool val) { myDocopyattrib = val; }
843  bool opDocopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
844  {
845  SOP_Node *thissop = cookparms.getNode();
846  if (!thissop) return getDocopyattrib();
847  bool result;
848  OP_Utils::evalOpParm(result, thissop, "docopyattrib", cookparms.getCookTime(), 0);
849  return result;
850  }
851  const UT_StringHolder & getCopyattrib() const { return myCopyattrib; }
852  void setCopyattrib(const UT_StringHolder & val) { myCopyattrib = val; }
854  {
855  SOP_Node *thissop = cookparms.getNode();
856  if (!thissop) return getCopyattrib();
858  OP_Utils::evalOpParm(result, thissop, "copyattrib", cookparms.getCookTime(), 0);
859  return result;
860  }
861 
862 private:
863  UT_StringHolder mySourceGroup;
864  int64 mySourceGroupType;
865  int64 myNcy;
866  bool myPack;
867  int64 myPivot;
868  int64 myViewportLOD;
869  int64 myXord;
870  int64 myRord;
871  UT_Vector3D myT;
872  UT_Vector3D myR;
873  UT_Vector3D myS;
874  UT_Vector3D myShear;
875  fpreal64 myScale;
876  UT_Vector3D myP;
877  UT_Vector3D myPr;
878  bool myNewgroups;
879  UT_StringHolder myNewgroupprefix;
880  bool myDocopyattrib;
881  UT_StringHolder myCopyattrib;
882 
883 };
void setPr(UT_Vector3D val)
GLdouble s
Definition: glew.h:1390
int64 opNcy(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opSourceGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setViewportLOD(ViewportLOD val)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
UT_Vector3D getShear() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
void setNewgroupprefix(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setP(UT_Vector3D val)
UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
const GLdouble * v
Definition: glew.h:1391
bool opNewgroups(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opShear(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
void setS(UT_Vector3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, int64 v)
void setSourceGroupType(SourceGroupType val)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
double fpreal64
Definition: SYS_Types.h:201
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setCopyattrib(const UT_StringHolder &val)
bool operator==(const SOP_CopyTransformParms &src) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opNewgroupprefix(const SOP_NodeVerb::CookParms &cookparms) const
SourceGroupType opSourceGroupType(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void saveData(std::ostream &os, bool v)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getNewgroupprefix() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
bool opDocopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
const GLfloat * c
Definition: glew.h:16296
ParmType getNestParmType(TempIndex fieldnum) const override
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
const UT_StringHolder & getCopyattrib() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator!=(const SOP_CopyTransformParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void save(std::ostream &os) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opCopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setT(UT_Vector3D val)
ViewportLOD getViewportLOD() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getSourceGroup() const
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setSourceGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void loadData(UT_IStream &is, UT_Vector3I &v)
const char * getNestParmName(TempIndex fieldnum) const override
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:648
#define SOP_API
Definition: SOP_API.h:10
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
void setShear(UT_Vector3D val)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
ViewportLOD opViewportLOD(const SOP_NodeVerb::CookParms &cookparms) const
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
SourceGroupType getSourceGroupType() const
bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glew.h:1849
void setR(UT_Vector3D val)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void copyFrom(const SOP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override