HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeMerge.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_VolumeMergeEnums
24 {
25  enum class Mergemethod
26  {
27  COPY = 0,
28  ADD,
29  MUL,
30  MAX,
31  MIN,
32  AVERAGE
33  };
34 
36  getToken(Mergemethod enum_value)
37  {
38  using namespace UT::Literal;
39  switch (enum_value) {
40  case Mergemethod::COPY: return "copy"_sh;
41  case Mergemethod::ADD: return "add"_sh;
42  case Mergemethod::MUL: return "mul"_sh;
43  case Mergemethod::MAX: return "max"_sh;
44  case Mergemethod::MIN: return "min"_sh;
45  case Mergemethod::AVERAGE: return "average"_sh;
46  default: UT_ASSERT(false); return ""_sh;
47  }
48  }
49 
50 }
51 
52 
54 {
55 public:
56  static int version() { return 1; }
57 
59  {
60  myGroup = ""_UTsh;
61  myMergegrp = ""_UTsh;
62  myMergemethod = 1;
63  myClampvolume = true;
64  myDstpreadd = 0;
65  myDstpremul = 1;
66  mySrcpreadd = 0;
67  mySrcpremul = 1;
68  myPostadd = 0;
69  myPostmul = 1;
70  myDoclampmin = false;
71  myClampmin = 0;
72  myDoclampmax = false;
73  myClampmax = 1;
74 
75  }
76 
77  explicit SOP_VolumeMergeParms(const SOP_VolumeMergeParms &) = default;
79  SOP_VolumeMergeParms(SOP_VolumeMergeParms &&) noexcept = default;
80  SOP_VolumeMergeParms &operator=(SOP_VolumeMergeParms &&) noexcept = default;
81 
82  ~SOP_VolumeMergeParms() override {}
83 
84  bool operator==(const SOP_VolumeMergeParms &src) const
85  {
86  if (myGroup != src.myGroup) return false;
87  if (myMergegrp != src.myMergegrp) return false;
88  if (myMergemethod != src.myMergemethod) return false;
89  if (myClampvolume != src.myClampvolume) return false;
90  if (myDstpreadd != src.myDstpreadd) return false;
91  if (myDstpremul != src.myDstpremul) return false;
92  if (mySrcpreadd != src.mySrcpreadd) return false;
93  if (mySrcpremul != src.mySrcpremul) return false;
94  if (myPostadd != src.myPostadd) return false;
95  if (myPostmul != src.myPostmul) return false;
96  if (myDoclampmin != src.myDoclampmin) return false;
97  if (myClampmin != src.myClampmin) return false;
98  if (myDoclampmax != src.myDoclampmax) return false;
99  if (myClampmax != src.myClampmax) return false;
100 
101  return true;
102  }
104  {
105  return !operator==(src);
106  }
108 
109 
110 
111  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
112  {
113  myGroup = ""_UTsh;
114  if (true)
115  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
116  myMergegrp = ""_UTsh;
117  if (true)
118  graph->evalOpParm(myMergegrp, nodeidx, "mergegrp", time, 0);
119  myMergemethod = 1;
120  if (true)
121  graph->evalOpParm(myMergemethod, nodeidx, "mergemethod", time, 0);
122  myClampvolume = true;
123  if (true)
124  graph->evalOpParm(myClampvolume, nodeidx, "clampvolume", time, 0);
125  myDstpreadd = 0;
126  if (true)
127  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, 0);
128  myDstpremul = 1;
129  if (true)
130  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, 0);
131  mySrcpreadd = 0;
132  if (true)
133  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, 0);
134  mySrcpremul = 1;
135  if (true)
136  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, 0);
137  myPostadd = 0;
138  if (true)
139  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, 0);
140  myPostmul = 1;
141  if (true)
142  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, 0);
143  myDoclampmin = false;
144  if (true)
145  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, 0);
146  myClampmin = 0;
147  if (true && ( (true&&!(((getDoclampmin()==0)))) ) )
148  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, 0);
149  myDoclampmax = false;
150  if (true)
151  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, 0);
152  myClampmax = 1;
153  if (true && ( (true&&!(((getDoclampmax()==0)))) ) )
154  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, 0);
155 
156  }
157 
158 
159  void loadFromOpSubclass(const LoadParms &loadparms) override
160  {
161  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
162  }
163 
164 
165  void copyFrom(const OP_NodeParms *src) override
166  {
167  *this = *((const SOP_VolumeMergeParms *)src);
168  }
169 
170  template <typename T>
171  void
172  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
173  {
174  if (idx.size() < 1)
175  return;
176  UT_ASSERT(idx.size() == instance.size()+1);
177  if (idx.size() != instance.size()+1)
178  return;
179  switch (idx[0])
180  {
181  case 0:
182  coerceValue(value, myGroup);
183  break;
184  case 1:
185  coerceValue(value, myMergegrp);
186  break;
187  case 2:
188  coerceValue(value, myMergemethod);
189  break;
190  case 3:
191  coerceValue(value, myClampvolume);
192  break;
193  case 4:
194  coerceValue(value, myDstpreadd);
195  break;
196  case 5:
197  coerceValue(value, myDstpremul);
198  break;
199  case 6:
200  coerceValue(value, mySrcpreadd);
201  break;
202  case 7:
203  coerceValue(value, mySrcpremul);
204  break;
205  case 8:
206  coerceValue(value, myPostadd);
207  break;
208  case 9:
209  coerceValue(value, myPostmul);
210  break;
211  case 10:
212  coerceValue(value, myDoclampmin);
213  break;
214  case 11:
215  coerceValue(value, myClampmin);
216  break;
217  case 12:
218  coerceValue(value, myDoclampmax);
219  break;
220  case 13:
221  coerceValue(value, myClampmax);
222  break;
223 
224  }
225  }
226 
227  bool isParmColorRamp(exint idx) const override
228  {
229  switch (idx)
230  {
231 
232  }
233  return false;
234  }
235 
236  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
257  { doGetParmValue(idx, instance, value); }
258 
259  template <typename T>
260  void
261  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
262  {
263  if (idx.size() < 1)
264  return;
265  UT_ASSERT(idx.size() == instance.size()+1);
266  if (idx.size() != instance.size()+1)
267  return;
268  switch (idx[0])
269  {
270  case 0:
271  coerceValue(myGroup, ( ( value ) ));
272  break;
273  case 1:
274  coerceValue(myMergegrp, ( ( value ) ));
275  break;
276  case 2:
277  coerceValue(myMergemethod, clampMinValue(0, clampMaxValue(5, value ) ));
278  break;
279  case 3:
280  coerceValue(myClampvolume, ( ( value ) ));
281  break;
282  case 4:
283  coerceValue(myDstpreadd, ( ( value ) ));
284  break;
285  case 5:
286  coerceValue(myDstpremul, ( ( value ) ));
287  break;
288  case 6:
289  coerceValue(mySrcpreadd, ( ( value ) ));
290  break;
291  case 7:
292  coerceValue(mySrcpremul, ( ( value ) ));
293  break;
294  case 8:
295  coerceValue(myPostadd, ( ( value ) ));
296  break;
297  case 9:
298  coerceValue(myPostmul, ( ( value ) ));
299  break;
300  case 10:
301  coerceValue(myDoclampmin, ( ( value ) ));
302  break;
303  case 11:
304  coerceValue(myClampmin, ( ( value ) ));
305  break;
306  case 12:
307  coerceValue(myDoclampmax, ( ( value ) ));
308  break;
309  case 13:
310  coerceValue(myClampmax, ( ( value ) ));
311  break;
312 
313  }
314  }
315 
316  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
337  { doSetParmValue(idx, instance, value); }
338 
339  exint getNestNumParms(TempIndex idx) const override
340  {
341  if (idx.size() == 0)
342  return 14;
343  switch (idx[0])
344  {
345 
346  }
347  // Invalid
348  return 0;
349  }
350 
351  const char *getNestParmName(TempIndex fieldnum) const override
352  {
353  if (fieldnum.size() < 1)
354  return 0;
355  switch (fieldnum[0])
356  {
357  case 0:
358  return "group";
359  case 1:
360  return "mergegrp";
361  case 2:
362  return "mergemethod";
363  case 3:
364  return "clampvolume";
365  case 4:
366  return "dstpreadd";
367  case 5:
368  return "dstpremul";
369  case 6:
370  return "srcpreadd";
371  case 7:
372  return "srcpremul";
373  case 8:
374  return "postadd";
375  case 9:
376  return "postmul";
377  case 10:
378  return "doclampmin";
379  case 11:
380  return "clampmin";
381  case 12:
382  return "doclampmax";
383  case 13:
384  return "clampmax";
385 
386  }
387  return 0;
388  }
389 
390  ParmType getNestParmType(TempIndex fieldnum) const override
391  {
392  if (fieldnum.size() < 1)
393  return PARM_UNSUPPORTED;
394  switch (fieldnum[0])
395  {
396  case 0:
397  return PARM_STRING;
398  case 1:
399  return PARM_STRING;
400  case 2:
401  return PARM_INTEGER;
402  case 3:
403  return PARM_INTEGER;
404  case 4:
405  return PARM_FLOAT;
406  case 5:
407  return PARM_FLOAT;
408  case 6:
409  return PARM_FLOAT;
410  case 7:
411  return PARM_FLOAT;
412  case 8:
413  return PARM_FLOAT;
414  case 9:
415  return PARM_FLOAT;
416  case 10:
417  return PARM_INTEGER;
418  case 11:
419  return PARM_FLOAT;
420  case 12:
421  return PARM_INTEGER;
422  case 13:
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, myMergegrp);
540  saveData(os, myMergemethod);
541  saveData(os, myClampvolume);
542  saveData(os, myDstpreadd);
543  saveData(os, myDstpremul);
544  saveData(os, mySrcpreadd);
545  saveData(os, mySrcpremul);
546  saveData(os, myPostadd);
547  saveData(os, myPostmul);
548  saveData(os, myDoclampmin);
549  saveData(os, myClampmin);
550  saveData(os, myDoclampmax);
551  saveData(os, myClampmax);
552 
553  }
554 
555  bool load(UT_IStream &is)
556  {
557  int32 v;
558  is.bread(&v, 1);
559  if (version() != v)
560  {
561  // Fail incompatible versions
562  return false;
563  }
564  loadData(is, myGroup);
565  loadData(is, myMergegrp);
566  loadData(is, myMergemethod);
567  loadData(is, myClampvolume);
568  loadData(is, myDstpreadd);
569  loadData(is, myDstpremul);
570  loadData(is, mySrcpreadd);
571  loadData(is, mySrcpremul);
572  loadData(is, myPostadd);
573  loadData(is, myPostmul);
574  loadData(is, myDoclampmin);
575  loadData(is, myClampmin);
576  loadData(is, myDoclampmax);
577  loadData(is, myClampmax);
578 
579  return true;
580  }
581 
582  const UT_StringHolder & getGroup() const { return myGroup; }
583  void setGroup(const UT_StringHolder & val) { myGroup = val; }
585  {
586  SOP_Node *thissop = cookparms.getNode();
587  if (!thissop) return getGroup();
589  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
590  return result;
591  }
592  const UT_StringHolder & getMergegrp() const { return myMergegrp; }
593  void setMergegrp(const UT_StringHolder & val) { myMergegrp = val; }
595  {
596  SOP_Node *thissop = cookparms.getNode();
597  if (!thissop) return getMergegrp();
599  OP_Utils::evalOpParm(result, thissop, "mergegrp", cookparms.getCookTime(), 0);
600  return result;
601  }
602  Mergemethod getMergemethod() const { return Mergemethod(myMergemethod); }
603  void setMergemethod(Mergemethod val) { myMergemethod = int64(val); }
605  {
606  SOP_Node *thissop = cookparms.getNode();
607  if (!thissop) return getMergemethod();
608  int64 result;
609  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
610  return Mergemethod(result);
611  }
612  bool getClampvolume() const { return myClampvolume; }
613  void setClampvolume(bool val) { myClampvolume = val; }
614  bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
615  {
616  SOP_Node *thissop = cookparms.getNode();
617  if (!thissop) return getClampvolume();
618  bool result;
619  OP_Utils::evalOpParm(result, thissop, "clampvolume", cookparms.getCookTime(), 0);
620  return result;
621  }
622  fpreal64 getDstpreadd() const { return myDstpreadd; }
623  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
625  {
626  SOP_Node *thissop = cookparms.getNode();
627  if (!thissop) return getDstpreadd();
629  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
630  return result;
631  }
632  fpreal64 getDstpremul() const { return myDstpremul; }
633  void setDstpremul(fpreal64 val) { myDstpremul = val; }
635  {
636  SOP_Node *thissop = cookparms.getNode();
637  if (!thissop) return getDstpremul();
639  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
640  return result;
641  }
642  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
643  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
645  {
646  SOP_Node *thissop = cookparms.getNode();
647  if (!thissop) return getSrcpreadd();
649  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
650  return result;
651  }
652  fpreal64 getSrcpremul() const { return mySrcpremul; }
653  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getSrcpremul();
659  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
660  return result;
661  }
662  fpreal64 getPostadd() const { return myPostadd; }
663  void setPostadd(fpreal64 val) { myPostadd = val; }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getPostadd();
669  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
670  return result;
671  }
672  fpreal64 getPostmul() const { return myPostmul; }
673  void setPostmul(fpreal64 val) { myPostmul = val; }
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getPostmul();
679  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
680  return result;
681  }
682  bool getDoclampmin() const { return myDoclampmin; }
683  void setDoclampmin(bool val) { myDoclampmin = val; }
684  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getDoclampmin();
688  bool result;
689  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
690  return result;
691  }
692  fpreal64 getClampmin() const { return myClampmin; }
693  void setClampmin(fpreal64 val) { myClampmin = val; }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getClampmin();
699  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
700  return result;
701  }
702  bool getDoclampmax() const { return myDoclampmax; }
703  void setDoclampmax(bool val) { myDoclampmax = val; }
704  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getDoclampmax();
708  bool result;
709  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
710  return result;
711  }
712  fpreal64 getClampmax() const { return myClampmax; }
713  void setClampmax(fpreal64 val) { myClampmax = val; }
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getClampmax();
719  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
720  return result;
721  }
722 
723 private:
724  UT_StringHolder myGroup;
725  UT_StringHolder myMergegrp;
726  int64 myMergemethod;
727  bool myClampvolume;
728  fpreal64 myDstpreadd;
729  fpreal64 myDstpremul;
730  fpreal64 mySrcpreadd;
731  fpreal64 mySrcpremul;
732  fpreal64 myPostadd;
733  fpreal64 myPostmul;
734  bool myDoclampmin;
735  fpreal64 myClampmin;
736  bool myDoclampmax;
737  fpreal64 myClampmax;
738 
739 };
fpreal64 getClampmax() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setPostadd(fpreal64 val)
fpreal64 getClampmin() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Mergemethod getMergemethod() const
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
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
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setSrcpreadd(fpreal64 val)
**But if you need a result
Definition: thread.h:613
const UT_StringHolder & getMergegrp() const
void setDstpremul(fpreal64 val)
bool operator==(const SOP_VolumeMergeParms &src) const
fpreal64 getPostadd() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opMergegrp(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal64 getSrcpremul() const
const UT_StringHolder & getGroup() const
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 setDstpreadd(fpreal64 val)
fpreal64 getPostmul() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
fpreal64 opClampmax(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE UT_StringHolder getToken(Mergemethod enum_value)
Mergemethod opMergemethod(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setPostmul(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setMergemethod(Mergemethod val)
const char * getNestParmName(TempIndex fieldnum) const override
exint length() 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
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
fpreal64 getDstpreadd() const
fpreal64 getDstpremul() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setClampmin(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 getSrcpreadd() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, fpreal64 v)
void setClampmax(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setGroup(const UT_StringHolder &val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
bool load(UT_IStream &is)
GLboolean r
Definition: glcorearb.h:1222
void setSrcpremul(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix2D v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, bool &v)
bool operator!=(const SOP_VolumeMergeParms &src) const
type
Definition: core.h:1059
void setMergegrp(const UT_StringHolder &val)
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 opClampmin(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const