HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Convert.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_ConvertEnums
24 {
25  enum class Fromtype
26  {
27  ALL = 0,
28  SPHERE,
29  TUBE,
30  PART,
31  METABALL,
32  POLY,
33  MESH,
34  BEZCURVE,
35  BEZSURF,
36  NURBCURVE,
37  NURBSURF,
38  PASTESURF,
39  CIRCLE,
40  TRISTRIP,
41  TRIFAN,
42  TRIBEZ,
43  VOLUME,
44  POLYSOUP,
45  VDB
46  };
47  enum class Totype
48  {
49  POLY = 0,
50  MESH,
51  BEZCURVE,
52  BEZSURF,
53  NURBCURVE,
54  NURBSURF,
55  PASTESURF,
56  CIRCLE,
59  TRIBEZ,
60  POLYSOUP,
61  VOLUME,
62  VDB
63  };
64  enum class Surftype
65  {
66  ROWS = 0,
67  COLS,
68  ROWCOL,
69  TRIANGLES,
70  QUADS,
73  };
74  enum class Pastecoord
75  {
76  CFEATURE = 0,
77  CBASE
78  };
79  enum class Pasteattrib
80  {
81  AFEATURE = 0,
82  ABASE
83  };
84 }
85 
86 
88 {
89 public:
90  static int version() { return 1; }
91 
93  {
94  myGroup = ""_sh;
95  myFromtype = 0;
96  myTotype = 0;
97  mySurftype = 4;
98  myStdswitcher = 0;
99  myOrderu = 4;
100  myOrderv = 4;
101  myPastecoord = 0;
102  myPasteattrib = 0;
103  myNew = false;
104  myInterphull = false;
105  myOffset = 0;
106  myLodu = 0.5;
107  myLodv = 0.5;
108  myLodtrim = 1;
109  myDivu = 2;
110  myDivv = 2;
111  myDivtrim = 1;
112 
113  }
114 
115  explicit SOP_ConvertParms(const SOP_ConvertParms &) = default;
116 
117  ~SOP_ConvertParms() override {}
118 
119  bool operator==(const SOP_ConvertParms &src) const
120  {
121  if (myGroup != src.myGroup) return false;
122  if (myFromtype != src.myFromtype) return false;
123  if (myTotype != src.myTotype) return false;
124  if (mySurftype != src.mySurftype) return false;
125  if (myStdswitcher != src.myStdswitcher) return false;
126  if (myOrderu != src.myOrderu) return false;
127  if (myOrderv != src.myOrderv) return false;
128  if (myPastecoord != src.myPastecoord) return false;
129  if (myPasteattrib != src.myPasteattrib) return false;
130  if (myNew != src.myNew) return false;
131  if (myInterphull != src.myInterphull) return false;
132  if (myOffset != src.myOffset) return false;
133  if (myLodu != src.myLodu) return false;
134  if (myLodv != src.myLodv) return false;
135  if (myLodtrim != src.myLodtrim) return false;
136  if (myDivu != src.myDivu) return false;
137  if (myDivv != src.myDivv) return false;
138  if (myDivtrim != src.myDivtrim) return false;
139 
140  return true;
141  }
142  bool operator!=(const SOP_ConvertParms &src) const
143  {
144  return !operator==(src);
145  }
151 
152 
153 
154  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
155  {
156  myGroup = ""_sh;
157  if (true)
158  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
159  myFromtype = 0;
160  if (true)
161  graph->evalOpParm(myFromtype, nodeidx, "fromtype", time, 0);
162  myTotype = 0;
163  if (true)
164  graph->evalOpParm(myTotype, nodeidx, "totype", time, 0);
165  mySurftype = 4;
166  if (true && ( (!(((int64(getTotype())!=3)&&(int64(getTotype())!=5)&&(int64(getTotype())!=1)&&(int64(getTotype())!=0)&&(int64(getTotype())!=11)))) ) )
167  graph->evalOpParm(mySurftype, nodeidx, "surftype", time, 0);
168  myStdswitcher = 0;
169  if (true)
170  graph->evalOpParm(myStdswitcher, nodeidx, "stdswitcher", time, 0);
171  myOrderu = 4;
172  if (true && ( (!(((int64(getTotype())!=2)&&(int64(getTotype())!=4)&&(int64(getTotype())!=3)&&(int64(getTotype())!=5)))) ) )
173  graph->evalOpParm(myOrderu, nodeidx, "orderu", time, 0);
174  myOrderv = 4;
175  if (true && ( (!(((int64(getTotype())!=3)&&(int64(getTotype())!=5)))) ) )
176  graph->evalOpParm(myOrderv, nodeidx, "orderv", time, 0);
177  myPastecoord = 0;
178  if (true)
179  graph->evalOpParm(myPastecoord, nodeidx, "pastecoord", time, 0);
180  myPasteattrib = 0;
181  if (true)
182  graph->evalOpParm(myPasteattrib, nodeidx, "pasteattrib", time, 0);
183  myNew = false;
184  if (true)
185  graph->evalOpParm(myNew, nodeidx, "new", time, 0);
186  myInterphull = false;
187  if (true)
188  graph->evalOpParm(myInterphull, nodeidx, "interphull", time, 0);
189  myOffset = 0;
190  if (true)
191  graph->evalOpParm(myOffset, nodeidx, "offset", time, 0);
192  myLodu = 0.5;
193  if (true && ( (!(((getInterphull()==1)))) ) )
194  graph->evalOpParm(myLodu, nodeidx, "lodu", time, 0);
195  myLodv = 0.5;
196  if (true && ( (!(((getInterphull()==1)))) ) )
197  graph->evalOpParm(myLodv, nodeidx, "lodv", time, 0);
198  myLodtrim = 1;
199  if (true && ( (!(((getInterphull()==1)))) ) )
200  graph->evalOpParm(myLodtrim, nodeidx, "lodtrim", time, 0);
201  myDivu = 2;
202  if (true && ( (!(((getInterphull()==1)))) ) )
203  graph->evalOpParm(myDivu, nodeidx, "divu", time, 0);
204  myDivv = 2;
205  if (true && ( (!(((getInterphull()==1)))) ) )
206  graph->evalOpParm(myDivv, nodeidx, "divv", time, 0);
207  myDivtrim = 1;
208  if (true && ( (!(((getInterphull()==1)))) ) )
209  graph->evalOpParm(myDivtrim, nodeidx, "divtrim", time, 0);
210 
211  }
212 
213 
214  void loadFromOpSubclass(const LoadParms &loadparms) override
215  {
216  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
217  }
218 
219 
220  void copyFrom(const SOP_NodeParms *src) override
221  {
222  *this = *((const SOP_ConvertParms *)src);
223  }
224 
225  template <typename T>
226  void
227  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
228  {
229  if (idx.size() < 1)
230  return;
231  UT_ASSERT(idx.size() == instance.size()+1);
232  if (idx.size() != instance.size()+1)
233  return;
234  switch (idx[0])
235  {
236  case 0:
237  coerceValue(value, myGroup);
238  break;
239  case 1:
240  coerceValue(value, myFromtype);
241  break;
242  case 2:
243  coerceValue(value, myTotype);
244  break;
245  case 3:
246  coerceValue(value, mySurftype);
247  break;
248  case 4:
249  coerceValue(value, myStdswitcher);
250  break;
251  case 5:
252  coerceValue(value, myOrderu);
253  break;
254  case 6:
255  coerceValue(value, myOrderv);
256  break;
257  case 7:
258  coerceValue(value, myPastecoord);
259  break;
260  case 8:
261  coerceValue(value, myPasteattrib);
262  break;
263  case 9:
264  coerceValue(value, myNew);
265  break;
266  case 10:
267  coerceValue(value, myInterphull);
268  break;
269  case 11:
270  coerceValue(value, myOffset);
271  break;
272  case 12:
273  coerceValue(value, myLodu);
274  break;
275  case 13:
276  coerceValue(value, myLodv);
277  break;
278  case 14:
279  coerceValue(value, myLodtrim);
280  break;
281  case 15:
282  coerceValue(value, myDivu);
283  break;
284  case 16:
285  coerceValue(value, myDivv);
286  break;
287  case 17:
288  coerceValue(value, myDivtrim);
289  break;
290 
291  }
292  }
293 
294  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
305  { doGetParmValue(idx, instance, value); }
306  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
307  { doGetParmValue(idx, instance, value); }
308  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
309  { doGetParmValue(idx, instance, value); }
310  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
311  { doGetParmValue(idx, instance, value); }
312  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
313  { doGetParmValue(idx, instance, value); }
314  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
315  { doGetParmValue(idx, instance, value); }
316 
317  template <typename T>
318  void
319  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
320  {
321  if (idx.size() < 1)
322  return;
323  UT_ASSERT(idx.size() == instance.size()+1);
324  if (idx.size() != instance.size()+1)
325  return;
326  switch (idx[0])
327  {
328  case 0:
329  coerceValue(myGroup, value);
330  break;
331  case 1:
332  coerceValue(myFromtype, value);
333  break;
334  case 2:
335  coerceValue(myTotype, value);
336  break;
337  case 3:
338  coerceValue(mySurftype, value);
339  break;
340  case 4:
341  coerceValue(myStdswitcher, value);
342  break;
343  case 5:
344  coerceValue(myOrderu, value);
345  break;
346  case 6:
347  coerceValue(myOrderv, value);
348  break;
349  case 7:
350  coerceValue(myPastecoord, value);
351  break;
352  case 8:
353  coerceValue(myPasteattrib, value);
354  break;
355  case 9:
356  coerceValue(myNew, value);
357  break;
358  case 10:
359  coerceValue(myInterphull, value);
360  break;
361  case 11:
362  coerceValue(myOffset, value);
363  break;
364  case 12:
365  coerceValue(myLodu, value);
366  break;
367  case 13:
368  coerceValue(myLodv, value);
369  break;
370  case 14:
371  coerceValue(myLodtrim, value);
372  break;
373  case 15:
374  coerceValue(myDivu, value);
375  break;
376  case 16:
377  coerceValue(myDivv, value);
378  break;
379  case 17:
380  coerceValue(myDivtrim, value);
381  break;
382 
383  }
384  }
385 
386  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
389  { doSetParmValue(idx, instance, value); }
390  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
391  { doSetParmValue(idx, instance, value); }
392  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
393  { doSetParmValue(idx, instance, value); }
394  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
395  { doSetParmValue(idx, instance, value); }
396  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
397  { doSetParmValue(idx, instance, value); }
398  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
399  { doSetParmValue(idx, instance, value); }
400  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
401  { doSetParmValue(idx, instance, value); }
402  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
403  { doSetParmValue(idx, instance, value); }
404  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
405  { doSetParmValue(idx, instance, value); }
406  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
407  { doSetParmValue(idx, instance, value); }
408 
409  exint getNestNumParms(TempIndex idx) const override
410  {
411  if (idx.size() == 0)
412  return 18;
413  switch (idx[0])
414  {
415 
416  }
417  // Invalid
418  return 0;
419  }
420 
421  const char *getNestParmName(TempIndex fieldnum) const override
422  {
423  if (fieldnum.size() < 1)
424  return 0;
425  switch (fieldnum[0])
426  {
427  case 0:
428  return "group";
429  case 1:
430  return "fromtype";
431  case 2:
432  return "totype";
433  case 3:
434  return "surftype";
435  case 4:
436  return "stdswitcher";
437  case 5:
438  return "orderu";
439  case 6:
440  return "orderv";
441  case 7:
442  return "pastecoord";
443  case 8:
444  return "pasteattrib";
445  case 9:
446  return "new";
447  case 10:
448  return "interphull";
449  case 11:
450  return "offset";
451  case 12:
452  return "lodu";
453  case 13:
454  return "lodv";
455  case 14:
456  return "lodtrim";
457  case 15:
458  return "divu";
459  case 16:
460  return "divv";
461  case 17:
462  return "divtrim";
463 
464  }
465  return 0;
466  }
467 
468  ParmType getNestParmType(TempIndex fieldnum) const override
469  {
470  if (fieldnum.size() < 1)
471  return PARM_UNSUPPORTED;
472  switch (fieldnum[0])
473  {
474  case 0:
475  return PARM_STRING;
476  case 1:
477  return PARM_INTEGER;
478  case 2:
479  return PARM_INTEGER;
480  case 3:
481  return PARM_INTEGER;
482  case 4:
483  return PARM_INTEGER;
484  case 5:
485  return PARM_INTEGER;
486  case 6:
487  return PARM_INTEGER;
488  case 7:
489  return PARM_INTEGER;
490  case 8:
491  return PARM_INTEGER;
492  case 9:
493  return PARM_INTEGER;
494  case 10:
495  return PARM_INTEGER;
496  case 11:
497  return PARM_FLOAT;
498  case 12:
499  return PARM_FLOAT;
500  case 13:
501  return PARM_FLOAT;
502  case 14:
503  return PARM_FLOAT;
504  case 15:
505  return PARM_INTEGER;
506  case 16:
507  return PARM_INTEGER;
508  case 17:
509  return PARM_INTEGER;
510 
511  }
512  return PARM_UNSUPPORTED;
513  }
514 
515  // Boiler plate to load individual types.
516  static void loadData(UT_IStream &is, int64 &v)
517  { is.bread(&v, 1); }
518  static void loadData(UT_IStream &is, bool &v)
519  { int64 iv; is.bread(&iv, 1); v = iv; }
520  static void loadData(UT_IStream &is, fpreal64 &v)
521  { is.bread<fpreal64>(&v, 1); }
522  static void loadData(UT_IStream &is, UT_Vector2D &v)
523  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
524  static void loadData(UT_IStream &is, UT_Vector3D &v)
525  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
526  is.bread<fpreal64>(&v.z(), 1); }
527  static void loadData(UT_IStream &is, UT_Vector4D &v)
528  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
529  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
530  static void loadData(UT_IStream &is, UT_Matrix2D &v)
531  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
532  static void loadData(UT_IStream &is, UT_Matrix3D &v)
533  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
534  static void loadData(UT_IStream &is, UT_Matrix4D &v)
535  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
536  static void loadData(UT_IStream &is, UT_Vector2I &v)
537  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
538  static void loadData(UT_IStream &is, UT_Vector3I &v)
539  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
540  is.bread<int64>(&v.z(), 1); }
541  static void loadData(UT_IStream &is, UT_Vector4I &v)
542  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
543  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
545  { is.bread(v); }
547  { UT_StringHolder rampdata;
548  loadData(is, rampdata);
549  if (rampdata.isstring())
550  {
551  v.reset(new UT_Ramp());
552  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
553  v->load(istr);
554  }
555  else v.reset();
556  }
559  loadData(is, data);
560  if (data.isstring())
561  {
562  // Find the data type.
563  const char *colon = UT_StringWrap(data).findChar(':');
564  if (colon)
565  {
566  int typelen = colon - data.buffer();
568  type.strncpy(data.buffer(), typelen);
569  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
570 
571  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
572  }
573  }
574  else v.reset();
575  }
576 
577  static void saveData(std::ostream &os, int64 v)
578  { UTwrite(os, &v); }
579  static void saveData(std::ostream &os, bool v)
580  { int64 iv = v; UTwrite(os, &iv); }
581  static void saveData(std::ostream &os, fpreal64 v)
582  { UTwrite<fpreal64>(os, &v); }
583  static void saveData(std::ostream &os, UT_Vector2D v)
584  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
585  static void saveData(std::ostream &os, UT_Vector3D v)
586  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
587  UTwrite<fpreal64>(os, &v.z()); }
588  static void saveData(std::ostream &os, UT_Vector4D v)
589  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
590  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
591  static void saveData(std::ostream &os, UT_Matrix2D v)
593  static void saveData(std::ostream &os, UT_Matrix3D v)
595  static void saveData(std::ostream &os, UT_Matrix4D v)
597  static void saveData(std::ostream &os, UT_StringHolder s)
598  { UT_StringWrap(s).saveBinary(os); }
599  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
601  UT_OStringStream ostr;
602  if (s) s->save(ostr);
603  result = ostr.str();
604  saveData(os, result);
605  }
606  static void saveData(std::ostream &os, PRM_DataItemHandle s)
608  UT_OStringStream ostr;
609  if (s)
610  {
611  ostr << s->getDataTypeToken();
612  ostr << ":";
613  s->saveBinary(ostr);
614  }
615  result = ostr.str();
616  saveData(os, result);
617  }
618 
619 
620  void save(std::ostream &os) const
621  {
622  int32 v = version();
623  UTwrite(os, &v);
624  saveData(os, myGroup);
625  saveData(os, myFromtype);
626  saveData(os, myTotype);
627  saveData(os, mySurftype);
628  saveData(os, myStdswitcher);
629  saveData(os, myOrderu);
630  saveData(os, myOrderv);
631  saveData(os, myPastecoord);
632  saveData(os, myPasteattrib);
633  saveData(os, myNew);
634  saveData(os, myInterphull);
635  saveData(os, myOffset);
636  saveData(os, myLodu);
637  saveData(os, myLodv);
638  saveData(os, myLodtrim);
639  saveData(os, myDivu);
640  saveData(os, myDivv);
641  saveData(os, myDivtrim);
642 
643  }
644 
645  bool load(UT_IStream &is)
646  {
647  int32 v;
648  is.bread(&v, 1);
649  if (version() != v)
650  {
651  // Fail incompatible versions
652  return false;
653  }
654  loadData(is, myGroup);
655  loadData(is, myFromtype);
656  loadData(is, myTotype);
657  loadData(is, mySurftype);
658  loadData(is, myStdswitcher);
659  loadData(is, myOrderu);
660  loadData(is, myOrderv);
661  loadData(is, myPastecoord);
662  loadData(is, myPasteattrib);
663  loadData(is, myNew);
664  loadData(is, myInterphull);
665  loadData(is, myOffset);
666  loadData(is, myLodu);
667  loadData(is, myLodv);
668  loadData(is, myLodtrim);
669  loadData(is, myDivu);
670  loadData(is, myDivv);
671  loadData(is, myDivtrim);
672 
673  return true;
674  }
675 
676  const UT_StringHolder & getGroup() const { return myGroup; }
677  void setGroup(const UT_StringHolder & val) { myGroup = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getGroup();
683  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
684  return result;
685  }
686  Fromtype getFromtype() const { return Fromtype(myFromtype); }
687  void setFromtype(Fromtype val) { myFromtype = int64(val); }
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getFromtype();
692  int64 result;
693  OP_Utils::evalOpParm(result, thissop, "fromtype", cookparms.getCookTime(), 0);
694  return Fromtype(result);
695  }
696  Totype getTotype() const { return Totype(myTotype); }
697  void setTotype(Totype val) { myTotype = int64(val); }
698  Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getTotype();
702  int64 result;
703  OP_Utils::evalOpParm(result, thissop, "totype", cookparms.getCookTime(), 0);
704  return Totype(result);
705  }
706  Surftype getSurftype() const { return Surftype(mySurftype); }
707  void setSurftype(Surftype val) { mySurftype = int64(val); }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getSurftype();
712  int64 result;
713  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
714  return Surftype(result);
715  }
716  int64 getStdswitcher() const { return myStdswitcher; }
717  void setStdswitcher(int64 val) { myStdswitcher = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getStdswitcher();
722  int64 result;
723  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
724  return result;
725  }
726  int64 getOrderu() const { return myOrderu; }
727  void setOrderu(int64 val) { myOrderu = val; }
728  int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getOrderu();
732  int64 result;
733  OP_Utils::evalOpParm(result, thissop, "orderu", cookparms.getCookTime(), 0);
734  return result;
735  }
736  int64 getOrderv() const { return myOrderv; }
737  void setOrderv(int64 val) { myOrderv = val; }
738  int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getOrderv();
742  int64 result;
743  OP_Utils::evalOpParm(result, thissop, "orderv", cookparms.getCookTime(), 0);
744  return result;
745  }
746  Pastecoord getPastecoord() const { return Pastecoord(myPastecoord); }
747  void setPastecoord(Pastecoord val) { myPastecoord = int64(val); }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getPastecoord();
752  int64 result;
753  OP_Utils::evalOpParm(result, thissop, "pastecoord", cookparms.getCookTime(), 0);
754  return Pastecoord(result);
755  }
756  Pasteattrib getPasteattrib() const { return Pasteattrib(myPasteattrib); }
757  void setPasteattrib(Pasteattrib val) { myPasteattrib = int64(val); }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getPasteattrib();
762  int64 result;
763  OP_Utils::evalOpParm(result, thissop, "pasteattrib", cookparms.getCookTime(), 0);
764  return Pasteattrib(result);
765  }
766  bool getNew() const { return myNew; }
767  void setNew(bool val) { myNew = val; }
768  bool opNew(const SOP_NodeVerb::CookParms &cookparms) const
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getNew();
772  bool result;
773  OP_Utils::evalOpParm(result, thissop, "new", cookparms.getCookTime(), 0);
774  return result;
775  }
776  bool getInterphull() const { return myInterphull; }
777  void setInterphull(bool val) { myInterphull = val; }
778  bool opInterphull(const SOP_NodeVerb::CookParms &cookparms) const
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getInterphull();
782  bool result;
783  OP_Utils::evalOpParm(result, thissop, "interphull", cookparms.getCookTime(), 0);
784  return result;
785  }
786  fpreal64 getOffset() const { return myOffset; }
787  void setOffset(fpreal64 val) { myOffset = val; }
788  fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getOffset();
793  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
794  return result;
795  }
796  fpreal64 getLodu() const { return myLodu; }
797  void setLodu(fpreal64 val) { myLodu = val; }
798  fpreal64 opLodu(const SOP_NodeVerb::CookParms &cookparms) const
799  {
800  SOP_Node *thissop = cookparms.getNode();
801  if (!thissop) return getLodu();
803  OP_Utils::evalOpParm(result, thissop, "lodu", cookparms.getCookTime(), 0);
804  return result;
805  }
806  fpreal64 getLodv() const { return myLodv; }
807  void setLodv(fpreal64 val) { myLodv = val; }
808  fpreal64 opLodv(const SOP_NodeVerb::CookParms &cookparms) const
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return getLodv();
813  OP_Utils::evalOpParm(result, thissop, "lodv", cookparms.getCookTime(), 0);
814  return result;
815  }
816  fpreal64 getLodtrim() const { return myLodtrim; }
817  void setLodtrim(fpreal64 val) { myLodtrim = val; }
819  {
820  SOP_Node *thissop = cookparms.getNode();
821  if (!thissop) return getLodtrim();
823  OP_Utils::evalOpParm(result, thissop, "lodtrim", cookparms.getCookTime(), 0);
824  return result;
825  }
826  int64 getDivu() const { return myDivu; }
827  void setDivu(int64 val) { myDivu = val; }
828  int64 opDivu(const SOP_NodeVerb::CookParms &cookparms) const
829  {
830  SOP_Node *thissop = cookparms.getNode();
831  if (!thissop) return getDivu();
832  int64 result;
833  OP_Utils::evalOpParm(result, thissop, "divu", cookparms.getCookTime(), 0);
834  return result;
835  }
836  int64 getDivv() const { return myDivv; }
837  void setDivv(int64 val) { myDivv = val; }
838  int64 opDivv(const SOP_NodeVerb::CookParms &cookparms) const
839  {
840  SOP_Node *thissop = cookparms.getNode();
841  if (!thissop) return getDivv();
842  int64 result;
843  OP_Utils::evalOpParm(result, thissop, "divv", cookparms.getCookTime(), 0);
844  return result;
845  }
846  int64 getDivtrim() const { return myDivtrim; }
847  void setDivtrim(int64 val) { myDivtrim = val; }
848  int64 opDivtrim(const SOP_NodeVerb::CookParms &cookparms) const
849  {
850  SOP_Node *thissop = cookparms.getNode();
851  if (!thissop) return getDivtrim();
852  int64 result;
853  OP_Utils::evalOpParm(result, thissop, "divtrim", cookparms.getCookTime(), 0);
854  return result;
855  }
856 
857 private:
858  UT_StringHolder myGroup;
859  int64 myFromtype;
860  int64 myTotype;
861  int64 mySurftype;
862  int64 myStdswitcher;
863  int64 myOrderu;
864  int64 myOrderv;
865  int64 myPastecoord;
866  int64 myPasteattrib;
867  bool myNew;
868  bool myInterphull;
869  fpreal64 myOffset;
870  fpreal64 myLodu;
871  fpreal64 myLodv;
872  fpreal64 myLodtrim;
873  int64 myDivu;
874  int64 myDivv;
875  int64 myDivtrim;
876 
877 };
GLdouble s
Definition: glew.h:1390
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opLodu(const SOP_NodeVerb::CookParms &cookparms) const
Totype getTotype() const
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
~SOP_ConvertParms() override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator==(const SOP_ConvertParms &src) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
Fromtype opFromtype(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
void setSurftype(Surftype val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
int64 exint
Definition: SYS_Types.h:125
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
Pasteattrib getPasteattrib() const
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector2D v)
int64 getDivu() const
void setDivv(int64 val)
An output stream object that owns its own string buffer storage.
int64 getStdswitcher() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const GLdouble * v
Definition: glew.h:1391
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setLodv(fpreal64 val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getNew() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Pastecoord getPastecoord() const
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
static void saveData(std::ostream &os, UT_Vector3D v)
exint length() const
void setLodu(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int64 getOrderv() const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
fpreal64 getLodtrim() const
void setGroup(const UT_StringHolder &val)
fpreal64 getLodv() const
const GLfloat * c
Definition: glew.h:16296
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setPastecoord(Pastecoord val)
static void saveData(std::ostream &os, bool v)
long long int64
Definition: SYS_Types.h:116
Fromtype getFromtype() const
void setDivu(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setTotype(Totype val)
void setOffset(fpreal64 val)
int64 getDivv() const
static int version()
void setPasteattrib(Pasteattrib val)
void setInterphull(bool val)
Pastecoord opPastecoord(const SOP_NodeVerb::CookParms &cookparms) const
void setStdswitcher(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getGroup() const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix3D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
exint getNestNumParms(TempIndex idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
int64 opDivtrim(const SOP_NodeVerb::CookParms &cookparms) const
void setDivtrim(int64 val)
int64 getDivtrim() const
static void saveData(std::ostream &os, UT_Vector4D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool getInterphull() const
void setOrderu(int64 val)
int64 opDivv(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opLodtrim(const SOP_NodeVerb::CookParms &cookparms) const
void setOrderv(int64 val)
fpreal64 fpreal
Definition: SYS_Types.h:277
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opNew(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 getLodu() const
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getOffset() const
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
bool opInterphull(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
#define SOP_API
Definition: SOP_API.h:10
bool operator!=(const SOP_ConvertParms &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 opStdswitcher(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
int64 getOrderu() const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
int64 opDivu(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 opLodv(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
void setFromtype(Fromtype val)
void setLodtrim(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Surftype getSurftype() const
GLsizei const GLfloat * value
Definition: glew.h:1849
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNew(bool val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
Pasteattrib opPasteattrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override