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_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_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 = ""_UTsh;
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  SOP_ConvertParms &operator=(const SOP_ConvertParms &) = default;
117  SOP_ConvertParms(SOP_ConvertParms &&) noexcept = default;
118  SOP_ConvertParms &operator=(SOP_ConvertParms &&) noexcept = default;
119 
120  ~SOP_ConvertParms() override {}
121 
122  bool operator==(const SOP_ConvertParms &src) const
123  {
124  if (myGroup != src.myGroup) return false;
125  if (myFromtype != src.myFromtype) return false;
126  if (myTotype != src.myTotype) return false;
127  if (mySurftype != src.mySurftype) return false;
128  if (myStdswitcher != src.myStdswitcher) return false;
129  if (myOrderu != src.myOrderu) return false;
130  if (myOrderv != src.myOrderv) return false;
131  if (myPastecoord != src.myPastecoord) return false;
132  if (myPasteattrib != src.myPasteattrib) return false;
133  if (myNew != src.myNew) return false;
134  if (myInterphull != src.myInterphull) return false;
135  if (myOffset != src.myOffset) return false;
136  if (myLodu != src.myLodu) return false;
137  if (myLodv != src.myLodv) return false;
138  if (myLodtrim != src.myLodtrim) return false;
139  if (myDivu != src.myDivu) return false;
140  if (myDivv != src.myDivv) return false;
141  if (myDivtrim != src.myDivtrim) return false;
142 
143  return true;
144  }
145  bool operator!=(const SOP_ConvertParms &src) const
146  {
147  return !operator==(src);
148  }
154 
155 
156 
157  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
158  {
159  myGroup = ""_UTsh;
160  if (true)
161  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
162  myFromtype = 0;
163  if (true)
164  graph->evalOpParm(myFromtype, nodeidx, "fromtype", time, 0);
165  myTotype = 0;
166  if (true)
167  graph->evalOpParm(myTotype, nodeidx, "totype", time, 0);
168  mySurftype = 4;
169  if (true && ( (true&&!(((int64(getTotype())!=3)&&(int64(getTotype())!=5)&&(int64(getTotype())!=1)&&(int64(getTotype())!=0)&&(int64(getTotype())!=11)))) ) )
170  graph->evalOpParm(mySurftype, nodeidx, "surftype", time, 0);
171  myStdswitcher = 0;
172  if (true)
173  graph->evalOpParm(myStdswitcher, nodeidx, "stdswitcher", time, 0);
174  myOrderu = 4;
175  if (true && ( (true&&!(((int64(getTotype())!=2)&&(int64(getTotype())!=4)&&(int64(getTotype())!=3)&&(int64(getTotype())!=5)))) ) )
176  graph->evalOpParm(myOrderu, nodeidx, "orderu", time, 0);
177  myOrderv = 4;
178  if (true && ( (true&&!(((int64(getTotype())!=3)&&(int64(getTotype())!=5)))) ) )
179  graph->evalOpParm(myOrderv, nodeidx, "orderv", time, 0);
180  myPastecoord = 0;
181  if (true)
182  graph->evalOpParm(myPastecoord, nodeidx, "pastecoord", time, 0);
183  myPasteattrib = 0;
184  if (true)
185  graph->evalOpParm(myPasteattrib, nodeidx, "pasteattrib", time, 0);
186  myNew = false;
187  if (true)
188  graph->evalOpParm(myNew, nodeidx, "new", time, 0);
189  myInterphull = false;
190  if (true)
191  graph->evalOpParm(myInterphull, nodeidx, "interphull", time, 0);
192  myOffset = 0;
193  if (true)
194  graph->evalOpParm(myOffset, nodeidx, "offset", time, 0);
195  myLodu = 0.5;
196  if (true && ( (true&&!(((getInterphull()==1)))) ) )
197  graph->evalOpParm(myLodu, nodeidx, "lodu", time, 0);
198  myLodv = 0.5;
199  if (true && ( (true&&!(((getInterphull()==1)))) ) )
200  graph->evalOpParm(myLodv, nodeidx, "lodv", time, 0);
201  myLodtrim = 1;
202  if (true && ( (true&&!(((getInterphull()==1)))) ) )
203  graph->evalOpParm(myLodtrim, nodeidx, "lodtrim", time, 0);
204  myDivu = 2;
205  if (true && ( (true&&!(((getInterphull()==1)))) ) )
206  graph->evalOpParm(myDivu, nodeidx, "divu", time, 0);
207  myDivv = 2;
208  if (true && ( (true&&!(((getInterphull()==1)))) ) )
209  graph->evalOpParm(myDivv, nodeidx, "divv", time, 0);
210  myDivtrim = 1;
211  if (true && ( (true&&!(((getInterphull()==1)))) ) )
212  graph->evalOpParm(myDivtrim, nodeidx, "divtrim", time, 0);
213 
214  }
215 
216 
217  void loadFromOpSubclass(const LoadParms &loadparms) override
218  {
219  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
220  }
221 
222 
223  void copyFrom(const OP_NodeParms *src) override
224  {
225  *this = *((const SOP_ConvertParms *)src);
226  }
227 
228  template <typename T>
229  void
230  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
231  {
232  if (idx.size() < 1)
233  return;
234  UT_ASSERT(idx.size() == instance.size()+1);
235  if (idx.size() != instance.size()+1)
236  return;
237  switch (idx[0])
238  {
239  case 0:
240  coerceValue(value, myGroup);
241  break;
242  case 1:
243  coerceValue(value, myFromtype);
244  break;
245  case 2:
246  coerceValue(value, myTotype);
247  break;
248  case 3:
249  coerceValue(value, mySurftype);
250  break;
251  case 4:
252  coerceValue(value, myStdswitcher);
253  break;
254  case 5:
255  coerceValue(value, myOrderu);
256  break;
257  case 6:
258  coerceValue(value, myOrderv);
259  break;
260  case 7:
261  coerceValue(value, myPastecoord);
262  break;
263  case 8:
264  coerceValue(value, myPasteattrib);
265  break;
266  case 9:
267  coerceValue(value, myNew);
268  break;
269  case 10:
270  coerceValue(value, myInterphull);
271  break;
272  case 11:
273  coerceValue(value, myOffset);
274  break;
275  case 12:
276  coerceValue(value, myLodu);
277  break;
278  case 13:
279  coerceValue(value, myLodv);
280  break;
281  case 14:
282  coerceValue(value, myLodtrim);
283  break;
284  case 15:
285  coerceValue(value, myDivu);
286  break;
287  case 16:
288  coerceValue(value, myDivv);
289  break;
290  case 17:
291  coerceValue(value, myDivtrim);
292  break;
293 
294  }
295  }
296 
297  bool isParmColorRamp(exint idx) const override
298  {
299  switch (idx)
300  {
301 
302  }
303  return false;
304  }
305 
306  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
307  { doGetParmValue(idx, instance, value); }
308  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
309  { doGetParmValue(idx, instance, value); }
310  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
311  { doGetParmValue(idx, instance, value); }
312  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
313  { doGetParmValue(idx, instance, value); }
314  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
315  { doGetParmValue(idx, instance, value); }
316  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
317  { doGetParmValue(idx, instance, value); }
318  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
319  { doGetParmValue(idx, instance, value); }
320  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
321  { doGetParmValue(idx, instance, value); }
322  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
323  { doGetParmValue(idx, instance, value); }
324  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
325  { doGetParmValue(idx, instance, value); }
326  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
327  { doGetParmValue(idx, instance, value); }
328 
329  template <typename T>
330  void
331  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
332  {
333  if (idx.size() < 1)
334  return;
335  UT_ASSERT(idx.size() == instance.size()+1);
336  if (idx.size() != instance.size()+1)
337  return;
338  switch (idx[0])
339  {
340  case 0:
341  coerceValue(myGroup, ( ( value ) ));
342  break;
343  case 1:
344  coerceValue(myFromtype, clampMinValue(0, clampMaxValue(18, value ) ));
345  break;
346  case 2:
347  coerceValue(myTotype, clampMinValue(0, clampMaxValue(13, value ) ));
348  break;
349  case 3:
350  coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
351  break;
352  case 4:
353  coerceValue(myStdswitcher, ( ( value ) ));
354  break;
355  case 5:
356  coerceValue(myOrderu, clampMinValue(2, clampMaxValue(11, value ) ));
357  break;
358  case 6:
359  coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
360  break;
361  case 7:
362  coerceValue(myPastecoord, clampMinValue(0, clampMaxValue(1, value ) ));
363  break;
364  case 8:
365  coerceValue(myPasteattrib, clampMinValue(0, clampMaxValue(1, value ) ));
366  break;
367  case 9:
368  coerceValue(myNew, ( ( value ) ));
369  break;
370  case 10:
371  coerceValue(myInterphull, ( ( value ) ));
372  break;
373  case 11:
374  coerceValue(myOffset, ( ( value ) ));
375  break;
376  case 12:
377  coerceValue(myLodu, clampMinValue(0.001, ( value ) ));
378  break;
379  case 13:
380  coerceValue(myLodv, clampMinValue(0.001, ( value ) ));
381  break;
382  case 14:
383  coerceValue(myLodtrim, clampMinValue(0.001, ( value ) ));
384  break;
385  case 15:
386  coerceValue(myDivu, clampMinValue(0, ( value ) ));
387  break;
388  case 16:
389  coerceValue(myDivv, clampMinValue(0, ( value ) ));
390  break;
391  case 17:
392  coerceValue(myDivtrim, clampMinValue(1, ( value ) ));
393  break;
394 
395  }
396  }
397 
398  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
399  { doSetParmValue(idx, instance, value); }
400  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
401  { doSetParmValue(idx, instance, value); }
402  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
403  { doSetParmValue(idx, instance, value); }
404  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
405  { doSetParmValue(idx, instance, value); }
406  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
407  { doSetParmValue(idx, instance, value); }
408  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
409  { doSetParmValue(idx, instance, value); }
410  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
411  { doSetParmValue(idx, instance, value); }
412  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
413  { doSetParmValue(idx, instance, value); }
414  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
415  { doSetParmValue(idx, instance, value); }
416  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
417  { doSetParmValue(idx, instance, value); }
418  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
419  { doSetParmValue(idx, instance, value); }
420 
421  exint getNestNumParms(TempIndex idx) const override
422  {
423  if (idx.size() == 0)
424  return 18;
425  switch (idx[0])
426  {
427 
428  }
429  // Invalid
430  return 0;
431  }
432 
433  const char *getNestParmName(TempIndex fieldnum) const override
434  {
435  if (fieldnum.size() < 1)
436  return 0;
437  switch (fieldnum[0])
438  {
439  case 0:
440  return "group";
441  case 1:
442  return "fromtype";
443  case 2:
444  return "totype";
445  case 3:
446  return "surftype";
447  case 4:
448  return "stdswitcher";
449  case 5:
450  return "orderu";
451  case 6:
452  return "orderv";
453  case 7:
454  return "pastecoord";
455  case 8:
456  return "pasteattrib";
457  case 9:
458  return "new";
459  case 10:
460  return "interphull";
461  case 11:
462  return "offset";
463  case 12:
464  return "lodu";
465  case 13:
466  return "lodv";
467  case 14:
468  return "lodtrim";
469  case 15:
470  return "divu";
471  case 16:
472  return "divv";
473  case 17:
474  return "divtrim";
475 
476  }
477  return 0;
478  }
479 
480  ParmType getNestParmType(TempIndex fieldnum) const override
481  {
482  if (fieldnum.size() < 1)
483  return PARM_UNSUPPORTED;
484  switch (fieldnum[0])
485  {
486  case 0:
487  return PARM_STRING;
488  case 1:
489  return PARM_INTEGER;
490  case 2:
491  return PARM_INTEGER;
492  case 3:
493  return PARM_INTEGER;
494  case 4:
495  return PARM_INTEGER;
496  case 5:
497  return PARM_INTEGER;
498  case 6:
499  return PARM_INTEGER;
500  case 7:
501  return PARM_INTEGER;
502  case 8:
503  return PARM_INTEGER;
504  case 9:
505  return PARM_INTEGER;
506  case 10:
507  return PARM_INTEGER;
508  case 11:
509  return PARM_FLOAT;
510  case 12:
511  return PARM_FLOAT;
512  case 13:
513  return PARM_FLOAT;
514  case 14:
515  return PARM_FLOAT;
516  case 15:
517  return PARM_INTEGER;
518  case 16:
519  return PARM_INTEGER;
520  case 17:
521  return PARM_INTEGER;
522 
523  }
524  return PARM_UNSUPPORTED;
525  }
526 
527  // Boiler plate to load individual types.
528  static void loadData(UT_IStream &is, int64 &v)
529  { is.bread(&v, 1); }
530  static void loadData(UT_IStream &is, bool &v)
531  { int64 iv; is.bread(&iv, 1); v = iv; }
532  static void loadData(UT_IStream &is, fpreal64 &v)
533  { is.bread<fpreal64>(&v, 1); }
534  static void loadData(UT_IStream &is, UT_Vector2D &v)
535  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
536  static void loadData(UT_IStream &is, UT_Vector3D &v)
537  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
538  is.bread<fpreal64>(&v.z(), 1); }
539  static void loadData(UT_IStream &is, UT_Vector4D &v)
540  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
541  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
542  static void loadData(UT_IStream &is, UT_Matrix2D &v)
543  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
544  static void loadData(UT_IStream &is, UT_Matrix3D &v)
545  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
546  static void loadData(UT_IStream &is, UT_Matrix4D &v)
547  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
548  static void loadData(UT_IStream &is, UT_Vector2I &v)
549  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
550  static void loadData(UT_IStream &is, UT_Vector3I &v)
551  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
552  is.bread<int64>(&v.z(), 1); }
553  static void loadData(UT_IStream &is, UT_Vector4I &v)
554  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
555  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
557  { is.bread(v); }
559  { UT_StringHolder rampdata;
560  loadData(is, rampdata);
561  if (rampdata.isstring())
562  {
563  v.reset(new UT_Ramp());
564  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
565  v->load(istr);
566  }
567  else v.reset();
568  }
571  loadData(is, data);
572  if (data.isstring())
573  {
574  // Find the data type.
575  const char *colon = UT_StringWrap(data).findChar(':');
576  if (colon)
577  {
578  int typelen = colon - data.buffer();
580  type.strncpy(data.buffer(), typelen);
581  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
582 
583  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
584  }
585  }
586  else v.reset();
587  }
588 
589  static void saveData(std::ostream &os, int64 v)
590  { UTwrite(os, &v); }
591  static void saveData(std::ostream &os, bool v)
592  { int64 iv = v; UTwrite(os, &iv); }
593  static void saveData(std::ostream &os, fpreal64 v)
594  { UTwrite<fpreal64>(os, &v); }
595  static void saveData(std::ostream &os, UT_Vector2D v)
596  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
597  static void saveData(std::ostream &os, UT_Vector3D v)
598  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
599  UTwrite<fpreal64>(os, &v.z()); }
600  static void saveData(std::ostream &os, UT_Vector4D v)
601  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
602  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
603  static void saveData(std::ostream &os, UT_Matrix2D v)
605  static void saveData(std::ostream &os, UT_Matrix3D v)
607  static void saveData(std::ostream &os, UT_Matrix4D v)
609  static void saveData(std::ostream &os, UT_StringHolder s)
610  { UT_StringWrap(s).saveBinary(os); }
611  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
613  UT_OStringStream ostr;
614  if (s) s->save(ostr);
615  result = ostr.str();
616  saveData(os, result);
617  }
618  static void saveData(std::ostream &os, PRM_DataItemHandle s)
620  UT_OStringStream ostr;
621  if (s)
622  {
623  ostr << s->getDataTypeToken();
624  ostr << ":";
625  s->saveBinary(ostr);
626  }
627  result = ostr.str();
628  saveData(os, result);
629  }
630 
631 
632  void save(std::ostream &os) const
633  {
634  int32 v = version();
635  UTwrite(os, &v);
636  saveData(os, myGroup);
637  saveData(os, myFromtype);
638  saveData(os, myTotype);
639  saveData(os, mySurftype);
640  saveData(os, myStdswitcher);
641  saveData(os, myOrderu);
642  saveData(os, myOrderv);
643  saveData(os, myPastecoord);
644  saveData(os, myPasteattrib);
645  saveData(os, myNew);
646  saveData(os, myInterphull);
647  saveData(os, myOffset);
648  saveData(os, myLodu);
649  saveData(os, myLodv);
650  saveData(os, myLodtrim);
651  saveData(os, myDivu);
652  saveData(os, myDivv);
653  saveData(os, myDivtrim);
654 
655  }
656 
657  bool load(UT_IStream &is)
658  {
659  int32 v;
660  is.bread(&v, 1);
661  if (version() != v)
662  {
663  // Fail incompatible versions
664  return false;
665  }
666  loadData(is, myGroup);
667  loadData(is, myFromtype);
668  loadData(is, myTotype);
669  loadData(is, mySurftype);
670  loadData(is, myStdswitcher);
671  loadData(is, myOrderu);
672  loadData(is, myOrderv);
673  loadData(is, myPastecoord);
674  loadData(is, myPasteattrib);
675  loadData(is, myNew);
676  loadData(is, myInterphull);
677  loadData(is, myOffset);
678  loadData(is, myLodu);
679  loadData(is, myLodv);
680  loadData(is, myLodtrim);
681  loadData(is, myDivu);
682  loadData(is, myDivv);
683  loadData(is, myDivtrim);
684 
685  return true;
686  }
687 
688  const UT_StringHolder & getGroup() const { return myGroup; }
689  void setGroup(const UT_StringHolder & val) { myGroup = val; }
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getGroup();
695  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
696  return result;
697  }
698  Fromtype getFromtype() const { return Fromtype(myFromtype); }
699  void setFromtype(Fromtype val) { myFromtype = int64(val); }
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getFromtype();
704  int64 result;
705  OP_Utils::evalOpParm(result, thissop, "fromtype", cookparms.getCookTime(), 0);
706  return Fromtype(result);
707  }
708  Totype getTotype() const { return Totype(myTotype); }
709  void setTotype(Totype val) { myTotype = int64(val); }
710  Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getTotype();
714  int64 result;
715  OP_Utils::evalOpParm(result, thissop, "totype", cookparms.getCookTime(), 0);
716  return Totype(result);
717  }
718  Surftype getSurftype() const { return Surftype(mySurftype); }
719  void setSurftype(Surftype val) { mySurftype = int64(val); }
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getSurftype();
724  int64 result;
725  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
726  return Surftype(result);
727  }
728  int64 getStdswitcher() const { return myStdswitcher; }
729  void setStdswitcher(int64 val) { myStdswitcher = val; }
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getStdswitcher();
734  int64 result;
735  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
736  return result;
737  }
738  int64 getOrderu() const { return myOrderu; }
739  void setOrderu(int64 val) { myOrderu = val; }
740  int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
741  {
742  SOP_Node *thissop = cookparms.getNode();
743  if (!thissop) return getOrderu();
744  int64 result;
745  OP_Utils::evalOpParm(result, thissop, "orderu", cookparms.getCookTime(), 0);
746  return result;
747  }
748  int64 getOrderv() const { return myOrderv; }
749  void setOrderv(int64 val) { myOrderv = val; }
750  int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
751  {
752  SOP_Node *thissop = cookparms.getNode();
753  if (!thissop) return getOrderv();
754  int64 result;
755  OP_Utils::evalOpParm(result, thissop, "orderv", cookparms.getCookTime(), 0);
756  return result;
757  }
758  Pastecoord getPastecoord() const { return Pastecoord(myPastecoord); }
759  void setPastecoord(Pastecoord val) { myPastecoord = int64(val); }
761  {
762  SOP_Node *thissop = cookparms.getNode();
763  if (!thissop) return getPastecoord();
764  int64 result;
765  OP_Utils::evalOpParm(result, thissop, "pastecoord", cookparms.getCookTime(), 0);
766  return Pastecoord(result);
767  }
768  Pasteattrib getPasteattrib() const { return Pasteattrib(myPasteattrib); }
769  void setPasteattrib(Pasteattrib val) { myPasteattrib = int64(val); }
771  {
772  SOP_Node *thissop = cookparms.getNode();
773  if (!thissop) return getPasteattrib();
774  int64 result;
775  OP_Utils::evalOpParm(result, thissop, "pasteattrib", cookparms.getCookTime(), 0);
776  return Pasteattrib(result);
777  }
778  bool getNew() const { return myNew; }
779  void setNew(bool val) { myNew = val; }
780  bool opNew(const SOP_NodeVerb::CookParms &cookparms) const
781  {
782  SOP_Node *thissop = cookparms.getNode();
783  if (!thissop) return getNew();
784  bool result;
785  OP_Utils::evalOpParm(result, thissop, "new", cookparms.getCookTime(), 0);
786  return result;
787  }
788  bool getInterphull() const { return myInterphull; }
789  void setInterphull(bool val) { myInterphull = val; }
790  bool opInterphull(const SOP_NodeVerb::CookParms &cookparms) const
791  {
792  SOP_Node *thissop = cookparms.getNode();
793  if (!thissop) return getInterphull();
794  bool result;
795  OP_Utils::evalOpParm(result, thissop, "interphull", cookparms.getCookTime(), 0);
796  return result;
797  }
798  fpreal64 getOffset() const { return myOffset; }
799  void setOffset(fpreal64 val) { myOffset = val; }
800  fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
801  {
802  SOP_Node *thissop = cookparms.getNode();
803  if (!thissop) return getOffset();
805  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
806  return result;
807  }
808  fpreal64 getLodu() const { return myLodu; }
809  void setLodu(fpreal64 val) { myLodu = val; }
810  fpreal64 opLodu(const SOP_NodeVerb::CookParms &cookparms) const
811  {
812  SOP_Node *thissop = cookparms.getNode();
813  if (!thissop) return getLodu();
815  OP_Utils::evalOpParm(result, thissop, "lodu", cookparms.getCookTime(), 0);
816  return result;
817  }
818  fpreal64 getLodv() const { return myLodv; }
819  void setLodv(fpreal64 val) { myLodv = val; }
820  fpreal64 opLodv(const SOP_NodeVerb::CookParms &cookparms) const
821  {
822  SOP_Node *thissop = cookparms.getNode();
823  if (!thissop) return getLodv();
825  OP_Utils::evalOpParm(result, thissop, "lodv", cookparms.getCookTime(), 0);
826  return result;
827  }
828  fpreal64 getLodtrim() const { return myLodtrim; }
829  void setLodtrim(fpreal64 val) { myLodtrim = val; }
831  {
832  SOP_Node *thissop = cookparms.getNode();
833  if (!thissop) return getLodtrim();
835  OP_Utils::evalOpParm(result, thissop, "lodtrim", cookparms.getCookTime(), 0);
836  return result;
837  }
838  int64 getDivu() const { return myDivu; }
839  void setDivu(int64 val) { myDivu = val; }
840  int64 opDivu(const SOP_NodeVerb::CookParms &cookparms) const
841  {
842  SOP_Node *thissop = cookparms.getNode();
843  if (!thissop) return getDivu();
844  int64 result;
845  OP_Utils::evalOpParm(result, thissop, "divu", cookparms.getCookTime(), 0);
846  return result;
847  }
848  int64 getDivv() const { return myDivv; }
849  void setDivv(int64 val) { myDivv = val; }
850  int64 opDivv(const SOP_NodeVerb::CookParms &cookparms) const
851  {
852  SOP_Node *thissop = cookparms.getNode();
853  if (!thissop) return getDivv();
854  int64 result;
855  OP_Utils::evalOpParm(result, thissop, "divv", cookparms.getCookTime(), 0);
856  return result;
857  }
858  int64 getDivtrim() const { return myDivtrim; }
859  void setDivtrim(int64 val) { myDivtrim = val; }
860  int64 opDivtrim(const SOP_NodeVerb::CookParms &cookparms) const
861  {
862  SOP_Node *thissop = cookparms.getNode();
863  if (!thissop) return getDivtrim();
864  int64 result;
865  OP_Utils::evalOpParm(result, thissop, "divtrim", cookparms.getCookTime(), 0);
866  return result;
867  }
868 
869 private:
870  UT_StringHolder myGroup;
871  int64 myFromtype;
872  int64 myTotype;
873  int64 mySurftype;
874  int64 myStdswitcher;
875  int64 myOrderu;
876  int64 myOrderv;
877  int64 myPastecoord;
878  int64 myPasteattrib;
879  bool myNew;
880  bool myInterphull;
881  fpreal64 myOffset;
882  fpreal64 myLodu;
883  fpreal64 myLodv;
884  fpreal64 myLodtrim;
885  int64 myDivu;
886  int64 myDivv;
887  int64 myDivtrim;
888 
889 };
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)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
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)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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)
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
Fromtype opFromtype(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:62
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
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setSurftype(Surftype val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
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
bool isParmColorRamp(exint idx) const override
GLdouble s
Definition: glad.h:3009
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
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setLodv(fpreal64 val)
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.
bool getNew() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
Pastecoord getPastecoord() const
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
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
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:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int64 getOrderv() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
fpreal64 getLodtrim() const
void setGroup(const UT_StringHolder &val)
fpreal64 getLodv() const
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
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix3D v)
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
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
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:88
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
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
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
void copyFrom(const OP_NodeParms *src) 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
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
int64 getOrderu() const
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
int64 opDivu(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
GLboolean r
Definition: glcorearb.h:1222
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
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
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)
type
Definition: core.h:1059
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
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNew(bool val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
Pasteattrib opPasteattrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663