HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeSlice.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_VolumeSliceEnums
24 {
25  enum class Method
26  {
27  VOLUME = 0,
28  MESH,
29  POINTS
30  };
31  enum class Plane
32  {
33  XY = 0,
34  YZ,
35  ZX
36  };
37  enum class Vismode
38  {
39  NONE = 0,
40  FALSE_,
41  PINK,
42  MONO,
43  BLACKBODY,
44  BIPARTITE,
45  CUSTOM
46  };
47 }
48 
49 
51 {
52 public:
53  static int version() { return 1; }
54 
56  {
57  myGroup = ""_UTsh;
58  myMethod = 1;
59  myPlane = 0;
60  myPlaneoffset = 0;
61  myAttrib = "density"_UTsh;
62  myCreatevarmap = false;
63  myLvar = ""_UTsh;
64  myVisualize = true;
65  myVismode = 1;
66  myVisrange = UT_Vector2D(0,1);
67  myCdramp = UT_SharedPtr<UT_Ramp>(0);
68  myKeep = false;
69 
70  }
71 
72  explicit SOP_VolumeSliceParms(const SOP_VolumeSliceParms &) = default;
74  SOP_VolumeSliceParms(SOP_VolumeSliceParms &&) noexcept = default;
75  SOP_VolumeSliceParms &operator=(SOP_VolumeSliceParms &&) noexcept = default;
76 
77  ~SOP_VolumeSliceParms() override {}
78 
79  bool operator==(const SOP_VolumeSliceParms &src) const
80  {
81  if (myGroup != src.myGroup) return false;
82  if (myMethod != src.myMethod) return false;
83  if (myPlane != src.myPlane) return false;
84  if (myPlaneoffset != src.myPlaneoffset) return false;
85  if (myAttrib != src.myAttrib) return false;
86  if (myCreatevarmap != src.myCreatevarmap) return false;
87  if (myLvar != src.myLvar) return false;
88  if (myVisualize != src.myVisualize) return false;
89  if (myVismode != src.myVismode) return false;
90  if (myVisrange != src.myVisrange) return false;
91  if (myCdramp != src.myCdramp)
92  { if (!myCdramp || !src.myCdramp || !(*myCdramp == *src.myCdramp)) return false; }
93  if (myKeep != src.myKeep) return false;
94 
95  return true;
96  }
97  bool operator!=(const SOP_VolumeSliceParms &src) const
98  {
99  return !operator==(src);
100  }
104 
105 
106 
107  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
108  {
109  myGroup = ""_UTsh;
110  if (true)
111  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
112  myMethod = 1;
113  if (true)
114  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
115  myPlane = 0;
116  if (true)
117  graph->evalOpParm(myPlane, nodeidx, "plane", time, 0);
118  myPlaneoffset = 0;
119  if (true)
120  graph->evalOpParm(myPlaneoffset, nodeidx, "planeoffset", time, 0);
121  myAttrib = "density"_UTsh;
122  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
123  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, 0);
124  myCreatevarmap = false;
125  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
126  graph->evalOpParm(myCreatevarmap, nodeidx, "createvarmap", time, 0);
127  myLvar = ""_UTsh;
128  if (true && ( (true&&!(((int64(getMethod())==0))||((getCreatevarmap()==0)))) ) )
129  graph->evalOpParm(myLvar, nodeidx, "lvar", time, 0);
130  myVisualize = true;
131  if (true && ( (true&&!(((int64(getMethod())==0)))) ) )
132  graph->evalOpParm(myVisualize, nodeidx, "visualize", time, 0);
133  myVismode = 1;
134  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0)))) ) )
135  graph->evalOpParm(myVismode, nodeidx, "vismode", time, 0);
136  myVisrange = UT_Vector2D(0,1);
137  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0)))) ) )
138  graph->evalOpParm(myVisrange, nodeidx, "visrange", time, 0);
139  myCdramp = UT_SharedPtr<UT_Ramp>(0);
140  if (true && ( (true&&!(((int64(getMethod())==0))||((getVisualize()==0))||((int64(getVismode())!=6)))) ) )
141  graph->evalOpParm(myCdramp, nodeidx, "cdramp", time, 0);
142  myKeep = false;
143  if (true)
144  graph->evalOpParm(myKeep, nodeidx, "keep", time, 0);
145 
146  }
147 
148 
149  void loadFromOpSubclass(const LoadParms &loadparms) override
150  {
151  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
152  }
153 
154 
155  void copyFrom(const OP_NodeParms *src) override
156  {
157  *this = *((const SOP_VolumeSliceParms *)src);
158  }
159 
160  template <typename T>
161  void
162  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
163  {
164  if (idx.size() < 1)
165  return;
166  UT_ASSERT(idx.size() == instance.size()+1);
167  if (idx.size() != instance.size()+1)
168  return;
169  switch (idx[0])
170  {
171  case 0:
172  coerceValue(value, myGroup);
173  break;
174  case 1:
175  coerceValue(value, myMethod);
176  break;
177  case 2:
178  coerceValue(value, myPlane);
179  break;
180  case 3:
181  coerceValue(value, myPlaneoffset);
182  break;
183  case 4:
184  coerceValue(value, myAttrib);
185  break;
186  case 5:
187  coerceValue(value, myCreatevarmap);
188  break;
189  case 6:
190  coerceValue(value, myLvar);
191  break;
192  case 7:
193  coerceValue(value, myVisualize);
194  break;
195  case 8:
196  coerceValue(value, myVismode);
197  break;
198  case 9:
199  coerceValue(value, myVisrange);
200  break;
201  case 10:
202  coerceValue(value, myCdramp);
203  break;
204  case 11:
205  coerceValue(value, myKeep);
206  break;
207 
208  }
209  }
210 
211  bool isParmColorRamp(exint idx) const override
212  {
213  switch (idx)
214  {
215  case 10:
216  return true;
217  }
218  return false;
219  }
220 
221  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
242  { doGetParmValue(idx, instance, value); }
243 
244  template <typename T>
245  void
246  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
247  {
248  if (idx.size() < 1)
249  return;
250  UT_ASSERT(idx.size() == instance.size()+1);
251  if (idx.size() != instance.size()+1)
252  return;
253  switch (idx[0])
254  {
255  case 0:
256  coerceValue(myGroup, ( ( value ) ));
257  break;
258  case 1:
259  coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
260  break;
261  case 2:
262  coerceValue(myPlane, clampMinValue(0, clampMaxValue(2, value ) ));
263  break;
264  case 3:
265  coerceValue(myPlaneoffset, clampMinValue(-1, clampMaxValue(1, value ) ));
266  break;
267  case 4:
268  coerceValue(myAttrib, ( ( value ) ));
269  break;
270  case 5:
271  coerceValue(myCreatevarmap, ( ( value ) ));
272  break;
273  case 6:
274  coerceValue(myLvar, ( ( value ) ));
275  break;
276  case 7:
277  coerceValue(myVisualize, ( ( value ) ));
278  break;
279  case 8:
280  coerceValue(myVismode, clampMinValue(0, clampMaxValue(6, value ) ));
281  break;
282  case 9:
283  coerceValue(myVisrange, ( ( value ) ));
284  break;
285  case 10:
286  coerceValue(myCdramp, ( ( value ) ));
287  break;
288  case 11:
289  coerceValue(myKeep, ( ( value ) ));
290  break;
291 
292  }
293  }
294 
295  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
316  { doSetParmValue(idx, instance, value); }
317 
318  exint getNestNumParms(TempIndex idx) const override
319  {
320  if (idx.size() == 0)
321  return 12;
322  switch (idx[0])
323  {
324 
325  }
326  // Invalid
327  return 0;
328  }
329 
330  const char *getNestParmName(TempIndex fieldnum) const override
331  {
332  if (fieldnum.size() < 1)
333  return 0;
334  switch (fieldnum[0])
335  {
336  case 0:
337  return "group";
338  case 1:
339  return "method";
340  case 2:
341  return "plane";
342  case 3:
343  return "planeoffset";
344  case 4:
345  return "attrib";
346  case 5:
347  return "createvarmap";
348  case 6:
349  return "lvar";
350  case 7:
351  return "visualize";
352  case 8:
353  return "vismode";
354  case 9:
355  return "visrange";
356  case 10:
357  return "cdramp";
358  case 11:
359  return "keep";
360 
361  }
362  return 0;
363  }
364 
365  ParmType getNestParmType(TempIndex fieldnum) const override
366  {
367  if (fieldnum.size() < 1)
368  return PARM_UNSUPPORTED;
369  switch (fieldnum[0])
370  {
371  case 0:
372  return PARM_STRING;
373  case 1:
374  return PARM_INTEGER;
375  case 2:
376  return PARM_INTEGER;
377  case 3:
378  return PARM_FLOAT;
379  case 4:
380  return PARM_STRING;
381  case 5:
382  return PARM_INTEGER;
383  case 6:
384  return PARM_STRING;
385  case 7:
386  return PARM_INTEGER;
387  case 8:
388  return PARM_INTEGER;
389  case 9:
390  return PARM_VECTOR2;
391  case 10:
392  return PARM_RAMP;
393  case 11:
394  return PARM_INTEGER;
395 
396  }
397  return PARM_UNSUPPORTED;
398  }
399 
400  // Boiler plate to load individual types.
401  static void loadData(UT_IStream &is, int64 &v)
402  { is.bread(&v, 1); }
403  static void loadData(UT_IStream &is, bool &v)
404  { int64 iv; is.bread(&iv, 1); v = iv; }
405  static void loadData(UT_IStream &is, fpreal64 &v)
406  { is.bread<fpreal64>(&v, 1); }
407  static void loadData(UT_IStream &is, UT_Vector2D &v)
408  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
409  static void loadData(UT_IStream &is, UT_Vector3D &v)
410  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
411  is.bread<fpreal64>(&v.z(), 1); }
412  static void loadData(UT_IStream &is, UT_Vector4D &v)
413  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
414  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
415  static void loadData(UT_IStream &is, UT_Matrix2D &v)
416  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
417  static void loadData(UT_IStream &is, UT_Matrix3D &v)
418  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
419  static void loadData(UT_IStream &is, UT_Matrix4D &v)
420  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
421  static void loadData(UT_IStream &is, UT_Vector2I &v)
422  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
423  static void loadData(UT_IStream &is, UT_Vector3I &v)
424  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
425  is.bread<int64>(&v.z(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector4I &v)
427  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
428  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
430  { is.bread(v); }
432  { UT_StringHolder rampdata;
433  loadData(is, rampdata);
434  if (rampdata.isstring())
435  {
436  v.reset(new UT_Ramp());
437  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
438  v->load(istr);
439  }
440  else v.reset();
441  }
444  loadData(is, data);
445  if (data.isstring())
446  {
447  // Find the data type.
448  const char *colon = UT_StringWrap(data).findChar(':');
449  if (colon)
450  {
451  int typelen = colon - data.buffer();
453  type.strncpy(data.buffer(), typelen);
454  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
455 
456  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
457  }
458  }
459  else v.reset();
460  }
461 
462  static void saveData(std::ostream &os, int64 v)
463  { UTwrite(os, &v); }
464  static void saveData(std::ostream &os, bool v)
465  { int64 iv = v; UTwrite(os, &iv); }
466  static void saveData(std::ostream &os, fpreal64 v)
467  { UTwrite<fpreal64>(os, &v); }
468  static void saveData(std::ostream &os, UT_Vector2D v)
469  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
470  static void saveData(std::ostream &os, UT_Vector3D v)
471  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
472  UTwrite<fpreal64>(os, &v.z()); }
473  static void saveData(std::ostream &os, UT_Vector4D v)
474  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
475  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
476  static void saveData(std::ostream &os, UT_Matrix2D v)
478  static void saveData(std::ostream &os, UT_Matrix3D v)
480  static void saveData(std::ostream &os, UT_Matrix4D v)
482  static void saveData(std::ostream &os, UT_StringHolder s)
483  { UT_StringWrap(s).saveBinary(os); }
484  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
486  UT_OStringStream ostr;
487  if (s) s->save(ostr);
488  result = ostr.str();
489  saveData(os, result);
490  }
491  static void saveData(std::ostream &os, PRM_DataItemHandle s)
493  UT_OStringStream ostr;
494  if (s)
495  {
496  ostr << s->getDataTypeToken();
497  ostr << ":";
498  s->saveBinary(ostr);
499  }
500  result = ostr.str();
501  saveData(os, result);
502  }
503 
504 
505  void save(std::ostream &os) const
506  {
507  int32 v = version();
508  UTwrite(os, &v);
509  saveData(os, myGroup);
510  saveData(os, myMethod);
511  saveData(os, myPlane);
512  saveData(os, myPlaneoffset);
513  saveData(os, myAttrib);
514  saveData(os, myCreatevarmap);
515  saveData(os, myLvar);
516  saveData(os, myVisualize);
517  saveData(os, myVismode);
518  saveData(os, myVisrange);
519  saveData(os, myCdramp);
520  saveData(os, myKeep);
521 
522  }
523 
524  bool load(UT_IStream &is)
525  {
526  int32 v;
527  is.bread(&v, 1);
528  if (version() != v)
529  {
530  // Fail incompatible versions
531  return false;
532  }
533  loadData(is, myGroup);
534  loadData(is, myMethod);
535  loadData(is, myPlane);
536  loadData(is, myPlaneoffset);
537  loadData(is, myAttrib);
538  loadData(is, myCreatevarmap);
539  loadData(is, myLvar);
540  loadData(is, myVisualize);
541  loadData(is, myVismode);
542  loadData(is, myVisrange);
543  loadData(is, myCdramp);
544  loadData(is, myKeep);
545 
546  return true;
547  }
548 
549  const UT_StringHolder & getGroup() const { return myGroup; }
550  void setGroup(const UT_StringHolder & val) { myGroup = val; }
552  {
553  SOP_Node *thissop = cookparms.getNode();
554  if (!thissop) return getGroup();
556  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
557  return result;
558  }
559  Method getMethod() const { return Method(myMethod); }
560  void setMethod(Method val) { myMethod = int64(val); }
561  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
562  {
563  SOP_Node *thissop = cookparms.getNode();
564  if (!thissop) return getMethod();
565  int64 result;
566  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
567  return Method(result);
568  }
569  Plane getPlane() const { return Plane(myPlane); }
570  void setPlane(Plane val) { myPlane = int64(val); }
571  Plane opPlane(const SOP_NodeVerb::CookParms &cookparms) const
572  {
573  SOP_Node *thissop = cookparms.getNode();
574  if (!thissop) return getPlane();
575  int64 result;
576  OP_Utils::evalOpParm(result, thissop, "plane", cookparms.getCookTime(), 0);
577  return Plane(result);
578  }
579  fpreal64 getPlaneoffset() const { return myPlaneoffset; }
580  void setPlaneoffset(fpreal64 val) { myPlaneoffset = val; }
582  {
583  SOP_Node *thissop = cookparms.getNode();
584  if (!thissop) return getPlaneoffset();
586  OP_Utils::evalOpParm(result, thissop, "planeoffset", cookparms.getCookTime(), 0);
587  return result;
588  }
589  const UT_StringHolder & getAttrib() const { return myAttrib; }
590  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
592  {
593  SOP_Node *thissop = cookparms.getNode();
594  if (!thissop) return getAttrib();
596  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
597  return result;
598  }
599  bool getCreatevarmap() const { return myCreatevarmap; }
600  void setCreatevarmap(bool val) { myCreatevarmap = val; }
601  bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
602  {
603  SOP_Node *thissop = cookparms.getNode();
604  if (!thissop) return getCreatevarmap();
605  bool result;
606  OP_Utils::evalOpParm(result, thissop, "createvarmap", cookparms.getCookTime(), 0);
607  return result;
608  }
609  const UT_StringHolder & getLvar() const { return myLvar; }
610  void setLvar(const UT_StringHolder & val) { myLvar = val; }
612  {
613  SOP_Node *thissop = cookparms.getNode();
614  if (!thissop) return getLvar();
616  OP_Utils::evalOpParm(result, thissop, "lvar", cookparms.getCookTime(), 0);
617  return result;
618  }
619  bool getVisualize() const { return myVisualize; }
620  void setVisualize(bool val) { myVisualize = val; }
621  bool opVisualize(const SOP_NodeVerb::CookParms &cookparms) const
622  {
623  SOP_Node *thissop = cookparms.getNode();
624  if (!thissop) return getVisualize();
625  bool result;
626  OP_Utils::evalOpParm(result, thissop, "visualize", cookparms.getCookTime(), 0);
627  return result;
628  }
629  Vismode getVismode() const { return Vismode(myVismode); }
630  void setVismode(Vismode val) { myVismode = int64(val); }
631  Vismode opVismode(const SOP_NodeVerb::CookParms &cookparms) const
632  {
633  SOP_Node *thissop = cookparms.getNode();
634  if (!thissop) return getVismode();
635  int64 result;
636  OP_Utils::evalOpParm(result, thissop, "vismode", cookparms.getCookTime(), 0);
637  return Vismode(result);
638  }
639  UT_Vector2D getVisrange() const { return myVisrange; }
640  void setVisrange(UT_Vector2D val) { myVisrange = val; }
642  {
643  SOP_Node *thissop = cookparms.getNode();
644  if (!thissop) return getVisrange();
646  OP_Utils::evalOpParm(result, thissop, "visrange", cookparms.getCookTime(), 0);
647  return result;
648  }
649  UT_SharedPtr<UT_Ramp> getCdramp() const { return myCdramp; }
650  void setCdramp(UT_SharedPtr<UT_Ramp> val) { myCdramp = val; }
652  {
653  SOP_Node *thissop = cookparms.getNode();
654  if (!thissop) return getCdramp();
656  OP_Utils::evalOpParm(result, thissop, "cdramp", cookparms.getCookTime(), 0);
657  return result;
658  }
659  bool getKeep() const { return myKeep; }
660  void setKeep(bool val) { myKeep = val; }
661  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
662  {
663  SOP_Node *thissop = cookparms.getNode();
664  if (!thissop) return getKeep();
665  bool result;
666  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
667  return result;
668  }
669 
670 private:
671  UT_StringHolder myGroup;
672  int64 myMethod;
673  int64 myPlane;
674  fpreal64 myPlaneoffset;
675  UT_StringHolder myAttrib;
676  bool myCreatevarmap;
677  UT_StringHolder myLvar;
678  bool myVisualize;
679  int64 myVismode;
680  UT_Vector2D myVisrange;
681  UT_SharedPtr<UT_Ramp> myCdramp;
682  bool myKeep;
683 
684 };
Plane opPlane(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator!=(const SOP_VolumeSliceParms &src) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_Matrix3D v)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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
static void saveData(std::ostream &os, UT_Vector2D v)
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_Vector2T< fpreal64 > UT_Vector2D
bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
Vismode opVismode(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, fpreal64 v)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLdouble s
Definition: glad.h:3009
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opVisualize(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &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 setLvar(const UT_StringHolder &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.
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setPlaneoffset(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector3D v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector4D v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_Vector2D opVisrange(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
exint length() const
bool operator==(const SOP_VolumeSliceParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setVismode(Vismode val)
static void saveData(std::ostream &os, UT_Matrix4D v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setGroup(const UT_StringHolder &val)
void setCdramp(UT_SharedPtr< UT_Ramp > val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
fpreal64 getPlaneoffset() const
GT_API const UT_StringHolder version
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, int64 &v)
void setVisrange(UT_Vector2D val)
UT_SharedPtr< UT_Ramp > opCdramp(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opLvar(const SOP_NodeVerb::CookParms &cookparms) const
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void loadData(UT_IStream &is, UT_Vector3D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
UT_Vector2D getVisrange() const
static void saveData(std::ostream &os, int64 v)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, bool v)
void copyFrom(const OP_NodeParms *src) override
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_StringHolder & getLvar() const
type
Definition: core.h:1059
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
UT_SharedPtr< UT_Ramp > getCdramp() const
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal64 opPlaneoffset(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663