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