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 }
35 
36 
38 {
39 public:
40  static int version() { return 1; }
41 
43  {
44  myGroup = ""_UTsh;
45  myMergegrp = ""_UTsh;
46  myMergemethod = 1;
47  myClampvolume = true;
48  myDstpreadd = 0;
49  myDstpremul = 1;
50  mySrcpreadd = 0;
51  mySrcpremul = 1;
52  myPostadd = 0;
53  myPostmul = 1;
54  myDoclampmin = false;
55  myClampmin = 0;
56  myDoclampmax = false;
57  myClampmax = 1;
58 
59  }
60 
61  explicit SOP_VolumeMergeParms(const SOP_VolumeMergeParms &) = default;
63  SOP_VolumeMergeParms(SOP_VolumeMergeParms &&) noexcept = default;
64  SOP_VolumeMergeParms &operator=(SOP_VolumeMergeParms &&) noexcept = default;
65 
66  ~SOP_VolumeMergeParms() override {}
67 
68  bool operator==(const SOP_VolumeMergeParms &src) const
69  {
70  if (myGroup != src.myGroup) return false;
71  if (myMergegrp != src.myMergegrp) return false;
72  if (myMergemethod != src.myMergemethod) return false;
73  if (myClampvolume != src.myClampvolume) return false;
74  if (myDstpreadd != src.myDstpreadd) return false;
75  if (myDstpremul != src.myDstpremul) return false;
76  if (mySrcpreadd != src.mySrcpreadd) return false;
77  if (mySrcpremul != src.mySrcpremul) return false;
78  if (myPostadd != src.myPostadd) return false;
79  if (myPostmul != src.myPostmul) return false;
80  if (myDoclampmin != src.myDoclampmin) return false;
81  if (myClampmin != src.myClampmin) return false;
82  if (myDoclampmax != src.myDoclampmax) return false;
83  if (myClampmax != src.myClampmax) return false;
84 
85  return true;
86  }
87  bool operator!=(const SOP_VolumeMergeParms &src) const
88  {
89  return !operator==(src);
90  }
92 
93 
94 
95  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
96  {
97  myGroup = ""_UTsh;
98  if (true)
99  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
100  myMergegrp = ""_UTsh;
101  if (true)
102  graph->evalOpParm(myMergegrp, nodeidx, "mergegrp", time, 0);
103  myMergemethod = 1;
104  if (true)
105  graph->evalOpParm(myMergemethod, nodeidx, "mergemethod", time, 0);
106  myClampvolume = true;
107  if (true)
108  graph->evalOpParm(myClampvolume, nodeidx, "clampvolume", time, 0);
109  myDstpreadd = 0;
110  if (true)
111  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, 0);
112  myDstpremul = 1;
113  if (true)
114  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, 0);
115  mySrcpreadd = 0;
116  if (true)
117  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, 0);
118  mySrcpremul = 1;
119  if (true)
120  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, 0);
121  myPostadd = 0;
122  if (true)
123  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, 0);
124  myPostmul = 1;
125  if (true)
126  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, 0);
127  myDoclampmin = false;
128  if (true)
129  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, 0);
130  myClampmin = 0;
131  if (true && ( (true&&!(((getDoclampmin()==0)))) ) )
132  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, 0);
133  myDoclampmax = false;
134  if (true)
135  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, 0);
136  myClampmax = 1;
137  if (true && ( (true&&!(((getDoclampmax()==0)))) ) )
138  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, 0);
139 
140  }
141 
142 
143  void loadFromOpSubclass(const LoadParms &loadparms) override
144  {
145  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
146  }
147 
148 
149  void copyFrom(const OP_NodeParms *src) override
150  {
151  *this = *((const SOP_VolumeMergeParms *)src);
152  }
153 
154  template <typename T>
155  void
156  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
157  {
158  if (idx.size() < 1)
159  return;
160  UT_ASSERT(idx.size() == instance.size()+1);
161  if (idx.size() != instance.size()+1)
162  return;
163  switch (idx[0])
164  {
165  case 0:
166  coerceValue(value, myGroup);
167  break;
168  case 1:
169  coerceValue(value, myMergegrp);
170  break;
171  case 2:
172  coerceValue(value, myMergemethod);
173  break;
174  case 3:
175  coerceValue(value, myClampvolume);
176  break;
177  case 4:
178  coerceValue(value, myDstpreadd);
179  break;
180  case 5:
181  coerceValue(value, myDstpremul);
182  break;
183  case 6:
184  coerceValue(value, mySrcpreadd);
185  break;
186  case 7:
187  coerceValue(value, mySrcpremul);
188  break;
189  case 8:
190  coerceValue(value, myPostadd);
191  break;
192  case 9:
193  coerceValue(value, myPostmul);
194  break;
195  case 10:
196  coerceValue(value, myDoclampmin);
197  break;
198  case 11:
199  coerceValue(value, myClampmin);
200  break;
201  case 12:
202  coerceValue(value, myDoclampmax);
203  break;
204  case 13:
205  coerceValue(value, myClampmax);
206  break;
207 
208  }
209  }
210 
211  bool isParmColorRamp(exint idx) const override
212  {
213  switch (idx)
214  {
215 
216  }
217  return false;
218  }
219 
220  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
241  { doGetParmValue(idx, instance, value); }
242 
243  template <typename T>
244  void
245  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
246  {
247  if (idx.size() < 1)
248  return;
249  UT_ASSERT(idx.size() == instance.size()+1);
250  if (idx.size() != instance.size()+1)
251  return;
252  switch (idx[0])
253  {
254  case 0:
255  coerceValue(myGroup, ( ( value ) ));
256  break;
257  case 1:
258  coerceValue(myMergegrp, ( ( value ) ));
259  break;
260  case 2:
261  coerceValue(myMergemethod, clampMinValue(0, clampMaxValue(5, value ) ));
262  break;
263  case 3:
264  coerceValue(myClampvolume, ( ( value ) ));
265  break;
266  case 4:
267  coerceValue(myDstpreadd, ( ( value ) ));
268  break;
269  case 5:
270  coerceValue(myDstpremul, ( ( value ) ));
271  break;
272  case 6:
273  coerceValue(mySrcpreadd, ( ( value ) ));
274  break;
275  case 7:
276  coerceValue(mySrcpremul, ( ( value ) ));
277  break;
278  case 8:
279  coerceValue(myPostadd, ( ( value ) ));
280  break;
281  case 9:
282  coerceValue(myPostmul, ( ( value ) ));
283  break;
284  case 10:
285  coerceValue(myDoclampmin, ( ( value ) ));
286  break;
287  case 11:
288  coerceValue(myClampmin, ( ( value ) ));
289  break;
290  case 12:
291  coerceValue(myDoclampmax, ( ( value ) ));
292  break;
293  case 13:
294  coerceValue(myClampmax, ( ( value ) ));
295  break;
296 
297  }
298  }
299 
300  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
321  { doSetParmValue(idx, instance, value); }
322 
323  exint getNestNumParms(TempIndex idx) const override
324  {
325  if (idx.size() == 0)
326  return 14;
327  switch (idx[0])
328  {
329 
330  }
331  // Invalid
332  return 0;
333  }
334 
335  const char *getNestParmName(TempIndex fieldnum) const override
336  {
337  if (fieldnum.size() < 1)
338  return 0;
339  switch (fieldnum[0])
340  {
341  case 0:
342  return "group";
343  case 1:
344  return "mergegrp";
345  case 2:
346  return "mergemethod";
347  case 3:
348  return "clampvolume";
349  case 4:
350  return "dstpreadd";
351  case 5:
352  return "dstpremul";
353  case 6:
354  return "srcpreadd";
355  case 7:
356  return "srcpremul";
357  case 8:
358  return "postadd";
359  case 9:
360  return "postmul";
361  case 10:
362  return "doclampmin";
363  case 11:
364  return "clampmin";
365  case 12:
366  return "doclampmax";
367  case 13:
368  return "clampmax";
369 
370  }
371  return 0;
372  }
373 
374  ParmType getNestParmType(TempIndex fieldnum) const override
375  {
376  if (fieldnum.size() < 1)
377  return PARM_UNSUPPORTED;
378  switch (fieldnum[0])
379  {
380  case 0:
381  return PARM_STRING;
382  case 1:
383  return PARM_STRING;
384  case 2:
385  return PARM_INTEGER;
386  case 3:
387  return PARM_INTEGER;
388  case 4:
389  return PARM_FLOAT;
390  case 5:
391  return PARM_FLOAT;
392  case 6:
393  return PARM_FLOAT;
394  case 7:
395  return PARM_FLOAT;
396  case 8:
397  return PARM_FLOAT;
398  case 9:
399  return PARM_FLOAT;
400  case 10:
401  return PARM_INTEGER;
402  case 11:
403  return PARM_FLOAT;
404  case 12:
405  return PARM_INTEGER;
406  case 13:
407  return PARM_FLOAT;
408 
409  }
410  return PARM_UNSUPPORTED;
411  }
412 
413  // Boiler plate to load individual types.
414  static void loadData(UT_IStream &is, int64 &v)
415  { is.bread(&v, 1); }
416  static void loadData(UT_IStream &is, bool &v)
417  { int64 iv; is.bread(&iv, 1); v = iv; }
418  static void loadData(UT_IStream &is, fpreal64 &v)
419  { is.bread<fpreal64>(&v, 1); }
420  static void loadData(UT_IStream &is, UT_Vector2D &v)
421  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
422  static void loadData(UT_IStream &is, UT_Vector3D &v)
423  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
424  is.bread<fpreal64>(&v.z(), 1); }
425  static void loadData(UT_IStream &is, UT_Vector4D &v)
426  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
427  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
428  static void loadData(UT_IStream &is, UT_Matrix2D &v)
429  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
430  static void loadData(UT_IStream &is, UT_Matrix3D &v)
431  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
432  static void loadData(UT_IStream &is, UT_Matrix4D &v)
433  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
434  static void loadData(UT_IStream &is, UT_Vector2I &v)
435  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
436  static void loadData(UT_IStream &is, UT_Vector3I &v)
437  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
438  is.bread<int64>(&v.z(), 1); }
439  static void loadData(UT_IStream &is, UT_Vector4I &v)
440  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
441  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
443  { is.bread(v); }
445  { UT_StringHolder rampdata;
446  loadData(is, rampdata);
447  if (rampdata.isstring())
448  {
449  v.reset(new UT_Ramp());
450  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
451  v->load(istr);
452  }
453  else v.reset();
454  }
457  loadData(is, data);
458  if (data.isstring())
459  {
460  // Find the data type.
461  const char *colon = UT_StringWrap(data).findChar(':');
462  if (colon)
463  {
464  int typelen = colon - data.buffer();
466  type.strncpy(data.buffer(), typelen);
467  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
468 
469  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
470  }
471  }
472  else v.reset();
473  }
474 
475  static void saveData(std::ostream &os, int64 v)
476  { UTwrite(os, &v); }
477  static void saveData(std::ostream &os, bool v)
478  { int64 iv = v; UTwrite(os, &iv); }
479  static void saveData(std::ostream &os, fpreal64 v)
480  { UTwrite<fpreal64>(os, &v); }
481  static void saveData(std::ostream &os, UT_Vector2D v)
482  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
483  static void saveData(std::ostream &os, UT_Vector3D v)
484  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
485  UTwrite<fpreal64>(os, &v.z()); }
486  static void saveData(std::ostream &os, UT_Vector4D v)
487  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
488  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
489  static void saveData(std::ostream &os, UT_Matrix2D v)
491  static void saveData(std::ostream &os, UT_Matrix3D v)
493  static void saveData(std::ostream &os, UT_Matrix4D v)
495  static void saveData(std::ostream &os, UT_StringHolder s)
496  { UT_StringWrap(s).saveBinary(os); }
497  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
499  UT_OStringStream ostr;
500  if (s) s->save(ostr);
501  result = ostr.str();
502  saveData(os, result);
503  }
504  static void saveData(std::ostream &os, PRM_DataItemHandle s)
506  UT_OStringStream ostr;
507  if (s)
508  {
509  ostr << s->getDataTypeToken();
510  ostr << ":";
511  s->saveBinary(ostr);
512  }
513  result = ostr.str();
514  saveData(os, result);
515  }
516 
517 
518  void save(std::ostream &os) const
519  {
520  int32 v = version();
521  UTwrite(os, &v);
522  saveData(os, myGroup);
523  saveData(os, myMergegrp);
524  saveData(os, myMergemethod);
525  saveData(os, myClampvolume);
526  saveData(os, myDstpreadd);
527  saveData(os, myDstpremul);
528  saveData(os, mySrcpreadd);
529  saveData(os, mySrcpremul);
530  saveData(os, myPostadd);
531  saveData(os, myPostmul);
532  saveData(os, myDoclampmin);
533  saveData(os, myClampmin);
534  saveData(os, myDoclampmax);
535  saveData(os, myClampmax);
536 
537  }
538 
539  bool load(UT_IStream &is)
540  {
541  int32 v;
542  is.bread(&v, 1);
543  if (version() != v)
544  {
545  // Fail incompatible versions
546  return false;
547  }
548  loadData(is, myGroup);
549  loadData(is, myMergegrp);
550  loadData(is, myMergemethod);
551  loadData(is, myClampvolume);
552  loadData(is, myDstpreadd);
553  loadData(is, myDstpremul);
554  loadData(is, mySrcpreadd);
555  loadData(is, mySrcpremul);
556  loadData(is, myPostadd);
557  loadData(is, myPostmul);
558  loadData(is, myDoclampmin);
559  loadData(is, myClampmin);
560  loadData(is, myDoclampmax);
561  loadData(is, myClampmax);
562 
563  return true;
564  }
565 
566  const UT_StringHolder & getGroup() const { return myGroup; }
567  void setGroup(const UT_StringHolder & val) { myGroup = val; }
569  {
570  SOP_Node *thissop = cookparms.getNode();
571  if (!thissop) return getGroup();
573  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
574  return result;
575  }
576  const UT_StringHolder & getMergegrp() const { return myMergegrp; }
577  void setMergegrp(const UT_StringHolder & val) { myMergegrp = val; }
579  {
580  SOP_Node *thissop = cookparms.getNode();
581  if (!thissop) return getMergegrp();
583  OP_Utils::evalOpParm(result, thissop, "mergegrp", cookparms.getCookTime(), 0);
584  return result;
585  }
586  Mergemethod getMergemethod() const { return Mergemethod(myMergemethod); }
587  void setMergemethod(Mergemethod val) { myMergemethod = int64(val); }
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getMergemethod();
592  int64 result;
593  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
594  return Mergemethod(result);
595  }
596  bool getClampvolume() const { return myClampvolume; }
597  void setClampvolume(bool val) { myClampvolume = val; }
598  bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getClampvolume();
602  bool result;
603  OP_Utils::evalOpParm(result, thissop, "clampvolume", cookparms.getCookTime(), 0);
604  return result;
605  }
606  fpreal64 getDstpreadd() const { return myDstpreadd; }
607  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getDstpreadd();
613  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
614  return result;
615  }
616  fpreal64 getDstpremul() const { return myDstpremul; }
617  void setDstpremul(fpreal64 val) { myDstpremul = val; }
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getDstpremul();
623  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
624  return result;
625  }
626  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
627  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getSrcpreadd();
633  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
634  return result;
635  }
636  fpreal64 getSrcpremul() const { return mySrcpremul; }
637  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getSrcpremul();
643  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
644  return result;
645  }
646  fpreal64 getPostadd() const { return myPostadd; }
647  void setPostadd(fpreal64 val) { myPostadd = val; }
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getPostadd();
653  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
654  return result;
655  }
656  fpreal64 getPostmul() const { return myPostmul; }
657  void setPostmul(fpreal64 val) { myPostmul = val; }
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getPostmul();
663  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
664  return result;
665  }
666  bool getDoclampmin() const { return myDoclampmin; }
667  void setDoclampmin(bool val) { myDoclampmin = val; }
668  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getDoclampmin();
672  bool result;
673  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
674  return result;
675  }
676  fpreal64 getClampmin() const { return myClampmin; }
677  void setClampmin(fpreal64 val) { myClampmin = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getClampmin();
683  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
684  return result;
685  }
686  bool getDoclampmax() const { return myDoclampmax; }
687  void setDoclampmax(bool val) { myDoclampmax = val; }
688  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getDoclampmax();
692  bool result;
693  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
694  return result;
695  }
696  fpreal64 getClampmax() const { return myClampmax; }
697  void setClampmax(fpreal64 val) { myClampmax = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getClampmax();
703  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
704  return result;
705  }
706 
707 private:
708  UT_StringHolder myGroup;
709  UT_StringHolder myMergegrp;
710  int64 myMergemethod;
711  bool myClampvolume;
712  fpreal64 myDstpreadd;
713  fpreal64 myDstpremul;
714  fpreal64 mySrcpreadd;
715  fpreal64 mySrcpremul;
716  fpreal64 myPostadd;
717  fpreal64 myPostmul;
718  bool myDoclampmin;
719  fpreal64 myClampmin;
720  bool myDoclampmax;
721  fpreal64 myClampmax;
722 
723 };
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
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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)
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
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)
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
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 coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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
void setGroup(const UT_StringHolder &val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
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:1385
#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:89
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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