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 <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_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 
127  if (baseGetSignature() != src.baseGetSignature()) return false;
128 
129  return true;
130  }
131  bool operator!=(const SOP_VolumeBlurParms &src) const
132  {
133  return !operator==(src);
134  }
137 
138 
139 
140  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
141  {
142  myGroup = ""_UTsh;
143  if (true)
144  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
145  myUsevoxelradius = false;
146  if (true)
147  graph->evalOpParm(myUsevoxelradius, nodeidx, "usevoxelradius", time, graph->isDirect()?nullptr:depnode);
148  myRadius = 1;
149  if (true && ( (true&&!(((getUsevoxelradius()==1)))) ) )
150  graph->evalOpParm(myRadius, nodeidx, "radius", time, graph->isDirect()?nullptr:depnode);
151  myVoxelradius = UT_Vector3D(1,1,1);
152  if (true && ( (true&&!(((getUsevoxelradius()==0)))) ) )
153  graph->evalOpParm(myVoxelradius, nodeidx, "voxelradius", time, graph->isDirect()?nullptr:depnode);
154  myUseopencl = false;
155  if (true)
156  graph->evalOpParm(myUseopencl, nodeidx, "useopencl", time, graph->isDirect()?nullptr:depnode);
157  myReduction = 4;
158  if (true)
159  graph->evalOpParm(myReduction, nodeidx, "reduction", time, graph->isDirect()?nullptr:depnode);
160  myPasses = 1;
161  if (true)
162  graph->evalOpParm(myPasses, nodeidx, "passes", time, graph->isDirect()?nullptr:depnode);
163  myBordertype = 0;
164  if (true)
165  graph->evalOpParm(myBordertype, nodeidx, "bordertype", time, graph->isDirect()?nullptr:depnode);
166  myBorderval = 0;
167  if (true && ( (true&&!(((int64(getBordertype())==0)))) ) )
168  graph->evalOpParm(myBorderval, nodeidx, "borderval", time, graph->isDirect()?nullptr:depnode);
169  myEnableblending = false;
170  if (true)
171  graph->evalOpParm(myEnableblending, nodeidx, "enableblending", time, graph->isDirect()?nullptr:depnode);
172  myBlurblend = 1;
173  if (true && ( (true&&!(((getEnableblending()==0)))) ) )
174  graph->evalOpParm(myBlurblend, nodeidx, "blurblend", time, graph->isDirect()?nullptr:depnode);
175  myOriginalblend = 0;
176  if (true && ( (true&&!(((getEnableblending()==0)))) ) )
177  graph->evalOpParm(myOriginalblend, nodeidx, "originalblend", time, graph->isDirect()?nullptr:depnode);
178 
179  }
180 
181 
182  void loadFromOpSubclass(const LoadParms &loadparms) override
183  {
184  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
185  }
186 
187 
188  void copyFrom(const OP_NodeParms *src) override
189  {
190  *this = *((const SOP_VolumeBlurParms *)src);
191  }
192 
193  template <typename T>
194  void
195  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
196  {
197  if (idx.size() < 1)
198  return;
199  UT_ASSERT(idx.size() == instance.size()+1);
200  if (idx.size() != instance.size()+1)
201  return;
202  switch (idx[0])
203  {
204  case 0:
205  coerceValue(value, myGroup);
206  break;
207  case 1:
208  coerceValue(value, myUsevoxelradius);
209  break;
210  case 2:
211  coerceValue(value, myRadius);
212  break;
213  case 3:
214  coerceValue(value, myVoxelradius);
215  break;
216  case 4:
217  coerceValue(value, myUseopencl);
218  break;
219  case 5:
220  coerceValue(value, myReduction);
221  break;
222  case 6:
223  coerceValue(value, myPasses);
224  break;
225  case 7:
226  coerceValue(value, myBordertype);
227  break;
228  case 8:
229  coerceValue(value, myBorderval);
230  break;
231  case 9:
232  coerceValue(value, myEnableblending);
233  break;
234  case 10:
235  coerceValue(value, myBlurblend);
236  break;
237  case 11:
238  coerceValue(value, myOriginalblend);
239  break;
240 
241  }
242  }
243 
244  bool isParmColorRamp(exint idx) const override
245  {
246  switch (idx)
247  {
248 
249  }
250  return false;
251  }
252 
253  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
270  { doGetParmValue(idx, instance, value); }
271  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
274  { doGetParmValue(idx, instance, value); }
275 
276  template <typename T>
277  void
278  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
279  {
280  if (idx.size() < 1)
281  return;
282  UT_ASSERT(idx.size() == instance.size()+1);
283  if (idx.size() != instance.size()+1)
284  return;
285  switch (idx[0])
286  {
287  case 0:
288  coerceValue(myGroup, ( ( value ) ));
289  break;
290  case 1:
291  coerceValue(myUsevoxelradius, ( ( value ) ));
292  break;
293  case 2:
294  coerceValue(myRadius, clampMinValue(0, ( value ) ));
295  break;
296  case 3:
297  coerceValue(myVoxelradius, clampMinValue(0, ( value ) ));
298  break;
299  case 4:
300  coerceValue(myUseopencl, ( ( value ) ));
301  break;
302  case 5:
303  coerceValue(myReduction, clampMinValue(0, clampMaxValue(9, value ) ));
304  break;
305  case 6:
306  coerceValue(myPasses, clampMinValue(1, ( value ) ));
307  break;
308  case 7:
309  coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
310  break;
311  case 8:
312  coerceValue(myBorderval, ( ( value ) ));
313  break;
314  case 9:
315  coerceValue(myEnableblending, ( ( value ) ));
316  break;
317  case 10:
318  coerceValue(myBlurblend, ( ( value ) ));
319  break;
320  case 11:
321  coerceValue(myOriginalblend, ( ( value ) ));
322  break;
323 
324  }
325  }
326 
327  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
348  { doSetParmValue(idx, instance, value); }
349 
350  exint getNestNumParms(TempIndex idx) const override
351  {
352  if (idx.size() == 0)
353  return 12;
354  switch (idx[0])
355  {
356 
357  }
358  // Invalid
359  return 0;
360  }
361 
362  const char *getNestParmName(TempIndex fieldnum) const override
363  {
364  if (fieldnum.size() < 1)
365  return 0;
366  switch (fieldnum[0])
367  {
368  case 0:
369  return "group";
370  case 1:
371  return "usevoxelradius";
372  case 2:
373  return "radius";
374  case 3:
375  return "voxelradius";
376  case 4:
377  return "useopencl";
378  case 5:
379  return "reduction";
380  case 6:
381  return "passes";
382  case 7:
383  return "bordertype";
384  case 8:
385  return "borderval";
386  case 9:
387  return "enableblending";
388  case 10:
389  return "blurblend";
390  case 11:
391  return "originalblend";
392 
393  }
394  return 0;
395  }
396 
397  ParmType getNestParmType(TempIndex fieldnum) const override
398  {
399  if (fieldnum.size() < 1)
400  return PARM_UNSUPPORTED;
401  switch (fieldnum[0])
402  {
403  case 0:
404  return PARM_STRING;
405  case 1:
406  return PARM_INTEGER;
407  case 2:
408  return PARM_FLOAT;
409  case 3:
410  return PARM_VECTOR3;
411  case 4:
412  return PARM_INTEGER;
413  case 5:
414  return PARM_INTEGER;
415  case 6:
416  return PARM_INTEGER;
417  case 7:
418  return PARM_INTEGER;
419  case 8:
420  return PARM_FLOAT;
421  case 9:
422  return PARM_INTEGER;
423  case 10:
424  return PARM_FLOAT;
425  case 11:
426  return PARM_FLOAT;
427 
428  }
429  return PARM_UNSUPPORTED;
430  }
431 
432  // Boiler plate to load individual types.
433  static void loadData(UT_IStream &is, int64 &v)
434  { is.bread(&v, 1); }
435  static void loadData(UT_IStream &is, bool &v)
436  { int64 iv; is.bread(&iv, 1); v = iv; }
437  static void loadData(UT_IStream &is, fpreal64 &v)
438  { is.bread<fpreal64>(&v, 1); }
439  static void loadData(UT_IStream &is, UT_Vector2D &v)
440  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
441  static void loadData(UT_IStream &is, UT_Vector3D &v)
442  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
443  is.bread<fpreal64>(&v.z(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector4D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
446  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
447  static void loadData(UT_IStream &is, UT_Matrix2D &v)
448  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
449  static void loadData(UT_IStream &is, UT_Matrix3D &v)
450  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
451  static void loadData(UT_IStream &is, UT_Matrix4D &v)
452  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
453  static void loadData(UT_IStream &is, UT_Vector2I &v)
454  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector3I &v)
456  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
457  is.bread<int64>(&v.z(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector4I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
460  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
462  { is.bread(v); }
464  { UT_StringHolder rampdata;
465  loadData(is, rampdata);
466  if (rampdata.isstring())
467  {
468  v.reset(new UT_Ramp());
469  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
470  v->load(istr);
471  }
472  else v.reset();
473  }
476  loadData(is, data);
477  if (data.isstring())
478  {
479  // Find the data type.
480  const char *colon = UT_StringWrap(data).findChar(':');
481  if (colon)
482  {
483  int typelen = colon - data.buffer();
485  type.strncpy(data.buffer(), typelen);
486  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
487 
488  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
489  }
490  }
491  else v.reset();
492  }
493 
494  static void saveData(std::ostream &os, int64 v)
495  { UTwrite(os, &v); }
496  static void saveData(std::ostream &os, bool v)
497  { int64 iv = v; UTwrite(os, &iv); }
498  static void saveData(std::ostream &os, fpreal64 v)
499  { UTwrite<fpreal64>(os, &v); }
500  static void saveData(std::ostream &os, UT_Vector2D v)
501  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
502  static void saveData(std::ostream &os, UT_Vector3D v)
503  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
504  UTwrite<fpreal64>(os, &v.z()); }
505  static void saveData(std::ostream &os, UT_Vector4D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
507  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
508  static void saveData(std::ostream &os, UT_Matrix2D v)
510  static void saveData(std::ostream &os, UT_Matrix3D v)
512  static void saveData(std::ostream &os, UT_Matrix4D v)
514  static void saveData(std::ostream &os, UT_StringHolder s)
515  { UT_StringWrap(s).saveBinary(os); }
516  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
518  UT_OStringStream ostr;
519  if (s) s->save(ostr);
520  result = ostr.str();
521  saveData(os, result);
522  }
523  static void saveData(std::ostream &os, PRM_DataItemHandle s)
525  UT_OStringStream ostr;
526  if (s)
527  {
528  ostr << s->getDataTypeToken();
529  ostr << ":";
530  s->saveBinary(ostr);
531  }
532  result = ostr.str();
533  saveData(os, result);
534  }
535 
536 
537  void save(std::ostream &os) const
538  {
539  int32 v = version();
540  UTwrite(os, &v);
541  saveData(os, myGroup);
542  saveData(os, myUsevoxelradius);
543  saveData(os, myRadius);
544  saveData(os, myVoxelradius);
545  saveData(os, myUseopencl);
546  saveData(os, myReduction);
547  saveData(os, myPasses);
548  saveData(os, myBordertype);
549  saveData(os, myBorderval);
550  saveData(os, myEnableblending);
551  saveData(os, myBlurblend);
552  saveData(os, myOriginalblend);
553 
554  }
555 
556  bool load(UT_IStream &is)
557  {
558  int32 v;
559  is.bread(&v, 1);
560  if (version() != v)
561  {
562  // Fail incompatible versions
563  return false;
564  }
565  loadData(is, myGroup);
566  loadData(is, myUsevoxelradius);
567  loadData(is, myRadius);
568  loadData(is, myVoxelradius);
569  loadData(is, myUseopencl);
570  loadData(is, myReduction);
571  loadData(is, myPasses);
572  loadData(is, myBordertype);
573  loadData(is, myBorderval);
574  loadData(is, myEnableblending);
575  loadData(is, myBlurblend);
576  loadData(is, myOriginalblend);
577 
578  return true;
579  }
580 
581  const UT_StringHolder & getGroup() const { return myGroup; }
582  void setGroup(const UT_StringHolder & val) { myGroup = val; }
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getGroup();
588  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
589  return result;
590  }
591  bool getUsevoxelradius() const { return myUsevoxelradius; }
592  void setUsevoxelradius(bool val) { myUsevoxelradius = val; }
593  bool opUsevoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getUsevoxelradius();
597  bool result;
598  OP_Utils::evalOpParm(result, thissop, "usevoxelradius", cookparms.getCookTime(), 0);
599  return result;
600  }
601  fpreal64 getRadius() const { return myRadius; }
602  void setRadius(fpreal64 val) { myRadius = val; }
603  fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getRadius();
608  OP_Utils::evalOpParm(result, thissop, "radius", cookparms.getCookTime(), 0);
609  return result;
610  }
611  UT_Vector3D getVoxelradius() const { return myVoxelradius; }
612  void setVoxelradius(UT_Vector3D val) { myVoxelradius = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getVoxelradius();
618  OP_Utils::evalOpParm(result, thissop, "voxelradius", cookparms.getCookTime(), 0);
619  return result;
620  }
621  bool getUseopencl() const { return myUseopencl; }
622  void setUseopencl(bool val) { myUseopencl = val; }
623  bool opUseopencl(const SOP_NodeVerb::CookParms &cookparms) const
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getUseopencl();
627  bool result;
628  OP_Utils::evalOpParm(result, thissop, "useopencl", cookparms.getCookTime(), 0);
629  return result;
630  }
631  Reduction getReduction() const { return Reduction(myReduction); }
632  void setReduction(Reduction val) { myReduction = int64(val); }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getReduction();
637  int64 result;
638  OP_Utils::evalOpParm(result, thissop, "reduction", cookparms.getCookTime(), 0);
639  return Reduction(result);
640  }
641  int64 getPasses() const { return myPasses; }
642  void setPasses(int64 val) { myPasses = val; }
643  int64 opPasses(const SOP_NodeVerb::CookParms &cookparms) const
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getPasses();
647  int64 result;
648  OP_Utils::evalOpParm(result, thissop, "passes", cookparms.getCookTime(), 0);
649  return result;
650  }
651  Bordertype getBordertype() const { return Bordertype(myBordertype); }
652  void setBordertype(Bordertype val) { myBordertype = int64(val); }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getBordertype();
657  int64 result;
658  OP_Utils::evalOpParm(result, thissop, "bordertype", cookparms.getCookTime(), 0);
659  return Bordertype(result);
660  }
661  fpreal64 getBorderval() const { return myBorderval; }
662  void setBorderval(fpreal64 val) { myBorderval = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getBorderval();
668  OP_Utils::evalOpParm(result, thissop, "borderval", cookparms.getCookTime(), 0);
669  return result;
670  }
671  bool getEnableblending() const { return myEnableblending; }
672  void setEnableblending(bool val) { myEnableblending = val; }
673  bool opEnableblending(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getEnableblending();
677  bool result;
678  OP_Utils::evalOpParm(result, thissop, "enableblending", cookparms.getCookTime(), 0);
679  return result;
680  }
681  fpreal64 getBlurblend() const { return myBlurblend; }
682  void setBlurblend(fpreal64 val) { myBlurblend = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getBlurblend();
688  OP_Utils::evalOpParm(result, thissop, "blurblend", cookparms.getCookTime(), 0);
689  return result;
690  }
691  fpreal64 getOriginalblend() const { return myOriginalblend; }
692  void setOriginalblend(fpreal64 val) { myOriginalblend = val; }
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getOriginalblend();
698  OP_Utils::evalOpParm(result, thissop, "originalblend", cookparms.getCookTime(), 0);
699  return result;
700  }
701 
702 private:
703  UT_StringHolder myGroup;
704  bool myUsevoxelradius;
705  fpreal64 myRadius;
706  UT_Vector3D myVoxelradius;
707  bool myUseopencl;
708  int64 myReduction;
709  int64 myPasses;
710  int64 myBordertype;
711  fpreal64 myBorderval;
712  bool myEnableblending;
713  fpreal64 myBlurblend;
714  fpreal64 myOriginalblend;
715 
716 };
type
Definition: core.h:556
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:63
UT_Vector3D opVoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
static void loadData(UT_IStream &is, UT_StringHolder &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
const UT_StringHolder & getGroup() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
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