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 <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_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 
102  if (baseGetSignature() != src.baseGetSignature()) return false;
103 
104  return true;
105  }
107  {
108  return !operator==(src);
109  }
111 
112 
113 
114  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
115  {
116  myGroup = ""_UTsh;
117  if (true)
118  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
119  myMergegrp = ""_UTsh;
120  if (true)
121  graph->evalOpParm(myMergegrp, nodeidx, "mergegrp", time, graph->isDirect()?nullptr:depnode);
122  myMergemethod = 1;
123  if (true)
124  graph->evalOpParm(myMergemethod, nodeidx, "mergemethod", time, graph->isDirect()?nullptr:depnode);
125  myClampvolume = true;
126  if (true)
127  graph->evalOpParm(myClampvolume, nodeidx, "clampvolume", time, graph->isDirect()?nullptr:depnode);
128  myDstpreadd = 0;
129  if (true)
130  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, graph->isDirect()?nullptr:depnode);
131  myDstpremul = 1;
132  if (true)
133  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, graph->isDirect()?nullptr:depnode);
134  mySrcpreadd = 0;
135  if (true)
136  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, graph->isDirect()?nullptr:depnode);
137  mySrcpremul = 1;
138  if (true)
139  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, graph->isDirect()?nullptr:depnode);
140  myPostadd = 0;
141  if (true)
142  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, graph->isDirect()?nullptr:depnode);
143  myPostmul = 1;
144  if (true)
145  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, graph->isDirect()?nullptr:depnode);
146  myDoclampmin = false;
147  if (true)
148  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, graph->isDirect()?nullptr:depnode);
149  myClampmin = 0;
150  if (true && ( (true&&!(((getDoclampmin()==0)))) ) )
151  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, graph->isDirect()?nullptr:depnode);
152  myDoclampmax = false;
153  if (true)
154  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, graph->isDirect()?nullptr:depnode);
155  myClampmax = 1;
156  if (true && ( (true&&!(((getDoclampmax()==0)))) ) )
157  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, graph->isDirect()?nullptr:depnode);
158 
159  }
160 
161 
162  void loadFromOpSubclass(const LoadParms &loadparms) override
163  {
164  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
165  }
166 
167 
168  void copyFrom(const OP_NodeParms *src) override
169  {
170  *this = *((const SOP_VolumeMergeParms *)src);
171  }
172 
173  template <typename T>
174  void
175  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
176  {
177  if (idx.size() < 1)
178  return;
179  UT_ASSERT(idx.size() == instance.size()+1);
180  if (idx.size() != instance.size()+1)
181  return;
182  switch (idx[0])
183  {
184  case 0:
185  coerceValue(value, myGroup);
186  break;
187  case 1:
188  coerceValue(value, myMergegrp);
189  break;
190  case 2:
191  coerceValue(value, myMergemethod);
192  break;
193  case 3:
194  coerceValue(value, myClampvolume);
195  break;
196  case 4:
197  coerceValue(value, myDstpreadd);
198  break;
199  case 5:
200  coerceValue(value, myDstpremul);
201  break;
202  case 6:
203  coerceValue(value, mySrcpreadd);
204  break;
205  case 7:
206  coerceValue(value, mySrcpremul);
207  break;
208  case 8:
209  coerceValue(value, myPostadd);
210  break;
211  case 9:
212  coerceValue(value, myPostmul);
213  break;
214  case 10:
215  coerceValue(value, myDoclampmin);
216  break;
217  case 11:
218  coerceValue(value, myClampmin);
219  break;
220  case 12:
221  coerceValue(value, myDoclampmax);
222  break;
223  case 13:
224  coerceValue(value, myClampmax);
225  break;
226 
227  }
228  }
229 
230  bool isParmColorRamp(exint idx) const override
231  {
232  switch (idx)
233  {
234 
235  }
236  return false;
237  }
238 
239  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
260  { doGetParmValue(idx, instance, value); }
261 
262  template <typename T>
263  void
264  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
265  {
266  if (idx.size() < 1)
267  return;
268  UT_ASSERT(idx.size() == instance.size()+1);
269  if (idx.size() != instance.size()+1)
270  return;
271  switch (idx[0])
272  {
273  case 0:
274  coerceValue(myGroup, ( ( value ) ));
275  break;
276  case 1:
277  coerceValue(myMergegrp, ( ( value ) ));
278  break;
279  case 2:
280  coerceValue(myMergemethod, clampMinValue(0, clampMaxValue(5, value ) ));
281  break;
282  case 3:
283  coerceValue(myClampvolume, ( ( value ) ));
284  break;
285  case 4:
286  coerceValue(myDstpreadd, ( ( value ) ));
287  break;
288  case 5:
289  coerceValue(myDstpremul, ( ( value ) ));
290  break;
291  case 6:
292  coerceValue(mySrcpreadd, ( ( value ) ));
293  break;
294  case 7:
295  coerceValue(mySrcpremul, ( ( value ) ));
296  break;
297  case 8:
298  coerceValue(myPostadd, ( ( value ) ));
299  break;
300  case 9:
301  coerceValue(myPostmul, ( ( value ) ));
302  break;
303  case 10:
304  coerceValue(myDoclampmin, ( ( value ) ));
305  break;
306  case 11:
307  coerceValue(myClampmin, ( ( value ) ));
308  break;
309  case 12:
310  coerceValue(myDoclampmax, ( ( value ) ));
311  break;
312  case 13:
313  coerceValue(myClampmax, ( ( value ) ));
314  break;
315 
316  }
317  }
318 
319  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
340  { doSetParmValue(idx, instance, value); }
341 
342  exint getNestNumParms(TempIndex idx) const override
343  {
344  if (idx.size() == 0)
345  return 14;
346  switch (idx[0])
347  {
348 
349  }
350  // Invalid
351  return 0;
352  }
353 
354  const char *getNestParmName(TempIndex fieldnum) const override
355  {
356  if (fieldnum.size() < 1)
357  return 0;
358  switch (fieldnum[0])
359  {
360  case 0:
361  return "group";
362  case 1:
363  return "mergegrp";
364  case 2:
365  return "mergemethod";
366  case 3:
367  return "clampvolume";
368  case 4:
369  return "dstpreadd";
370  case 5:
371  return "dstpremul";
372  case 6:
373  return "srcpreadd";
374  case 7:
375  return "srcpremul";
376  case 8:
377  return "postadd";
378  case 9:
379  return "postmul";
380  case 10:
381  return "doclampmin";
382  case 11:
383  return "clampmin";
384  case 12:
385  return "doclampmax";
386  case 13:
387  return "clampmax";
388 
389  }
390  return 0;
391  }
392 
393  ParmType getNestParmType(TempIndex fieldnum) const override
394  {
395  if (fieldnum.size() < 1)
396  return PARM_UNSUPPORTED;
397  switch (fieldnum[0])
398  {
399  case 0:
400  return PARM_STRING;
401  case 1:
402  return PARM_STRING;
403  case 2:
404  return PARM_INTEGER;
405  case 3:
406  return PARM_INTEGER;
407  case 4:
408  return PARM_FLOAT;
409  case 5:
410  return PARM_FLOAT;
411  case 6:
412  return PARM_FLOAT;
413  case 7:
414  return PARM_FLOAT;
415  case 8:
416  return PARM_FLOAT;
417  case 9:
418  return PARM_FLOAT;
419  case 10:
420  return PARM_INTEGER;
421  case 11:
422  return PARM_FLOAT;
423  case 12:
424  return PARM_INTEGER;
425  case 13:
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, myMergegrp);
543  saveData(os, myMergemethod);
544  saveData(os, myClampvolume);
545  saveData(os, myDstpreadd);
546  saveData(os, myDstpremul);
547  saveData(os, mySrcpreadd);
548  saveData(os, mySrcpremul);
549  saveData(os, myPostadd);
550  saveData(os, myPostmul);
551  saveData(os, myDoclampmin);
552  saveData(os, myClampmin);
553  saveData(os, myDoclampmax);
554  saveData(os, myClampmax);
555 
556  }
557 
558  bool load(UT_IStream &is)
559  {
560  int32 v;
561  is.bread(&v, 1);
562  if (version() != v)
563  {
564  // Fail incompatible versions
565  return false;
566  }
567  loadData(is, myGroup);
568  loadData(is, myMergegrp);
569  loadData(is, myMergemethod);
570  loadData(is, myClampvolume);
571  loadData(is, myDstpreadd);
572  loadData(is, myDstpremul);
573  loadData(is, mySrcpreadd);
574  loadData(is, mySrcpremul);
575  loadData(is, myPostadd);
576  loadData(is, myPostmul);
577  loadData(is, myDoclampmin);
578  loadData(is, myClampmin);
579  loadData(is, myDoclampmax);
580  loadData(is, myClampmax);
581 
582  return true;
583  }
584 
585  const UT_StringHolder & getGroup() const { return myGroup; }
586  void setGroup(const UT_StringHolder & val) { myGroup = val; }
588  {
589  SOP_Node *thissop = cookparms.getNode();
590  if (!thissop) return getGroup();
592  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
593  return result;
594  }
595  const UT_StringHolder & getMergegrp() const { return myMergegrp; }
596  void setMergegrp(const UT_StringHolder & val) { myMergegrp = val; }
598  {
599  SOP_Node *thissop = cookparms.getNode();
600  if (!thissop) return getMergegrp();
602  OP_Utils::evalOpParm(result, thissop, "mergegrp", cookparms.getCookTime(), 0);
603  return result;
604  }
605  Mergemethod getMergemethod() const { return Mergemethod(myMergemethod); }
606  void setMergemethod(Mergemethod val) { myMergemethod = int64(val); }
608  {
609  SOP_Node *thissop = cookparms.getNode();
610  if (!thissop) return getMergemethod();
611  int64 result;
612  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
613  return Mergemethod(result);
614  }
615  bool getClampvolume() const { return myClampvolume; }
616  void setClampvolume(bool val) { myClampvolume = val; }
617  bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
618  {
619  SOP_Node *thissop = cookparms.getNode();
620  if (!thissop) return getClampvolume();
621  bool result;
622  OP_Utils::evalOpParm(result, thissop, "clampvolume", cookparms.getCookTime(), 0);
623  return result;
624  }
625  fpreal64 getDstpreadd() const { return myDstpreadd; }
626  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
628  {
629  SOP_Node *thissop = cookparms.getNode();
630  if (!thissop) return getDstpreadd();
632  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
633  return result;
634  }
635  fpreal64 getDstpremul() const { return myDstpremul; }
636  void setDstpremul(fpreal64 val) { myDstpremul = val; }
638  {
639  SOP_Node *thissop = cookparms.getNode();
640  if (!thissop) return getDstpremul();
642  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
643  return result;
644  }
645  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
646  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
648  {
649  SOP_Node *thissop = cookparms.getNode();
650  if (!thissop) return getSrcpreadd();
652  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
653  return result;
654  }
655  fpreal64 getSrcpremul() const { return mySrcpremul; }
656  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
658  {
659  SOP_Node *thissop = cookparms.getNode();
660  if (!thissop) return getSrcpremul();
662  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
663  return result;
664  }
665  fpreal64 getPostadd() const { return myPostadd; }
666  void setPostadd(fpreal64 val) { myPostadd = val; }
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getPostadd();
672  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
673  return result;
674  }
675  fpreal64 getPostmul() const { return myPostmul; }
676  void setPostmul(fpreal64 val) { myPostmul = val; }
678  {
679  SOP_Node *thissop = cookparms.getNode();
680  if (!thissop) return getPostmul();
682  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
683  return result;
684  }
685  bool getDoclampmin() const { return myDoclampmin; }
686  void setDoclampmin(bool val) { myDoclampmin = val; }
687  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
688  {
689  SOP_Node *thissop = cookparms.getNode();
690  if (!thissop) return getDoclampmin();
691  bool result;
692  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
693  return result;
694  }
695  fpreal64 getClampmin() const { return myClampmin; }
696  void setClampmin(fpreal64 val) { myClampmin = val; }
698  {
699  SOP_Node *thissop = cookparms.getNode();
700  if (!thissop) return getClampmin();
702  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
703  return result;
704  }
705  bool getDoclampmax() const { return myDoclampmax; }
706  void setDoclampmax(bool val) { myDoclampmax = val; }
707  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getDoclampmax();
711  bool result;
712  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
713  return result;
714  }
715  fpreal64 getClampmax() const { return myClampmax; }
716  void setClampmax(fpreal64 val) { myClampmax = val; }
718  {
719  SOP_Node *thissop = cookparms.getNode();
720  if (!thissop) return getClampmax();
722  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
723  return result;
724  }
725 
726 private:
727  UT_StringHolder myGroup;
728  UT_StringHolder myMergegrp;
729  int64 myMergemethod;
730  bool myClampvolume;
731  fpreal64 myDstpreadd;
732  fpreal64 myDstpremul;
733  fpreal64 mySrcpreadd;
734  fpreal64 mySrcpremul;
735  fpreal64 myPostadd;
736  fpreal64 myPostmul;
737  bool myDoclampmin;
738  fpreal64 myClampmin;
739  bool myDoclampmax;
740  fpreal64 myClampmax;
741 
742 };
fpreal64 getClampmax() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
type
Definition: core.h:556
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:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
void setMergegrp(const UT_StringHolder &val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
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