HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVTransform-2.0.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 using namespace UT::Literal;
23 
24 class DEP_MicroNode;
25 namespace SOP_UVTransform_2_0Enums
26 {
27  enum class GroupType
28  {
29  GUESS = 0,
30  VERTICES,
31  EDGES,
32  POINTS,
33  PRIMS
34  };
35  enum class XOrd
36  {
37  SRT = 0,
38  STR,
39  RST,
40  RTS,
41  TSR,
42  TRS
43  };
44  enum class ROrd
45  {
46  XYZ = 0,
47  XZY,
48  YXZ,
49  YZX,
50  ZXY,
51  ZYX
52  };
53  enum class Type
54  {
55  LINEAR = 0,
56  QUADRATIC,
57  CUBIC,
58  META
59  };
60  enum class Metric
61  {
62  UV = 0,
63  UVW,
64  XYZ
65  };
66  enum class Visualizefalloff
67  {
68  NEVER = 0,
69  ALWAYS,
70  STATE
71  };
72 }
73 
74 
76 {
77 public:
78  static int version() { return 1; }
79 
81  {
82  myGroup = ""_sh;
83  myGroupType = 0;
84  myUVAttrib = "uv"_sh;
85  myXOrd = 0;
86  myROrd = 0;
87  myT = UT_Vector3D(0,0,0);
88  myR = UT_Vector3D(0,0,0);
89  myS = UT_Vector3D(1,1,1);
90  myShear = UT_Vector3D(0,0,0);
91  myP = UT_Vector3D(0,0,0);
92  myRad = 0;
93  myType = 2;
94  myTandeg = UT_Vector2D(0,0);
95  myKernel = "wyvill"_sh;
96  myMetric = 0;
97  myGlobal = false;
98  myUVGlobal = false;
99  myVisualizefalloff = 2;
100 
101  }
102 
103  explicit SOP_UVTransform_2_0Parms(const SOP_UVTransform_2_0Parms &) = default;
104 
106 
108  {
109  if (myGroup != src.myGroup) return false;
110  if (myGroupType != src.myGroupType) return false;
111  if (myUVAttrib != src.myUVAttrib) return false;
112  if (myXOrd != src.myXOrd) return false;
113  if (myROrd != src.myROrd) return false;
114  if (myT != src.myT) return false;
115  if (myR != src.myR) return false;
116  if (myS != src.myS) return false;
117  if (myShear != src.myShear) return false;
118  if (myP != src.myP) return false;
119  if (myRad != src.myRad) return false;
120  if (myType != src.myType) return false;
121  if (myTandeg != src.myTandeg) return false;
122  if (myKernel != src.myKernel) return false;
123  if (myMetric != src.myMetric) return false;
124  if (myGlobal != src.myGlobal) return false;
125  if (myUVGlobal != src.myUVGlobal) return false;
126  if (myVisualizefalloff != src.myVisualizefalloff) return false;
127 
128  return true;
129  }
131  {
132  return !operator==(src);
133  }
140 
141 
142 
143  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
144  {
145  myGroup = ""_sh;
146  if (true)
147  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
148  myGroupType = 0;
149  if (true)
150  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
151  myUVAttrib = "uv"_sh;
152  if (true)
153  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", 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  myP = UT_Vector3D(0,0,0);
173  if (true)
174  graph->evalOpParm(myP, nodeidx, "p", time, 0);
175  myRad = 0;
176  if (true)
177  graph->evalOpParm(myRad, nodeidx, "rad", time, 0);
178  myType = 2;
179  if (true)
180  graph->evalOpParm(myType, nodeidx, "type", time, 0);
181  myTandeg = UT_Vector2D(0,0);
182  if (true && ( (true&&!(((int64(getType())!=2)))) ) )
183  graph->evalOpParm(myTandeg, nodeidx, "tandeg", time, 0);
184  myKernel = "wyvill"_sh;
185  if (true && ( (true&&!(((int64(getType())!=3)))) ) )
186  graph->evalOpParm(myKernel, nodeidx, "kernel", time, 0);
187  myMetric = 0;
188  if (true)
189  graph->evalOpParm(myMetric, nodeidx, "metric", time, 0);
190  myGlobal = false;
191  if (true)
192  graph->evalOpParm(myGlobal, nodeidx, "global", time, 0);
193  myUVGlobal = false;
194  if (true)
195  graph->evalOpParm(myUVGlobal, nodeidx, "uvglobal", time, 0);
196  myVisualizefalloff = 2;
197  if (true)
198  graph->evalOpParm(myVisualizefalloff, nodeidx, "visualizefalloff", time, 0);
199 
200  }
201 
202 
203  void loadFromOpSubclass(const LoadParms &loadparms) override
204  {
205  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
206  }
207 
208 
209  void copyFrom(const SOP_NodeParms *src) override
210  {
211  *this = *((const SOP_UVTransform_2_0Parms *)src);
212  }
213 
214  template <typename T>
215  void
216  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
217  {
218  if (idx.size() < 1)
219  return;
220  UT_ASSERT(idx.size() == instance.size()+1);
221  if (idx.size() != instance.size()+1)
222  return;
223  switch (idx[0])
224  {
225  case 0:
226  coerceValue(value, myGroup);
227  break;
228  case 1:
229  coerceValue(value, myGroupType);
230  break;
231  case 2:
232  coerceValue(value, myUVAttrib);
233  break;
234  case 3:
235  coerceValue(value, myXOrd);
236  break;
237  case 4:
238  coerceValue(value, myROrd);
239  break;
240  case 5:
241  coerceValue(value, myT);
242  break;
243  case 6:
244  coerceValue(value, myR);
245  break;
246  case 7:
247  coerceValue(value, myS);
248  break;
249  case 8:
250  coerceValue(value, myShear);
251  break;
252  case 9:
253  coerceValue(value, myP);
254  break;
255  case 10:
256  coerceValue(value, myRad);
257  break;
258  case 11:
259  coerceValue(value, myType);
260  break;
261  case 12:
262  coerceValue(value, myTandeg);
263  break;
264  case 13:
265  coerceValue(value, myKernel);
266  break;
267  case 14:
268  coerceValue(value, myMetric);
269  break;
270  case 15:
271  coerceValue(value, myGlobal);
272  break;
273  case 16:
274  coerceValue(value, myUVGlobal);
275  break;
276  case 17:
277  coerceValue(value, myVisualizefalloff);
278  break;
279 
280  }
281  }
282 
283  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
304  { doGetParmValue(idx, instance, value); }
305 
306  template <typename T>
307  void
308  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
309  {
310  if (idx.size() < 1)
311  return;
312  UT_ASSERT(idx.size() == instance.size()+1);
313  if (idx.size() != instance.size()+1)
314  return;
315  switch (idx[0])
316  {
317  case 0:
318  coerceValue(myGroup, ( ( value ) ));
319  break;
320  case 1:
321  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(4, value ) ));
322  break;
323  case 2:
324  coerceValue(myUVAttrib, ( ( value ) ));
325  break;
326  case 3:
327  coerceValue(myXOrd, clampMinValue(0, clampMaxValue(5, value ) ));
328  break;
329  case 4:
330  coerceValue(myROrd, clampMinValue(0, clampMaxValue(5, value ) ));
331  break;
332  case 5:
333  coerceValue(myT, ( ( value ) ));
334  break;
335  case 6:
336  coerceValue(myR, ( ( value ) ));
337  break;
338  case 7:
339  coerceValue(myS, ( ( value ) ));
340  break;
341  case 8:
342  coerceValue(myShear, ( ( value ) ));
343  break;
344  case 9:
345  coerceValue(myP, ( ( value ) ));
346  break;
347  case 10:
348  coerceValue(myRad, clampMinValue(0, ( value ) ));
349  break;
350  case 11:
351  coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
352  break;
353  case 12:
354  coerceValue(myTandeg, ( ( value ) ));
355  break;
356  case 13:
357  coerceValue(myKernel, ( ( value ) ));
358  break;
359  case 14:
360  coerceValue(myMetric, clampMinValue(0, clampMaxValue(2, value ) ));
361  break;
362  case 15:
363  coerceValue(myGlobal, ( ( value ) ));
364  break;
365  case 16:
366  coerceValue(myUVGlobal, ( ( value ) ));
367  break;
368  case 17:
369  coerceValue(myVisualizefalloff, clampMinValue(0, clampMaxValue(2, 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 18;
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 "group";
418  case 1:
419  return "grouptype";
420  case 2:
421  return "uvattrib";
422  case 3:
423  return "xOrd";
424  case 4:
425  return "rOrd";
426  case 5:
427  return "t";
428  case 6:
429  return "r";
430  case 7:
431  return "s";
432  case 8:
433  return "shear";
434  case 9:
435  return "p";
436  case 10:
437  return "rad";
438  case 11:
439  return "type";
440  case 12:
441  return "tandeg";
442  case 13:
443  return "kernel";
444  case 14:
445  return "metric";
446  case 15:
447  return "global";
448  case 16:
449  return "uvglobal";
450  case 17:
451  return "visualizefalloff";
452 
453  }
454  return 0;
455  }
456 
457  ParmType getNestParmType(TempIndex fieldnum) const override
458  {
459  if (fieldnum.size() < 1)
460  return PARM_UNSUPPORTED;
461  switch (fieldnum[0])
462  {
463  case 0:
464  return PARM_STRING;
465  case 1:
466  return PARM_INTEGER;
467  case 2:
468  return PARM_STRING;
469  case 3:
470  return PARM_INTEGER;
471  case 4:
472  return PARM_INTEGER;
473  case 5:
474  return PARM_VECTOR3;
475  case 6:
476  return PARM_VECTOR3;
477  case 7:
478  return PARM_VECTOR3;
479  case 8:
480  return PARM_VECTOR3;
481  case 9:
482  return PARM_VECTOR3;
483  case 10:
484  return PARM_FLOAT;
485  case 11:
486  return PARM_INTEGER;
487  case 12:
488  return PARM_VECTOR2;
489  case 13:
490  return PARM_STRING;
491  case 14:
492  return PARM_INTEGER;
493  case 15:
494  return PARM_INTEGER;
495  case 16:
496  return PARM_INTEGER;
497  case 17:
498  return PARM_INTEGER;
499 
500  }
501  return PARM_UNSUPPORTED;
502  }
503 
504  // Boiler plate to load individual types.
505  static void loadData(UT_IStream &is, int64 &v)
506  { is.bread(&v, 1); }
507  static void loadData(UT_IStream &is, bool &v)
508  { int64 iv; is.bread(&iv, 1); v = iv; }
509  static void loadData(UT_IStream &is, fpreal64 &v)
510  { is.bread<fpreal64>(&v, 1); }
511  static void loadData(UT_IStream &is, UT_Vector2D &v)
512  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
513  static void loadData(UT_IStream &is, UT_Vector3D &v)
514  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
515  is.bread<fpreal64>(&v.z(), 1); }
516  static void loadData(UT_IStream &is, UT_Vector4D &v)
517  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
518  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
519  static void loadData(UT_IStream &is, UT_Matrix2D &v)
520  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
521  static void loadData(UT_IStream &is, UT_Matrix3D &v)
522  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
523  static void loadData(UT_IStream &is, UT_Matrix4D &v)
524  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
525  static void loadData(UT_IStream &is, UT_Vector2I &v)
526  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
527  static void loadData(UT_IStream &is, UT_Vector3I &v)
528  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
529  is.bread<int64>(&v.z(), 1); }
530  static void loadData(UT_IStream &is, UT_Vector4I &v)
531  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
532  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
534  { is.bread(v); }
536  { UT_StringHolder rampdata;
537  loadData(is, rampdata);
538  if (rampdata.isstring())
539  {
540  v.reset(new UT_Ramp());
541  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
542  v->load(istr);
543  }
544  else v.reset();
545  }
548  loadData(is, data);
549  if (data.isstring())
550  {
551  // Find the data type.
552  const char *colon = UT_StringWrap(data).findChar(':');
553  if (colon)
554  {
555  int typelen = colon - data.buffer();
557  type.strncpy(data.buffer(), typelen);
558  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
559 
560  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
561  }
562  }
563  else v.reset();
564  }
565 
566  static void saveData(std::ostream &os, int64 v)
567  { UTwrite(os, &v); }
568  static void saveData(std::ostream &os, bool v)
569  { int64 iv = v; UTwrite(os, &iv); }
570  static void saveData(std::ostream &os, fpreal64 v)
571  { UTwrite<fpreal64>(os, &v); }
572  static void saveData(std::ostream &os, UT_Vector2D v)
573  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
574  static void saveData(std::ostream &os, UT_Vector3D v)
575  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
576  UTwrite<fpreal64>(os, &v.z()); }
577  static void saveData(std::ostream &os, UT_Vector4D v)
578  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
579  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
580  static void saveData(std::ostream &os, UT_Matrix2D v)
582  static void saveData(std::ostream &os, UT_Matrix3D v)
584  static void saveData(std::ostream &os, UT_Matrix4D v)
586  static void saveData(std::ostream &os, UT_StringHolder s)
587  { UT_StringWrap(s).saveBinary(os); }
588  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
590  UT_OStringStream ostr;
591  if (s) s->save(ostr);
592  result = ostr.str();
593  saveData(os, result);
594  }
595  static void saveData(std::ostream &os, PRM_DataItemHandle s)
597  UT_OStringStream ostr;
598  if (s)
599  {
600  ostr << s->getDataTypeToken();
601  ostr << ":";
602  s->saveBinary(ostr);
603  }
604  result = ostr.str();
605  saveData(os, result);
606  }
607 
608 
609  void save(std::ostream &os) const
610  {
611  int32 v = version();
612  UTwrite(os, &v);
613  saveData(os, myGroup);
614  saveData(os, myGroupType);
615  saveData(os, myUVAttrib);
616  saveData(os, myXOrd);
617  saveData(os, myROrd);
618  saveData(os, myT);
619  saveData(os, myR);
620  saveData(os, myS);
621  saveData(os, myShear);
622  saveData(os, myP);
623  saveData(os, myRad);
624  saveData(os, myType);
625  saveData(os, myTandeg);
626  saveData(os, myKernel);
627  saveData(os, myMetric);
628  saveData(os, myGlobal);
629  saveData(os, myUVGlobal);
630  saveData(os, myVisualizefalloff);
631 
632  }
633 
634  bool load(UT_IStream &is)
635  {
636  int32 v;
637  is.bread(&v, 1);
638  if (version() != v)
639  {
640  // Fail incompatible versions
641  return false;
642  }
643  loadData(is, myGroup);
644  loadData(is, myGroupType);
645  loadData(is, myUVAttrib);
646  loadData(is, myXOrd);
647  loadData(is, myROrd);
648  loadData(is, myT);
649  loadData(is, myR);
650  loadData(is, myS);
651  loadData(is, myShear);
652  loadData(is, myP);
653  loadData(is, myRad);
654  loadData(is, myType);
655  loadData(is, myTandeg);
656  loadData(is, myKernel);
657  loadData(is, myMetric);
658  loadData(is, myGlobal);
659  loadData(is, myUVGlobal);
660  loadData(is, myVisualizefalloff);
661 
662  return true;
663  }
664 
665  const UT_StringHolder & getGroup() const { return myGroup; }
666  void setGroup(const UT_StringHolder & val) { myGroup = val; }
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getGroup();
672  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
673  return result;
674  }
675  GroupType getGroupType() const { return GroupType(myGroupType); }
676  void setGroupType(GroupType val) { myGroupType = int64(val); }
678  {
679  SOP_Node *thissop = cookparms.getNode();
680  if (!thissop) return getGroupType();
681  int64 result;
682  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
683  return GroupType(result);
684  }
685  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
686  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
688  {
689  SOP_Node *thissop = cookparms.getNode();
690  if (!thissop) return getUVAttrib();
692  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
693  return result;
694  }
695  XOrd getXOrd() const { return XOrd(myXOrd); }
696  void setXOrd(XOrd val) { myXOrd = int64(val); }
697  XOrd opXOrd(const SOP_NodeVerb::CookParms &cookparms) const
698  {
699  SOP_Node *thissop = cookparms.getNode();
700  if (!thissop) return getXOrd();
701  int64 result;
702  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
703  return XOrd(result);
704  }
705  ROrd getROrd() const { return ROrd(myROrd); }
706  void setROrd(ROrd val) { myROrd = int64(val); }
707  ROrd opROrd(const SOP_NodeVerb::CookParms &cookparms) const
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getROrd();
711  int64 result;
712  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
713  return ROrd(result);
714  }
715  UT_Vector3D getT() const { return myT; }
716  void setT(UT_Vector3D val) { myT = val; }
717  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
718  {
719  SOP_Node *thissop = cookparms.getNode();
720  if (!thissop) return getT();
722  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
723  return result;
724  }
725  UT_Vector3D getR() const { return myR; }
726  void setR(UT_Vector3D val) { myR = val; }
727  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
728  {
729  SOP_Node *thissop = cookparms.getNode();
730  if (!thissop) return getR();
732  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
733  return result;
734  }
735  UT_Vector3D getS() const { return myS; }
736  void setS(UT_Vector3D val) { myS = val; }
737  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
738  {
739  SOP_Node *thissop = cookparms.getNode();
740  if (!thissop) return getS();
742  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
743  return result;
744  }
745  UT_Vector3D getShear() const { return myShear; }
746  void setShear(UT_Vector3D val) { myShear = val; }
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return getShear();
752  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
753  return result;
754  }
755  UT_Vector3D getP() const { return myP; }
756  void setP(UT_Vector3D val) { myP = val; }
757  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
758  {
759  SOP_Node *thissop = cookparms.getNode();
760  if (!thissop) return getP();
762  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
763  return result;
764  }
765  fpreal64 getRad() const { return myRad; }
766  void setRad(fpreal64 val) { myRad = val; }
767  fpreal64 opRad(const SOP_NodeVerb::CookParms &cookparms) const
768  {
769  SOP_Node *thissop = cookparms.getNode();
770  if (!thissop) return getRad();
772  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
773  return result;
774  }
775  Type getType() const { return Type(myType); }
776  void setType(Type val) { myType = int64(val); }
777  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
778  {
779  SOP_Node *thissop = cookparms.getNode();
780  if (!thissop) return getType();
781  int64 result;
782  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
783  return Type(result);
784  }
785  UT_Vector2D getTandeg() const { return myTandeg; }
786  void setTandeg(UT_Vector2D val) { myTandeg = val; }
788  {
789  SOP_Node *thissop = cookparms.getNode();
790  if (!thissop) return getTandeg();
792  OP_Utils::evalOpParm(result, thissop, "tandeg", cookparms.getCookTime(), 0);
793  return result;
794  }
795  const UT_StringHolder & getKernel() const { return myKernel; }
796  void setKernel(const UT_StringHolder & val) { myKernel = val; }
798  {
799  SOP_Node *thissop = cookparms.getNode();
800  if (!thissop) return getKernel();
802  OP_Utils::evalOpParm(result, thissop, "kernel", cookparms.getCookTime(), 0);
803  return result;
804  }
805  Metric getMetric() const { return Metric(myMetric); }
806  void setMetric(Metric val) { myMetric = int64(val); }
807  Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return getMetric();
811  int64 result;
812  OP_Utils::evalOpParm(result, thissop, "metric", cookparms.getCookTime(), 0);
813  return Metric(result);
814  }
815  bool getGlobal() const { return myGlobal; }
816  void setGlobal(bool val) { myGlobal = val; }
817  bool opGlobal(const SOP_NodeVerb::CookParms &cookparms) const
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return getGlobal();
821  bool result;
822  OP_Utils::evalOpParm(result, thissop, "global", cookparms.getCookTime(), 0);
823  return result;
824  }
825  bool getUVGlobal() const { return myUVGlobal; }
826  void setUVGlobal(bool val) { myUVGlobal = val; }
827  bool opUVGlobal(const SOP_NodeVerb::CookParms &cookparms) const
828  {
829  SOP_Node *thissop = cookparms.getNode();
830  if (!thissop) return getUVGlobal();
831  bool result;
832  OP_Utils::evalOpParm(result, thissop, "uvglobal", cookparms.getCookTime(), 0);
833  return result;
834  }
835  Visualizefalloff getVisualizefalloff() const { return Visualizefalloff(myVisualizefalloff); }
836  void setVisualizefalloff(Visualizefalloff val) { myVisualizefalloff = int64(val); }
838  {
839  SOP_Node *thissop = cookparms.getNode();
840  if (!thissop) return getVisualizefalloff();
841  int64 result;
842  OP_Utils::evalOpParm(result, thissop, "visualizefalloff", cookparms.getCookTime(), 0);
843  return Visualizefalloff(result);
844  }
845 
846 private:
847  UT_StringHolder myGroup;
848  int64 myGroupType;
849  UT_StringHolder myUVAttrib;
850  int64 myXOrd;
851  int64 myROrd;
852  UT_Vector3D myT;
853  UT_Vector3D myR;
854  UT_Vector3D myS;
855  UT_Vector3D myShear;
856  UT_Vector3D myP;
857  fpreal64 myRad;
858  int64 myType;
859  UT_Vector2D myTandeg;
860  UT_StringHolder myKernel;
861  int64 myMetric;
862  bool myGlobal;
863  bool myUVGlobal;
864  int64 myVisualizefalloff;
865 
866 };
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
type
Definition: core.h:977
ROrd opROrd(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setKernel(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
Visualizefalloff getVisualizefalloff() const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
int int32
Definition: SYS_Types.h:39
XOrd opXOrd(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2T< fpreal64 > UT_Vector2D
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
const GLfloat * c
Definition: glew.h:16631
static void loadData(UT_IStream &is, UT_Matrix4D &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, bool v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
GLenum src
Definition: glcorearb.h:1792
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getUVAttrib() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
double fpreal64
Definition: SYS_Types.h:201
bool operator!=(const SOP_UVTransform_2_0Parms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
bool opGlobal(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const GLdouble * v
Definition: glcorearb.h:836
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_Vector3D opShear(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getKernel() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_StringHolder opKernel(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
ParmType getNestParmType(TempIndex fieldnum) const override
GLboolean * data
Definition: glcorearb.h:130
fpreal64 opRad(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLuint GLfloat * val
Definition: glcorearb.h:1607
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void save(std::ostream &os) const
UT_Vector2D opTandeg(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, int64 v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setGroup(const UT_StringHolder &val)
void setVisualizefalloff(Visualizefalloff val)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
#define SOP_API
Definition: SOP_API.h:10
GLsizei const GLfloat * value
Definition: glcorearb.h:823
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
bool operator==(const SOP_UVTransform_2_0Parms &src) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setUVAttrib(const UT_StringHolder &val)
bool opUVGlobal(const SOP_NodeVerb::CookParms &cookparms) const
Visualizefalloff opVisualizefalloff(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, int64 &v)
const char * findChar(int c) const
Definition: UT_String.h:1371
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:171
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GLboolean r
Definition: glcorearb.h:1221
void copyFrom(const SOP_NodeParms *src) override
GLdouble s
Definition: glew.h:1395
void loadFromOpSubclass(const LoadParms &loadparms) override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const