HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVFuse.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 <OP/OP_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_UVFuseEnums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
28  VERTICES,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::GUESS: return "guess"_sh;
40  case Grouptype::VERTICES: return "vertices"_sh;
41  case Grouptype::EDGES: return "edges"_sh;
42  case Grouptype::POINTS: return "points"_sh;
43  case Grouptype::PRIMS: return "prims"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Postype
49  {
50  AVG = 0,
51  FIRST
52  };
53 
55  getToken(Postype enum_value)
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case Postype::AVG: return "avg"_sh;
60  case Postype::FIRST: return "first"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class Metric
66  {
67  UV = 0,
68  UVW,
69  XYZ
70  };
71 
73  getToken(Metric enum_value)
74  {
75  using namespace UT::Literal;
76  switch (enum_value) {
77  case Metric::UV: return "uv"_sh;
78  case Metric::UVW: return "uvw"_sh;
79  case Metric::XYZ: return "xyz"_sh;
80  default: UT_ASSERT(false); return ""_sh;
81  }
82  }
83 
84  enum class Gridtype
85  {
86  SPACING = 0,
87  LINES,
88  POW2
89  };
90 
92  getToken(Gridtype enum_value)
93  {
94  using namespace UT::Literal;
95  switch (enum_value) {
96  case Gridtype::SPACING: return "spacing"_sh;
97  case Gridtype::LINES: return "lines"_sh;
98  case Gridtype::POW2: return "pow2"_sh;
99  default: UT_ASSERT(false); return ""_sh;
100  }
101  }
102 
103  enum class Gridround
104  {
105  NEAREST = 0,
106  DOWN,
107  UP
108  };
109 
111  getToken(Gridround enum_value)
112  {
113  using namespace UT::Literal;
114  switch (enum_value) {
115  case Gridround::NEAREST: return "nearest"_sh;
116  case Gridround::DOWN: return "down"_sh;
117  case Gridround::UP: return "up"_sh;
118  default: UT_ASSERT(false); return ""_sh;
119  }
120  }
121 
122 }
123 
124 
126 {
127 public:
128  static int version() { return 1; }
129 
131  {
132  myUvattrib = "uv"_UTsh;
133  myGroup = ""_UTsh;
134  myGrouptype = 0;
135  myPostype = 0;
136  myUsedist = false;
137  myDist = 0.001;
138  myMetric = 0;
139  myManpos = 0;
140  myUvw = UT_Vector3D(0,0,0);
141  myGridtype = 0;
142  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
143  myGridlines = UT_Vector3D(10,10,10);
144  myGridpow2 = UT_Vector3I(3,3,3);
145  myGridoffset = UT_Vector3D(0,0,0);
146  myGridround = 0;
147  myGridtol = 10;
148 
149  }
150 
151  explicit SOP_UVFuseParms(const SOP_UVFuseParms &) = default;
152  SOP_UVFuseParms &operator=(const SOP_UVFuseParms &) = default;
153  SOP_UVFuseParms(SOP_UVFuseParms &&) noexcept = default;
154  SOP_UVFuseParms &operator=(SOP_UVFuseParms &&) noexcept = default;
155 
156  ~SOP_UVFuseParms() override {}
157 
158  bool operator==(const SOP_UVFuseParms &src) const
159  {
160  if (myUvattrib != src.myUvattrib) return false;
161  if (myGroup != src.myGroup) return false;
162  if (myGrouptype != src.myGrouptype) return false;
163  if (myPostype != src.myPostype) return false;
164  if (myUsedist != src.myUsedist) return false;
165  if (myDist != src.myDist) return false;
166  if (myMetric != src.myMetric) return false;
167  if (myManpos != src.myManpos) return false;
168  if (myUvw != src.myUvw) return false;
169  if (myGridtype != src.myGridtype) return false;
170  if (myGridspacing != src.myGridspacing) return false;
171  if (myGridlines != src.myGridlines) return false;
172  if (myGridpow2 != src.myGridpow2) return false;
173  if (myGridoffset != src.myGridoffset) return false;
174  if (myGridround != src.myGridround) return false;
175  if (myGridtol != src.myGridtol) return false;
176 
177 
178  if (baseGetSignature() != src.baseGetSignature()) return false;
179 
180  return true;
181  }
182  bool operator!=(const SOP_UVFuseParms &src) const
183  {
184  return !operator==(src);
185  }
191 
192 
193 
194  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
195  {
196  myUvattrib = "uv"_UTsh;
197  if (true)
198  graph->evalOpParm(myUvattrib, nodeidx, "uvattrib", time, graph->isDirect()?nullptr:depnode);
199  myGroup = ""_UTsh;
200  if (true)
201  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
202  myGrouptype = 0;
203  if (true)
204  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, graph->isDirect()?nullptr:depnode);
205  myPostype = 0;
206  if (true)
207  graph->evalOpParm(myPostype, nodeidx, "postype", time, graph->isDirect()?nullptr:depnode);
208  myUsedist = false;
209  if (true)
210  graph->evalOpParm(myUsedist, nodeidx, "usedist", time, graph->isDirect()?nullptr:depnode);
211  myDist = 0.001;
212  if (true && ( (true&&!(((getUsedist()==0)))) ) )
213  graph->evalOpParm(myDist, nodeidx, "dist", time, graph->isDirect()?nullptr:depnode);
214  myMetric = 0;
215  if (true && ( (true&&!(((getUsedist()==0)))) ) )
216  graph->evalOpParm(myMetric, nodeidx, "metric", time, graph->isDirect()?nullptr:depnode);
217  myManpos = 0;
218  if (true)
219  graph->evalOpParm(myManpos, nodeidx, "manpos", time, graph->isDirect()?nullptr:depnode);
220  myUvw = UT_Vector3D(0,0,0);
221  if (true)
222  graph->evalOpParm(myUvw, nodeidx, "uvw", time, graph->isDirect()?nullptr:depnode);
223  myGridtype = 0;
224  if (true)
225  graph->evalOpParm(myGridtype, nodeidx, "gridtype", time, graph->isDirect()?nullptr:depnode);
226  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
227  if (true && ( (true&&!(((int64(getGridtype())!=0)))) ) )
228  graph->evalOpParm(myGridspacing, nodeidx, "gridspacing", time, graph->isDirect()?nullptr:depnode);
229  myGridlines = UT_Vector3D(10,10,10);
230  if (true && ( (true&&!(((int64(getGridtype())!=1)))) ) )
231  graph->evalOpParm(myGridlines, nodeidx, "gridlines", time, graph->isDirect()?nullptr:depnode);
232  myGridpow2 = UT_Vector3I(3,3,3);
233  if (true && ( (true&&!(((int64(getGridtype())!=2)))) ) )
234  graph->evalOpParm(myGridpow2, nodeidx, "gridpow2", time, graph->isDirect()?nullptr:depnode);
235  myGridoffset = UT_Vector3D(0,0,0);
236  if (true)
237  graph->evalOpParm(myGridoffset, nodeidx, "gridoffset", time, graph->isDirect()?nullptr:depnode);
238  myGridround = 0;
239  if (true)
240  graph->evalOpParm(myGridround, nodeidx, "gridround", time, graph->isDirect()?nullptr:depnode);
241  myGridtol = 10;
242  if (true)
243  graph->evalOpParm(myGridtol, nodeidx, "gridtol", time, graph->isDirect()?nullptr:depnode);
244 
245  }
246 
247 
248  void loadFromOpSubclass(const LoadParms &loadparms) override
249  {
250  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
251  }
252 
253 
254  void copyFrom(const OP_NodeParms *src) override
255  {
256  *this = *((const SOP_UVFuseParms *)src);
257  }
258 
259  template <typename T>
260  void
261  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
262  {
263  if (idx.size() < 1)
264  return;
265  UT_ASSERT(idx.size() == instance.size()+1);
266  if (idx.size() != instance.size()+1)
267  return;
268  switch (idx[0])
269  {
270  case 0:
271  coerceValue(value, myUvattrib);
272  break;
273  case 1:
274  coerceValue(value, myGroup);
275  break;
276  case 2:
277  coerceValue(value, myGrouptype);
278  break;
279  case 3:
280  coerceValue(value, myPostype);
281  break;
282  case 4:
283  coerceValue(value, myUsedist);
284  break;
285  case 5:
286  coerceValue(value, myDist);
287  break;
288  case 6:
289  coerceValue(value, myMetric);
290  break;
291  case 7:
292  coerceValue(value, myManpos);
293  break;
294  case 8:
295  coerceValue(value, myUvw);
296  break;
297  case 9:
298  coerceValue(value, myGridtype);
299  break;
300  case 10:
301  coerceValue(value, myGridspacing);
302  break;
303  case 11:
304  coerceValue(value, myGridlines);
305  break;
306  case 12:
307  coerceValue(value, myGridpow2);
308  break;
309  case 13:
310  coerceValue(value, myGridoffset);
311  break;
312  case 14:
313  coerceValue(value, myGridround);
314  break;
315  case 15:
316  coerceValue(value, myGridtol);
317  break;
318 
319  }
320  }
321 
322  bool isParmColorRamp(exint idx) const override
323  {
324  switch (idx)
325  {
326 
327  }
328  return false;
329  }
330 
331  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
332  { doGetParmValue(idx, instance, value); }
333  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
334  { doGetParmValue(idx, instance, value); }
335  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
336  { doGetParmValue(idx, instance, value); }
337  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
338  { doGetParmValue(idx, instance, value); }
339  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
340  { doGetParmValue(idx, instance, value); }
341  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
342  { doGetParmValue(idx, instance, value); }
343  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
344  { doGetParmValue(idx, instance, value); }
345  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
346  { doGetParmValue(idx, instance, value); }
347  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
348  { doGetParmValue(idx, instance, value); }
349  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
350  { doGetParmValue(idx, instance, value); }
351  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
352  { doGetParmValue(idx, instance, value); }
353 
354  template <typename T>
355  void
356  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
357  {
358  if (idx.size() < 1)
359  return;
360  UT_ASSERT(idx.size() == instance.size()+1);
361  if (idx.size() != instance.size()+1)
362  return;
363  switch (idx[0])
364  {
365  case 0:
366  coerceValue(myUvattrib, ( ( value ) ));
367  break;
368  case 1:
369  coerceValue(myGroup, ( ( value ) ));
370  break;
371  case 2:
372  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
373  break;
374  case 3:
375  coerceValue(myPostype, clampMinValue(0, clampMaxValue(1, value ) ));
376  break;
377  case 4:
378  coerceValue(myUsedist, ( ( value ) ));
379  break;
380  case 5:
381  coerceValue(myDist, clampMinValue(0, ( value ) ));
382  break;
383  case 6:
384  coerceValue(myMetric, clampMinValue(0, clampMaxValue(2, value ) ));
385  break;
386  case 7:
387  coerceValue(myManpos, ( ( value ) ));
388  break;
389  case 8:
390  coerceValue(myUvw, ( ( value ) ));
391  break;
392  case 9:
393  coerceValue(myGridtype, clampMinValue(0, clampMaxValue(2, value ) ));
394  break;
395  case 10:
396  coerceValue(myGridspacing, ( ( value ) ));
397  break;
398  case 11:
399  coerceValue(myGridlines, ( ( value ) ));
400  break;
401  case 12:
402  coerceValue(myGridpow2, ( ( value ) ));
403  break;
404  case 13:
405  coerceValue(myGridoffset, ( ( value ) ));
406  break;
407  case 14:
408  coerceValue(myGridround, clampMinValue(0, clampMaxValue(2, value ) ));
409  break;
410  case 15:
411  coerceValue(myGridtol, clampMinValue(0, ( value ) ));
412  break;
413 
414  }
415  }
416 
417  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
418  { doSetParmValue(idx, instance, value); }
419  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
420  { doSetParmValue(idx, instance, value); }
421  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
422  { doSetParmValue(idx, instance, value); }
423  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
424  { doSetParmValue(idx, instance, value); }
425  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
426  { doSetParmValue(idx, instance, value); }
427  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
428  { doSetParmValue(idx, instance, value); }
429  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
430  { doSetParmValue(idx, instance, value); }
431  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
432  { doSetParmValue(idx, instance, value); }
433  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
434  { doSetParmValue(idx, instance, value); }
435  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
436  { doSetParmValue(idx, instance, value); }
437  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
438  { doSetParmValue(idx, instance, value); }
439 
440  exint getNestNumParms(TempIndex idx) const override
441  {
442  if (idx.size() == 0)
443  return 16;
444  switch (idx[0])
445  {
446 
447  }
448  // Invalid
449  return 0;
450  }
451 
452  const char *getNestParmName(TempIndex fieldnum) const override
453  {
454  if (fieldnum.size() < 1)
455  return 0;
456  switch (fieldnum[0])
457  {
458  case 0:
459  return "uvattrib";
460  case 1:
461  return "group";
462  case 2:
463  return "grouptype";
464  case 3:
465  return "postype";
466  case 4:
467  return "usedist";
468  case 5:
469  return "dist";
470  case 6:
471  return "metric";
472  case 7:
473  return "manpos";
474  case 8:
475  return "uvw";
476  case 9:
477  return "gridtype";
478  case 10:
479  return "gridspacing";
480  case 11:
481  return "gridlines";
482  case 12:
483  return "gridpow2";
484  case 13:
485  return "gridoffset";
486  case 14:
487  return "gridround";
488  case 15:
489  return "gridtol";
490 
491  }
492  return 0;
493  }
494 
495  ParmType getNestParmType(TempIndex fieldnum) const override
496  {
497  if (fieldnum.size() < 1)
498  return PARM_UNSUPPORTED;
499  switch (fieldnum[0])
500  {
501  case 0:
502  return PARM_STRING;
503  case 1:
504  return PARM_STRING;
505  case 2:
506  return PARM_INTEGER;
507  case 3:
508  return PARM_INTEGER;
509  case 4:
510  return PARM_INTEGER;
511  case 5:
512  return PARM_FLOAT;
513  case 6:
514  return PARM_INTEGER;
515  case 7:
516  return PARM_INTEGER;
517  case 8:
518  return PARM_VECTOR3;
519  case 9:
520  return PARM_INTEGER;
521  case 10:
522  return PARM_VECTOR3;
523  case 11:
524  return PARM_VECTOR3;
525  case 12:
526  return PARM_VECTOR3;
527  case 13:
528  return PARM_VECTOR3;
529  case 14:
530  return PARM_INTEGER;
531  case 15:
532  return PARM_FLOAT;
533 
534  }
535  return PARM_UNSUPPORTED;
536  }
537 
538  // Boiler plate to load individual types.
539  static void loadData(UT_IStream &is, int64 &v)
540  { is.bread(&v, 1); }
541  static void loadData(UT_IStream &is, bool &v)
542  { int64 iv; is.bread(&iv, 1); v = iv; }
543  static void loadData(UT_IStream &is, fpreal64 &v)
544  { is.bread<fpreal64>(&v, 1); }
545  static void loadData(UT_IStream &is, UT_Vector2D &v)
546  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
547  static void loadData(UT_IStream &is, UT_Vector3D &v)
548  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
549  is.bread<fpreal64>(&v.z(), 1); }
550  static void loadData(UT_IStream &is, UT_Vector4D &v)
551  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
552  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
553  static void loadData(UT_IStream &is, UT_Matrix2D &v)
554  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
555  static void loadData(UT_IStream &is, UT_Matrix3D &v)
556  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
557  static void loadData(UT_IStream &is, UT_Matrix4D &v)
558  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
559  static void loadData(UT_IStream &is, UT_Vector2I &v)
560  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
561  static void loadData(UT_IStream &is, UT_Vector3I &v)
562  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
563  is.bread<int64>(&v.z(), 1); }
564  static void loadData(UT_IStream &is, UT_Vector4I &v)
565  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
566  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
568  { is.bread(v); }
570  { UT_StringHolder rampdata;
571  loadData(is, rampdata);
572  if (rampdata.isstring())
573  {
574  v.reset(new UT_Ramp());
575  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
576  v->load(istr);
577  }
578  else v.reset();
579  }
582  loadData(is, data);
583  if (data.isstring())
584  {
585  // Find the data type.
586  const char *colon = UT_StringWrap(data).findChar(':');
587  if (colon)
588  {
589  int typelen = colon - data.buffer();
591  type.strncpy(data.buffer(), typelen);
592  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
593 
594  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
595  }
596  }
597  else v.reset();
598  }
599 
600  static void saveData(std::ostream &os, int64 v)
601  { UTwrite(os, &v); }
602  static void saveData(std::ostream &os, bool v)
603  { int64 iv = v; UTwrite(os, &iv); }
604  static void saveData(std::ostream &os, fpreal64 v)
605  { UTwrite<fpreal64>(os, &v); }
606  static void saveData(std::ostream &os, UT_Vector2D v)
607  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
608  static void saveData(std::ostream &os, UT_Vector3D v)
609  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
610  UTwrite<fpreal64>(os, &v.z()); }
611  static void saveData(std::ostream &os, UT_Vector4D v)
612  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
613  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
614  static void saveData(std::ostream &os, UT_Matrix2D v)
616  static void saveData(std::ostream &os, UT_Matrix3D v)
618  static void saveData(std::ostream &os, UT_Matrix4D v)
620  static void saveData(std::ostream &os, UT_StringHolder s)
621  { UT_StringWrap(s).saveBinary(os); }
622  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
624  UT_OStringStream ostr;
625  if (s) s->save(ostr);
626  result = ostr.str();
627  saveData(os, result);
628  }
629  static void saveData(std::ostream &os, PRM_DataItemHandle s)
631  UT_OStringStream ostr;
632  if (s)
633  {
634  ostr << s->getDataTypeToken();
635  ostr << ":";
636  s->saveBinary(ostr);
637  }
638  result = ostr.str();
639  saveData(os, result);
640  }
641 
642 
643  void save(std::ostream &os) const
644  {
645  int32 v = version();
646  UTwrite(os, &v);
647  saveData(os, myUvattrib);
648  saveData(os, myGroup);
649  saveData(os, myGrouptype);
650  saveData(os, myPostype);
651  saveData(os, myUsedist);
652  saveData(os, myDist);
653  saveData(os, myMetric);
654  saveData(os, myManpos);
655  saveData(os, myUvw);
656  saveData(os, myGridtype);
657  saveData(os, myGridspacing);
658  saveData(os, myGridlines);
659  saveData(os, myGridpow2);
660  saveData(os, myGridoffset);
661  saveData(os, myGridround);
662  saveData(os, myGridtol);
663 
664  }
665 
666  bool load(UT_IStream &is)
667  {
668  int32 v;
669  is.bread(&v, 1);
670  if (version() != v)
671  {
672  // Fail incompatible versions
673  return false;
674  }
675  loadData(is, myUvattrib);
676  loadData(is, myGroup);
677  loadData(is, myGrouptype);
678  loadData(is, myPostype);
679  loadData(is, myUsedist);
680  loadData(is, myDist);
681  loadData(is, myMetric);
682  loadData(is, myManpos);
683  loadData(is, myUvw);
684  loadData(is, myGridtype);
685  loadData(is, myGridspacing);
686  loadData(is, myGridlines);
687  loadData(is, myGridpow2);
688  loadData(is, myGridoffset);
689  loadData(is, myGridround);
690  loadData(is, myGridtol);
691 
692  return true;
693  }
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  const UT_StringHolder & getGroup() const { return myGroup; }
706  void setGroup(const UT_StringHolder & val) { myGroup = val; }
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getGroup();
712  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
713  return result;
714  }
715  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
716  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
718  {
719  SOP_Node *thissop = cookparms.getNode();
720  if (!thissop) return getGrouptype();
721  int64 result;
722  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
723  return Grouptype(result);
724  }
725  Postype getPostype() const { return Postype(myPostype); }
726  void setPostype(Postype val) { myPostype = int64(val); }
727  Postype opPostype(const SOP_NodeVerb::CookParms &cookparms) const
728  {
729  SOP_Node *thissop = cookparms.getNode();
730  if (!thissop) return getPostype();
731  int64 result;
732  OP_Utils::evalOpParm(result, thissop, "postype", cookparms.getCookTime(), 0);
733  return Postype(result);
734  }
735  bool getUsedist() const { return myUsedist; }
736  void setUsedist(bool val) { myUsedist = val; }
737  bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
738  {
739  SOP_Node *thissop = cookparms.getNode();
740  if (!thissop) return getUsedist();
741  bool result;
742  OP_Utils::evalOpParm(result, thissop, "usedist", cookparms.getCookTime(), 0);
743  return result;
744  }
745  fpreal64 getDist() const { return myDist; }
746  void setDist(fpreal64 val) { myDist = val; }
747  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return getDist();
752  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
753  return result;
754  }
755  Metric getMetric() const { return Metric(myMetric); }
756  void setMetric(Metric val) { myMetric = int64(val); }
757  Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
758  {
759  SOP_Node *thissop = cookparms.getNode();
760  if (!thissop) return getMetric();
761  int64 result;
762  OP_Utils::evalOpParm(result, thissop, "metric", cookparms.getCookTime(), 0);
763  return Metric(result);
764  }
765  int64 getManpos() const { return myManpos; }
766  void setManpos(int64 val) { myManpos = val; }
767  int64 opManpos(const SOP_NodeVerb::CookParms &cookparms) const
768  {
769  SOP_Node *thissop = cookparms.getNode();
770  if (!thissop) return getManpos();
771  int64 result;
772  OP_Utils::evalOpParm(result, thissop, "manpos", cookparms.getCookTime(), 0);
773  return result;
774  }
775  UT_Vector3D getUvw() const { return myUvw; }
776  void setUvw(UT_Vector3D val) { myUvw = val; }
777  UT_Vector3D opUvw(const SOP_NodeVerb::CookParms &cookparms) const
778  {
779  SOP_Node *thissop = cookparms.getNode();
780  if (!thissop) return getUvw();
782  OP_Utils::evalOpParm(result, thissop, "uvw", cookparms.getCookTime(), 0);
783  return result;
784  }
785  Gridtype getGridtype() const { return Gridtype(myGridtype); }
786  void setGridtype(Gridtype val) { myGridtype = int64(val); }
788  {
789  SOP_Node *thissop = cookparms.getNode();
790  if (!thissop) return getGridtype();
791  int64 result;
792  OP_Utils::evalOpParm(result, thissop, "gridtype", cookparms.getCookTime(), 0);
793  return Gridtype(result);
794  }
795  UT_Vector3D getGridspacing() const { return myGridspacing; }
796  void setGridspacing(UT_Vector3D val) { myGridspacing = val; }
798  {
799  SOP_Node *thissop = cookparms.getNode();
800  if (!thissop) return getGridspacing();
802  OP_Utils::evalOpParm(result, thissop, "gridspacing", cookparms.getCookTime(), 0);
803  return result;
804  }
805  UT_Vector3D getGridlines() const { return myGridlines; }
806  void setGridlines(UT_Vector3D val) { myGridlines = val; }
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return getGridlines();
812  OP_Utils::evalOpParm(result, thissop, "gridlines", cookparms.getCookTime(), 0);
813  return result;
814  }
815  UT_Vector3I getGridpow2() const { return myGridpow2; }
816  void setGridpow2(UT_Vector3I val) { myGridpow2 = val; }
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return getGridpow2();
822  OP_Utils::evalOpParm(result, thissop, "gridpow2", cookparms.getCookTime(), 0);
823  return result;
824  }
825  UT_Vector3D getGridoffset() const { return myGridoffset; }
826  void setGridoffset(UT_Vector3D val) { myGridoffset = val; }
828  {
829  SOP_Node *thissop = cookparms.getNode();
830  if (!thissop) return getGridoffset();
832  OP_Utils::evalOpParm(result, thissop, "gridoffset", cookparms.getCookTime(), 0);
833  return result;
834  }
835  Gridround getGridround() const { return Gridround(myGridround); }
836  void setGridround(Gridround val) { myGridround = int64(val); }
838  {
839  SOP_Node *thissop = cookparms.getNode();
840  if (!thissop) return getGridround();
841  int64 result;
842  OP_Utils::evalOpParm(result, thissop, "gridround", cookparms.getCookTime(), 0);
843  return Gridround(result);
844  }
845  fpreal64 getGridtol() const { return myGridtol; }
846  void setGridtol(fpreal64 val) { myGridtol = val; }
848  {
849  SOP_Node *thissop = cookparms.getNode();
850  if (!thissop) return getGridtol();
852  OP_Utils::evalOpParm(result, thissop, "gridtol", cookparms.getCookTime(), 0);
853  return result;
854  }
855 
856 private:
857  UT_StringHolder myUvattrib;
858  UT_StringHolder myGroup;
859  int64 myGrouptype;
860  int64 myPostype;
861  bool myUsedist;
862  fpreal64 myDist;
863  int64 myMetric;
864  int64 myManpos;
865  UT_Vector3D myUvw;
866  int64 myGridtype;
867  UT_Vector3D myGridspacing;
868  UT_Vector3D myGridlines;
869  UT_Vector3I myGridpow2;
870  UT_Vector3D myGridoffset;
871  int64 myGridround;
872  fpreal64 myGridtol;
873 
874 };
bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:556
Metric getMetric() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Gridround opGridround(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_Vector3D opGridspacing(const SOP_NodeVerb::CookParms &cookparms) const
void setUsedist(bool val)
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 getDist() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Gridtype opGridtype(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
UT_Vector3I opGridpow2(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
void setGrouptype(Grouptype val)
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void save(std::ostream &os) const
Gridround getGridround() const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal64 opGridtol(const SOP_NodeVerb::CookParms &cookparms) const
Grouptype getGrouptype() const
Gridtype getGridtype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool load(UT_IStream &is)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void copyFrom(const OP_NodeParms *src) override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setGridtol(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D v)
void setGridpow2(UT_Vector3I val)
**But if you need a result
Definition: thread.h:622
UT_Vector3D getGridoffset() const
UT_Vector3T< int64 > UT_Vector3I
static void saveData(std::ostream &os, int64 v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static int version()
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
void setGridoffset(UT_Vector3D val)
UT_Vector3D opUvw(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
exint getNestNumParms(TempIndex idx) const override
void setGridtype(Gridtype val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setMetric(Metric val)
void setDist(fpreal64 val)
exint length() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void setGridspacing(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Vector3D &v)
Postype getPostype() const
UT_Vector3D getGridlines() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Matrix3D v)
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
Postype opPostype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
int64 getManpos() const
bool getUsedist() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_Vector3D getUvw() const
void setGridlines(UT_Vector3D val)
int64 opManpos(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
void setPostype(Postype val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void loadData(UT_IStream &is, bool &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
const UT_StringHolder & getGroup() const
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setGridround(Gridround val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
static void saveData(std::ostream &os, UT_StringHolder s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector3I getGridpow2() const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opUvattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const SOP_UVFuseParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opGridlines(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
bool operator!=(const SOP_UVFuseParms &src) const
void setUvw(UT_Vector3D val)
UT_Vector3D getGridspacing() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setUvattrib(const UT_StringHolder &val)
void setManpos(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getUvattrib() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
UT_Vector3D opGridoffset(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getGridtol() const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void saveData(std::ostream &os, UT_Vector3D v)