HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeBlur.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_VolumeBlurEnums
24 {
25  enum class Reduction
26  {
27  MAX = 0,
28  MIN,
29  MAXABS,
30  MINABS,
31  AVERAGE,
32  MEDIAN,
33  SUM,
34  SUMABS,
35  SUMSQUARE,
36  RMS
37  };
38 
40  getToken(Reduction enum_value)
41  {
42  using namespace UT::Literal;
43  switch (enum_value) {
44  case Reduction::MAX: return "max"_sh;
45  case Reduction::MIN: return "min"_sh;
46  case Reduction::MAXABS: return "maxabs"_sh;
47  case Reduction::MINABS: return "minabs"_sh;
48  case Reduction::AVERAGE: return "average"_sh;
49  case Reduction::MEDIAN: return "median"_sh;
50  case Reduction::SUM: return "sum"_sh;
51  case Reduction::SUMABS: return "sumabs"_sh;
52  case Reduction::SUMSQUARE: return "sumsquare"_sh;
53  case Reduction::RMS: return "rms"_sh;
54  default: UT_ASSERT(false); return ""_sh;
55  }
56  }
57 
58  enum class Bordertype
59  {
60  NONE = 0,
61  CONSTANT,
62  REPEAT,
63  STREAK
64  };
65 
67  getToken(Bordertype enum_value)
68  {
69  using namespace UT::Literal;
70  switch (enum_value) {
71  case Bordertype::NONE: return "none"_sh;
72  case Bordertype::CONSTANT: return "constant"_sh;
73  case Bordertype::REPEAT: return "repeat"_sh;
74  case Bordertype::STREAK: return "streak"_sh;
75  default: UT_ASSERT(false); return ""_sh;
76  }
77  }
78 
79 }
80 
81 
83 {
84 public:
85  static int version() { return 1; }
86 
88  {
89  myGroup = ""_UTsh;
90  myUsevoxelradius = false;
91  myRadius = 1;
92  myVoxelradius = UT_Vector3D(1,1,1);
93  myUseopencl = false;
94  myReduction = 4;
95  myPasses = 1;
96  myBordertype = 0;
97  myBorderval = 0;
98  myEnableblending = false;
99  myBlurblend = 1;
100  myOriginalblend = 0;
101 
102  }
103 
104  explicit SOP_VolumeBlurParms(const SOP_VolumeBlurParms &) = default;
106  SOP_VolumeBlurParms(SOP_VolumeBlurParms &&) noexcept = default;
107  SOP_VolumeBlurParms &operator=(SOP_VolumeBlurParms &&) noexcept = default;
108 
109  ~SOP_VolumeBlurParms() override {}
110 
111  bool operator==(const SOP_VolumeBlurParms &src) const
112  {
113  if (myGroup != src.myGroup) return false;
114  if (myUsevoxelradius != src.myUsevoxelradius) return false;
115  if (myRadius != src.myRadius) return false;
116  if (myVoxelradius != src.myVoxelradius) return false;
117  if (myUseopencl != src.myUseopencl) return false;
118  if (myReduction != src.myReduction) return false;
119  if (myPasses != src.myPasses) return false;
120  if (myBordertype != src.myBordertype) return false;
121  if (myBorderval != src.myBorderval) return false;
122  if (myEnableblending != src.myEnableblending) return false;
123  if (myBlurblend != src.myBlurblend) return false;
124  if (myOriginalblend != src.myOriginalblend) return false;
125 
126  return true;
127  }
128  bool operator!=(const SOP_VolumeBlurParms &src) const
129  {
130  return !operator==(src);
131  }
134 
135 
136 
137  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
138  {
139  myGroup = ""_UTsh;
140  if (true)
141  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
142  myUsevoxelradius = false;
143  if (true)
144  graph->evalOpParm(myUsevoxelradius, nodeidx, "usevoxelradius", time, 0);
145  myRadius = 1;
146  if (true && ( (true&&!(((getUsevoxelradius()==1)))) ) )
147  graph->evalOpParm(myRadius, nodeidx, "radius", time, 0);
148  myVoxelradius = UT_Vector3D(1,1,1);
149  if (true && ( (true&&!(((getUsevoxelradius()==0)))) ) )
150  graph->evalOpParm(myVoxelradius, nodeidx, "voxelradius", time, 0);
151  myUseopencl = false;
152  if (true)
153  graph->evalOpParm(myUseopencl, nodeidx, "useopencl", time, 0);
154  myReduction = 4;
155  if (true)
156  graph->evalOpParm(myReduction, nodeidx, "reduction", time, 0);
157  myPasses = 1;
158  if (true)
159  graph->evalOpParm(myPasses, nodeidx, "passes", time, 0);
160  myBordertype = 0;
161  if (true)
162  graph->evalOpParm(myBordertype, nodeidx, "bordertype", time, 0);
163  myBorderval = 0;
164  if (true && ( (true&&!(((int64(getBordertype())==0)))) ) )
165  graph->evalOpParm(myBorderval, nodeidx, "borderval", time, 0);
166  myEnableblending = false;
167  if (true)
168  graph->evalOpParm(myEnableblending, nodeidx, "enableblending", time, 0);
169  myBlurblend = 1;
170  if (true && ( (true&&!(((getEnableblending()==0)))) ) )
171  graph->evalOpParm(myBlurblend, nodeidx, "blurblend", time, 0);
172  myOriginalblend = 0;
173  if (true && ( (true&&!(((getEnableblending()==0)))) ) )
174  graph->evalOpParm(myOriginalblend, nodeidx, "originalblend", time, 0);
175 
176  }
177 
178 
179  void loadFromOpSubclass(const LoadParms &loadparms) override
180  {
181  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
182  }
183 
184 
185  void copyFrom(const OP_NodeParms *src) override
186  {
187  *this = *((const SOP_VolumeBlurParms *)src);
188  }
189 
190  template <typename T>
191  void
192  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
193  {
194  if (idx.size() < 1)
195  return;
196  UT_ASSERT(idx.size() == instance.size()+1);
197  if (idx.size() != instance.size()+1)
198  return;
199  switch (idx[0])
200  {
201  case 0:
202  coerceValue(value, myGroup);
203  break;
204  case 1:
205  coerceValue(value, myUsevoxelradius);
206  break;
207  case 2:
208  coerceValue(value, myRadius);
209  break;
210  case 3:
211  coerceValue(value, myVoxelradius);
212  break;
213  case 4:
214  coerceValue(value, myUseopencl);
215  break;
216  case 5:
217  coerceValue(value, myReduction);
218  break;
219  case 6:
220  coerceValue(value, myPasses);
221  break;
222  case 7:
223  coerceValue(value, myBordertype);
224  break;
225  case 8:
226  coerceValue(value, myBorderval);
227  break;
228  case 9:
229  coerceValue(value, myEnableblending);
230  break;
231  case 10:
232  coerceValue(value, myBlurblend);
233  break;
234  case 11:
235  coerceValue(value, myOriginalblend);
236  break;
237 
238  }
239  }
240 
241  bool isParmColorRamp(exint idx) const override
242  {
243  switch (idx)
244  {
245 
246  }
247  return false;
248  }
249 
250  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
271  { doGetParmValue(idx, instance, value); }
272 
273  template <typename T>
274  void
275  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
276  {
277  if (idx.size() < 1)
278  return;
279  UT_ASSERT(idx.size() == instance.size()+1);
280  if (idx.size() != instance.size()+1)
281  return;
282  switch (idx[0])
283  {
284  case 0:
285  coerceValue(myGroup, ( ( value ) ));
286  break;
287  case 1:
288  coerceValue(myUsevoxelradius, ( ( value ) ));
289  break;
290  case 2:
291  coerceValue(myRadius, clampMinValue(0, ( value ) ));
292  break;
293  case 3:
294  coerceValue(myVoxelradius, clampMinValue(0, ( value ) ));
295  break;
296  case 4:
297  coerceValue(myUseopencl, ( ( value ) ));
298  break;
299  case 5:
300  coerceValue(myReduction, clampMinValue(0, clampMaxValue(9, value ) ));
301  break;
302  case 6:
303  coerceValue(myPasses, clampMinValue(1, ( value ) ));
304  break;
305  case 7:
306  coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
307  break;
308  case 8:
309  coerceValue(myBorderval, ( ( value ) ));
310  break;
311  case 9:
312  coerceValue(myEnableblending, ( ( value ) ));
313  break;
314  case 10:
315  coerceValue(myBlurblend, ( ( value ) ));
316  break;
317  case 11:
318  coerceValue(myOriginalblend, ( ( value ) ));
319  break;
320 
321  }
322  }
323 
324  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
345  { doSetParmValue(idx, instance, value); }
346 
347  exint getNestNumParms(TempIndex idx) const override
348  {
349  if (idx.size() == 0)
350  return 12;
351  switch (idx[0])
352  {
353 
354  }
355  // Invalid
356  return 0;
357  }
358 
359  const char *getNestParmName(TempIndex fieldnum) const override
360  {
361  if (fieldnum.size() < 1)
362  return 0;
363  switch (fieldnum[0])
364  {
365  case 0:
366  return "group";
367  case 1:
368  return "usevoxelradius";
369  case 2:
370  return "radius";
371  case 3:
372  return "voxelradius";
373  case 4:
374  return "useopencl";
375  case 5:
376  return "reduction";
377  case 6:
378  return "passes";
379  case 7:
380  return "bordertype";
381  case 8:
382  return "borderval";
383  case 9:
384  return "enableblending";
385  case 10:
386  return "blurblend";
387  case 11:
388  return "originalblend";
389 
390  }
391  return 0;
392  }
393 
394  ParmType getNestParmType(TempIndex fieldnum) const override
395  {
396  if (fieldnum.size() < 1)
397  return PARM_UNSUPPORTED;
398  switch (fieldnum[0])
399  {
400  case 0:
401  return PARM_STRING;
402  case 1:
403  return PARM_INTEGER;
404  case 2:
405  return PARM_FLOAT;
406  case 3:
407  return PARM_VECTOR3;
408  case 4:
409  return PARM_INTEGER;
410  case 5:
411  return PARM_INTEGER;
412  case 6:
413  return PARM_INTEGER;
414  case 7:
415  return PARM_INTEGER;
416  case 8:
417  return PARM_FLOAT;
418  case 9:
419  return PARM_INTEGER;
420  case 10:
421  return PARM_FLOAT;
422  case 11:
423  return PARM_FLOAT;
424 
425  }
426  return PARM_UNSUPPORTED;
427  }
428 
429  // Boiler plate to load individual types.
430  static void loadData(UT_IStream &is, int64 &v)
431  { is.bread(&v, 1); }
432  static void loadData(UT_IStream &is, bool &v)
433  { int64 iv; is.bread(&iv, 1); v = iv; }
434  static void loadData(UT_IStream &is, fpreal64 &v)
435  { is.bread<fpreal64>(&v, 1); }
436  static void loadData(UT_IStream &is, UT_Vector2D &v)
437  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
438  static void loadData(UT_IStream &is, UT_Vector3D &v)
439  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
440  is.bread<fpreal64>(&v.z(), 1); }
441  static void loadData(UT_IStream &is, UT_Vector4D &v)
442  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
443  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
444  static void loadData(UT_IStream &is, UT_Matrix2D &v)
445  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
446  static void loadData(UT_IStream &is, UT_Matrix3D &v)
447  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
448  static void loadData(UT_IStream &is, UT_Matrix4D &v)
449  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
450  static void loadData(UT_IStream &is, UT_Vector2I &v)
451  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
452  static void loadData(UT_IStream &is, UT_Vector3I &v)
453  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
454  is.bread<int64>(&v.z(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector4I &v)
456  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
457  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
459  { is.bread(v); }
461  { UT_StringHolder rampdata;
462  loadData(is, rampdata);
463  if (rampdata.isstring())
464  {
465  v.reset(new UT_Ramp());
466  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
467  v->load(istr);
468  }
469  else v.reset();
470  }
473  loadData(is, data);
474  if (data.isstring())
475  {
476  // Find the data type.
477  const char *colon = UT_StringWrap(data).findChar(':');
478  if (colon)
479  {
480  int typelen = colon - data.buffer();
482  type.strncpy(data.buffer(), typelen);
483  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
484 
485  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
486  }
487  }
488  else v.reset();
489  }
490 
491  static void saveData(std::ostream &os, int64 v)
492  { UTwrite(os, &v); }
493  static void saveData(std::ostream &os, bool v)
494  { int64 iv = v; UTwrite(os, &iv); }
495  static void saveData(std::ostream &os, fpreal64 v)
496  { UTwrite<fpreal64>(os, &v); }
497  static void saveData(std::ostream &os, UT_Vector2D v)
498  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
499  static void saveData(std::ostream &os, UT_Vector3D v)
500  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
501  UTwrite<fpreal64>(os, &v.z()); }
502  static void saveData(std::ostream &os, UT_Vector4D v)
503  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
504  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
505  static void saveData(std::ostream &os, UT_Matrix2D v)
507  static void saveData(std::ostream &os, UT_Matrix3D v)
509  static void saveData(std::ostream &os, UT_Matrix4D v)
511  static void saveData(std::ostream &os, UT_StringHolder s)
512  { UT_StringWrap(s).saveBinary(os); }
513  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
515  UT_OStringStream ostr;
516  if (s) s->save(ostr);
517  result = ostr.str();
518  saveData(os, result);
519  }
520  static void saveData(std::ostream &os, PRM_DataItemHandle s)
522  UT_OStringStream ostr;
523  if (s)
524  {
525  ostr << s->getDataTypeToken();
526  ostr << ":";
527  s->saveBinary(ostr);
528  }
529  result = ostr.str();
530  saveData(os, result);
531  }
532 
533 
534  void save(std::ostream &os) const
535  {
536  int32 v = version();
537  UTwrite(os, &v);
538  saveData(os, myGroup);
539  saveData(os, myUsevoxelradius);
540  saveData(os, myRadius);
541  saveData(os, myVoxelradius);
542  saveData(os, myUseopencl);
543  saveData(os, myReduction);
544  saveData(os, myPasses);
545  saveData(os, myBordertype);
546  saveData(os, myBorderval);
547  saveData(os, myEnableblending);
548  saveData(os, myBlurblend);
549  saveData(os, myOriginalblend);
550 
551  }
552 
553  bool load(UT_IStream &is)
554  {
555  int32 v;
556  is.bread(&v, 1);
557  if (version() != v)
558  {
559  // Fail incompatible versions
560  return false;
561  }
562  loadData(is, myGroup);
563  loadData(is, myUsevoxelradius);
564  loadData(is, myRadius);
565  loadData(is, myVoxelradius);
566  loadData(is, myUseopencl);
567  loadData(is, myReduction);
568  loadData(is, myPasses);
569  loadData(is, myBordertype);
570  loadData(is, myBorderval);
571  loadData(is, myEnableblending);
572  loadData(is, myBlurblend);
573  loadData(is, myOriginalblend);
574 
575  return true;
576  }
577 
578  const UT_StringHolder & getGroup() const { return myGroup; }
579  void setGroup(const UT_StringHolder & val) { myGroup = val; }
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getGroup();
585  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
586  return result;
587  }
588  bool getUsevoxelradius() const { return myUsevoxelradius; }
589  void setUsevoxelradius(bool val) { myUsevoxelradius = val; }
590  bool opUsevoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getUsevoxelradius();
594  bool result;
595  OP_Utils::evalOpParm(result, thissop, "usevoxelradius", cookparms.getCookTime(), 0);
596  return result;
597  }
598  fpreal64 getRadius() const { return myRadius; }
599  void setRadius(fpreal64 val) { myRadius = val; }
600  fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getRadius();
605  OP_Utils::evalOpParm(result, thissop, "radius", cookparms.getCookTime(), 0);
606  return result;
607  }
608  UT_Vector3D getVoxelradius() const { return myVoxelradius; }
609  void setVoxelradius(UT_Vector3D val) { myVoxelradius = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getVoxelradius();
615  OP_Utils::evalOpParm(result, thissop, "voxelradius", cookparms.getCookTime(), 0);
616  return result;
617  }
618  bool getUseopencl() const { return myUseopencl; }
619  void setUseopencl(bool val) { myUseopencl = val; }
620  bool opUseopencl(const SOP_NodeVerb::CookParms &cookparms) const
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getUseopencl();
624  bool result;
625  OP_Utils::evalOpParm(result, thissop, "useopencl", cookparms.getCookTime(), 0);
626  return result;
627  }
628  Reduction getReduction() const { return Reduction(myReduction); }
629  void setReduction(Reduction val) { myReduction = int64(val); }
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getReduction();
634  int64 result;
635  OP_Utils::evalOpParm(result, thissop, "reduction", cookparms.getCookTime(), 0);
636  return Reduction(result);
637  }
638  int64 getPasses() const { return myPasses; }
639  void setPasses(int64 val) { myPasses = val; }
640  int64 opPasses(const SOP_NodeVerb::CookParms &cookparms) const
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getPasses();
644  int64 result;
645  OP_Utils::evalOpParm(result, thissop, "passes", cookparms.getCookTime(), 0);
646  return result;
647  }
648  Bordertype getBordertype() const { return Bordertype(myBordertype); }
649  void setBordertype(Bordertype val) { myBordertype = int64(val); }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getBordertype();
654  int64 result;
655  OP_Utils::evalOpParm(result, thissop, "bordertype", cookparms.getCookTime(), 0);
656  return Bordertype(result);
657  }
658  fpreal64 getBorderval() const { return myBorderval; }
659  void setBorderval(fpreal64 val) { myBorderval = val; }
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getBorderval();
665  OP_Utils::evalOpParm(result, thissop, "borderval", cookparms.getCookTime(), 0);
666  return result;
667  }
668  bool getEnableblending() const { return myEnableblending; }
669  void setEnableblending(bool val) { myEnableblending = val; }
670  bool opEnableblending(const SOP_NodeVerb::CookParms &cookparms) const
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getEnableblending();
674  bool result;
675  OP_Utils::evalOpParm(result, thissop, "enableblending", cookparms.getCookTime(), 0);
676  return result;
677  }
678  fpreal64 getBlurblend() const { return myBlurblend; }
679  void setBlurblend(fpreal64 val) { myBlurblend = val; }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getBlurblend();
685  OP_Utils::evalOpParm(result, thissop, "blurblend", cookparms.getCookTime(), 0);
686  return result;
687  }
688  fpreal64 getOriginalblend() const { return myOriginalblend; }
689  void setOriginalblend(fpreal64 val) { myOriginalblend = val; }
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getOriginalblend();
695  OP_Utils::evalOpParm(result, thissop, "originalblend", cookparms.getCookTime(), 0);
696  return result;
697  }
698 
699 private:
700  UT_StringHolder myGroup;
701  bool myUsevoxelradius;
702  fpreal64 myRadius;
703  UT_Vector3D myVoxelradius;
704  bool myUseopencl;
705  int64 myReduction;
706  int64 myPasses;
707  int64 myBordertype;
708  fpreal64 myBorderval;
709  bool myEnableblending;
710  fpreal64 myBlurblend;
711  fpreal64 myOriginalblend;
712 
713 };
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setUsevoxelradius(bool val)
void save(std::ostream &os) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Reduction getReduction() const
UT_Vector3D getVoxelradius() const
void copyFrom(const OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
UT_Vector3D opVoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal64 getOriginalblend() const
bool opUsevoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getRadius() const
bool opEnableblending(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_VolumeBlurParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
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
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
bool operator==(const SOP_VolumeBlurParms &src) const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector2D v)
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opBorderval(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opOriginalblend(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
bool opUseopencl(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
exint getNestNumParms(TempIndex idx) const override
void setReduction(Reduction val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setRadius(fpreal64 val)
void setVoxelradius(UT_Vector3D val)
void setBlurblend(fpreal64 val)
fpreal64 getBlurblend() const
void setBorderval(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint length() const
SYS_FORCE_INLINE UT_StringHolder getToken(Reduction enum_value)
fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
fpreal64 getBorderval() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int64 opPasses(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, UT_Vector3D v)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, bool &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
fpreal64 opBlurblend(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool getEnableblending() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setEnableblending(bool val)
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Bordertype opBordertype(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
bool getUsevoxelradius() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Reduction opReduction(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setOriginalblend(fpreal64 val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setBordertype(Bordertype val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_StringHolder &v)
const UT_StringHolder & getGroup() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
Bordertype getBordertype() const