HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeMix.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_VolumeMixEnums
24 {
25  enum class Mixmethod
26  {
27  COPY = 0,
28  ADD,
29  SUB,
30  DIFF,
31  MUL,
32  DIV,
33  INVERT,
34  MAX,
35  MIN,
36  CLAMP,
37  BLEND,
38  USER
39  };
40 }
41 
42 
44 {
45 public:
46  static int version() { return 1; }
47 
49  {
50  myGroup = ""_sh;
51  myMixgrp = ""_sh;
52  myMixmethod = 0;
53  myRange = UT_Vector2D(0,1);
54  myBlend = 0.5;
55  myExpr = 0;
56  myDstpreadd = 0;
57  myDstpremul = 1;
58  mySrcpreadd = 0;
59  mySrcpremul = 1;
60  myPostadd = 0;
61  myPostmul = 1;
62  myDoclampmin = false;
63  myClampmin = 0;
64  myDoclampmax = false;
65  myClampmax = 1;
66  myExpandvdb = true;
67 
68  }
69 
70  explicit SOP_VolumeMixParms(const SOP_VolumeMixParms &) = default;
71 
72  ~SOP_VolumeMixParms() override {}
73 
74  bool operator==(const SOP_VolumeMixParms &src) const
75  {
76  if (myGroup != src.myGroup) return false;
77  if (myMixgrp != src.myMixgrp) return false;
78  if (myMixmethod != src.myMixmethod) return false;
79  if (myRange != src.myRange) return false;
80  if (myBlend != src.myBlend) return false;
81  if (myExpr != src.myExpr) return false;
82  if (myDstpreadd != src.myDstpreadd) return false;
83  if (myDstpremul != src.myDstpremul) return false;
84  if (mySrcpreadd != src.mySrcpreadd) return false;
85  if (mySrcpremul != src.mySrcpremul) return false;
86  if (myPostadd != src.myPostadd) return false;
87  if (myPostmul != src.myPostmul) return false;
88  if (myDoclampmin != src.myDoclampmin) return false;
89  if (myClampmin != src.myClampmin) return false;
90  if (myDoclampmax != src.myDoclampmax) return false;
91  if (myClampmax != src.myClampmax) return false;
92  if (myExpandvdb != src.myExpandvdb) return false;
93 
94  return true;
95  }
96  bool operator!=(const SOP_VolumeMixParms &src) const
97  {
98  return !operator==(src);
99  }
101 
102 
103 
104  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
105  {
106  myGroup = ""_sh;
107  if (true)
108  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
109  myMixgrp = ""_sh;
110  if (true)
111  graph->evalOpParm(myMixgrp, nodeidx, "mixgrp", time, 0);
112  myMixmethod = 0;
113  if (true)
114  graph->evalOpParm(myMixmethod, nodeidx, "mixmethod", time, 0);
115  myRange = UT_Vector2D(0,1);
116  if (true && ( (!(((int64(getMixmethod())!=9)))) ) )
117  graph->evalOpParm(myRange, nodeidx, "range", time, 0);
118  myBlend = 0.5;
119  if (true && ( (!(((int64(getMixmethod())!=10)))) ) )
120  graph->evalOpParm(myBlend, nodeidx, "blend", time, 0);
121  myExpr = 0;
122  if (true && ( (!(((int64(getMixmethod())!=11)))) ) )
123  graph->evalOpParm(myExpr, nodeidx, "expr", time, 0);
124  myDstpreadd = 0;
125  if (true)
126  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, 0);
127  myDstpremul = 1;
128  if (true)
129  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, 0);
130  mySrcpreadd = 0;
131  if (true)
132  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, 0);
133  mySrcpremul = 1;
134  if (true)
135  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, 0);
136  myPostadd = 0;
137  if (true)
138  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, 0);
139  myPostmul = 1;
140  if (true)
141  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, 0);
142  myDoclampmin = false;
143  if (true)
144  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, 0);
145  myClampmin = 0;
146  if (true && ( (!(((getDoclampmin()==0)))) ) )
147  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, 0);
148  myDoclampmax = false;
149  if (true)
150  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, 0);
151  myClampmax = 1;
152  if (true && ( (!(((getDoclampmax()==0)))) ) )
153  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, 0);
154  myExpandvdb = true;
155  if (true)
156  graph->evalOpParm(myExpandvdb, nodeidx, "expandvdb", time, 0);
157 
158  }
159 
160 
161  void loadFromOpSubclass(const LoadParms &loadparms) override
162  {
163  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
164  }
165 
166 
167  void copyFrom(const SOP_NodeParms *src) override
168  {
169  *this = *((const SOP_VolumeMixParms *)src);
170  }
171 
172  template <typename T>
173  void
174  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
175  {
176  if (idx.size() < 1)
177  return;
178  UT_ASSERT(idx.size() == instance.size()+1);
179  if (idx.size() != instance.size()+1)
180  return;
181  switch (idx[0])
182  {
183  case 0:
184  coerceValue(value, myGroup);
185  break;
186  case 1:
187  coerceValue(value, myMixgrp);
188  break;
189  case 2:
190  coerceValue(value, myMixmethod);
191  break;
192  case 3:
193  coerceValue(value, myRange);
194  break;
195  case 4:
196  coerceValue(value, myBlend);
197  break;
198  case 5:
199  coerceValue(value, myExpr);
200  break;
201  case 6:
202  coerceValue(value, myDstpreadd);
203  break;
204  case 7:
205  coerceValue(value, myDstpremul);
206  break;
207  case 8:
208  coerceValue(value, mySrcpreadd);
209  break;
210  case 9:
211  coerceValue(value, mySrcpremul);
212  break;
213  case 10:
214  coerceValue(value, myPostadd);
215  break;
216  case 11:
217  coerceValue(value, myPostmul);
218  break;
219  case 12:
220  coerceValue(value, myDoclampmin);
221  break;
222  case 13:
223  coerceValue(value, myClampmin);
224  break;
225  case 14:
226  coerceValue(value, myDoclampmax);
227  break;
228  case 15:
229  coerceValue(value, myClampmax);
230  break;
231  case 16:
232  coerceValue(value, myExpandvdb);
233  break;
234 
235  }
236  }
237 
238  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
259  { doGetParmValue(idx, instance, value); }
260 
261  template <typename T>
262  void
263  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
264  {
265  if (idx.size() < 1)
266  return;
267  UT_ASSERT(idx.size() == instance.size()+1);
268  if (idx.size() != instance.size()+1)
269  return;
270  switch (idx[0])
271  {
272  case 0:
273  coerceValue(myGroup, value);
274  break;
275  case 1:
276  coerceValue(myMixgrp, value);
277  break;
278  case 2:
279  coerceValue(myMixmethod, value);
280  break;
281  case 3:
282  coerceValue(myRange, value);
283  break;
284  case 4:
285  coerceValue(myBlend, value);
286  break;
287  case 5:
288  coerceValue(myExpr, value);
289  break;
290  case 6:
291  coerceValue(myDstpreadd, value);
292  break;
293  case 7:
294  coerceValue(myDstpremul, value);
295  break;
296  case 8:
297  coerceValue(mySrcpreadd, value);
298  break;
299  case 9:
300  coerceValue(mySrcpremul, value);
301  break;
302  case 10:
303  coerceValue(myPostadd, value);
304  break;
305  case 11:
306  coerceValue(myPostmul, value);
307  break;
308  case 12:
309  coerceValue(myDoclampmin, value);
310  break;
311  case 13:
312  coerceValue(myClampmin, value);
313  break;
314  case 14:
315  coerceValue(myDoclampmax, value);
316  break;
317  case 15:
318  coerceValue(myClampmax, value);
319  break;
320  case 16:
321  coerceValue(myExpandvdb, value);
322  break;
323 
324  }
325  }
326 
327  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
348  { doSetParmValue(idx, instance, value); }
349 
350  exint getNestNumParms(TempIndex idx) const override
351  {
352  if (idx.size() == 0)
353  return 17;
354  switch (idx[0])
355  {
356 
357  }
358  // Invalid
359  return 0;
360  }
361 
362  const char *getNestParmName(TempIndex fieldnum) const override
363  {
364  if (fieldnum.size() < 1)
365  return 0;
366  switch (fieldnum[0])
367  {
368  case 0:
369  return "group";
370  case 1:
371  return "mixgrp";
372  case 2:
373  return "mixmethod";
374  case 3:
375  return "range";
376  case 4:
377  return "blend";
378  case 5:
379  return "expr";
380  case 6:
381  return "dstpreadd";
382  case 7:
383  return "dstpremul";
384  case 8:
385  return "srcpreadd";
386  case 9:
387  return "srcpremul";
388  case 10:
389  return "postadd";
390  case 11:
391  return "postmul";
392  case 12:
393  return "doclampmin";
394  case 13:
395  return "clampmin";
396  case 14:
397  return "doclampmax";
398  case 15:
399  return "clampmax";
400  case 16:
401  return "expandvdb";
402 
403  }
404  return 0;
405  }
406 
407  ParmType getNestParmType(TempIndex fieldnum) const override
408  {
409  if (fieldnum.size() < 1)
410  return PARM_UNSUPPORTED;
411  switch (fieldnum[0])
412  {
413  case 0:
414  return PARM_STRING;
415  case 1:
416  return PARM_STRING;
417  case 2:
418  return PARM_INTEGER;
419  case 3:
420  return PARM_VECTOR2;
421  case 4:
422  return PARM_FLOAT;
423  case 5:
424  return PARM_FLOAT;
425  case 6:
426  return PARM_FLOAT;
427  case 7:
428  return PARM_FLOAT;
429  case 8:
430  return PARM_FLOAT;
431  case 9:
432  return PARM_FLOAT;
433  case 10:
434  return PARM_FLOAT;
435  case 11:
436  return PARM_FLOAT;
437  case 12:
438  return PARM_INTEGER;
439  case 13:
440  return PARM_FLOAT;
441  case 14:
442  return PARM_INTEGER;
443  case 15:
444  return PARM_FLOAT;
445  case 16:
446  return PARM_INTEGER;
447 
448  }
449  return PARM_UNSUPPORTED;
450  }
451 
452  // Boiler plate to load individual types.
453  static void loadData(UT_IStream &is, int64 &v)
454  { is.bread(&v, 1); }
455  static void loadData(UT_IStream &is, bool &v)
456  { int64 iv; is.bread(&iv, 1); v = iv; }
457  static void loadData(UT_IStream &is, fpreal64 &v)
458  { is.bread<fpreal64>(&v, 1); }
459  static void loadData(UT_IStream &is, UT_Vector2D &v)
460  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
461  static void loadData(UT_IStream &is, UT_Vector3D &v)
462  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
463  is.bread<fpreal64>(&v.z(), 1); }
464  static void loadData(UT_IStream &is, UT_Vector4D &v)
465  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
466  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
467  static void loadData(UT_IStream &is, UT_Matrix2D &v)
468  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
469  static void loadData(UT_IStream &is, UT_Matrix3D &v)
470  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
471  static void loadData(UT_IStream &is, UT_Matrix4D &v)
472  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
473  static void loadData(UT_IStream &is, UT_Vector2I &v)
474  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
475  static void loadData(UT_IStream &is, UT_Vector3I &v)
476  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
477  is.bread<int64>(&v.z(), 1); }
478  static void loadData(UT_IStream &is, UT_Vector4I &v)
479  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
480  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
482  { is.bread(v); }
484  { UT_StringHolder rampdata;
485  loadData(is, rampdata);
486  if (rampdata.isstring())
487  {
488  v.reset(new UT_Ramp());
489  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
490  v->load(istr);
491  }
492  else v.reset();
493  }
496  loadData(is, data);
497  if (data.isstring())
498  {
499  // Find the data type.
500  const char *colon = UT_StringWrap(data).findChar(':');
501  if (colon)
502  {
503  int typelen = colon - data.buffer();
505  type.strncpy(data.buffer(), typelen);
506  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
507 
508  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
509  }
510  }
511  else v.reset();
512  }
513 
514  static void saveData(std::ostream &os, int64 v)
515  { UTwrite(os, &v); }
516  static void saveData(std::ostream &os, bool v)
517  { int64 iv = v; UTwrite(os, &iv); }
518  static void saveData(std::ostream &os, fpreal64 v)
519  { UTwrite<fpreal64>(os, &v); }
520  static void saveData(std::ostream &os, UT_Vector2D v)
521  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
522  static void saveData(std::ostream &os, UT_Vector3D v)
523  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
524  UTwrite<fpreal64>(os, &v.z()); }
525  static void saveData(std::ostream &os, UT_Vector4D v)
526  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
527  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
528  static void saveData(std::ostream &os, UT_Matrix2D v)
530  static void saveData(std::ostream &os, UT_Matrix3D v)
532  static void saveData(std::ostream &os, UT_Matrix4D v)
534  static void saveData(std::ostream &os, UT_StringHolder s)
535  { UT_StringWrap(s).saveBinary(os); }
536  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
538  UT_OStringStream ostr;
539  if (s) s->save(ostr);
540  result = ostr.str();
541  saveData(os, result);
542  }
543  static void saveData(std::ostream &os, PRM_DataItemHandle s)
545  UT_OStringStream ostr;
546  if (s)
547  {
548  ostr << s->getDataTypeToken();
549  ostr << ":";
550  s->saveBinary(ostr);
551  }
552  result = ostr.str();
553  saveData(os, result);
554  }
555 
556 
557  void save(std::ostream &os) const
558  {
559  int32 v = version();
560  UTwrite(os, &v);
561  saveData(os, myGroup);
562  saveData(os, myMixgrp);
563  saveData(os, myMixmethod);
564  saveData(os, myRange);
565  saveData(os, myBlend);
566  saveData(os, myExpr);
567  saveData(os, myDstpreadd);
568  saveData(os, myDstpremul);
569  saveData(os, mySrcpreadd);
570  saveData(os, mySrcpremul);
571  saveData(os, myPostadd);
572  saveData(os, myPostmul);
573  saveData(os, myDoclampmin);
574  saveData(os, myClampmin);
575  saveData(os, myDoclampmax);
576  saveData(os, myClampmax);
577  saveData(os, myExpandvdb);
578 
579  }
580 
581  bool load(UT_IStream &is)
582  {
583  int32 v;
584  is.bread(&v, 1);
585  if (version() != v)
586  {
587  // Fail incompatible versions
588  return false;
589  }
590  loadData(is, myGroup);
591  loadData(is, myMixgrp);
592  loadData(is, myMixmethod);
593  loadData(is, myRange);
594  loadData(is, myBlend);
595  loadData(is, myExpr);
596  loadData(is, myDstpreadd);
597  loadData(is, myDstpremul);
598  loadData(is, mySrcpreadd);
599  loadData(is, mySrcpremul);
600  loadData(is, myPostadd);
601  loadData(is, myPostmul);
602  loadData(is, myDoclampmin);
603  loadData(is, myClampmin);
604  loadData(is, myDoclampmax);
605  loadData(is, myClampmax);
606  loadData(is, myExpandvdb);
607 
608  return true;
609  }
610 
611  const UT_StringHolder & getGroup() const { return myGroup; }
612  void setGroup(const UT_StringHolder & val) { myGroup = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getGroup();
618  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
619  return result;
620  }
621  const UT_StringHolder & getMixgrp() const { return myMixgrp; }
622  void setMixgrp(const UT_StringHolder & val) { myMixgrp = val; }
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getMixgrp();
628  OP_Utils::evalOpParm(result, thissop, "mixgrp", cookparms.getCookTime(), 0);
629  return result;
630  }
631  Mixmethod getMixmethod() const { return Mixmethod(myMixmethod); }
632  void setMixmethod(Mixmethod val) { myMixmethod = int64(val); }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getMixmethod();
637  int64 result;
638  OP_Utils::evalOpParm(result, thissop, "mixmethod", cookparms.getCookTime(), 0);
639  return Mixmethod(result);
640  }
641  UT_Vector2D getRange() const { return myRange; }
642  void setRange(UT_Vector2D val) { myRange = val; }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getRange();
648  OP_Utils::evalOpParm(result, thissop, "range", cookparms.getCookTime(), 0);
649  return result;
650  }
651  fpreal64 getBlend() const { return myBlend; }
652  void setBlend(fpreal64 val) { myBlend = val; }
653  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getBlend();
658  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
659  return result;
660  }
661  fpreal64 getExpr() const { return myExpr; }
662  void setExpr(fpreal64 val) { myExpr = val; }
663  fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getExpr();
668  OP_Utils::evalOpParm(result, thissop, "expr", cookparms.getCookTime(), 0);
669  return result;
670  }
671  fpreal64 getDstpreadd() const { return myDstpreadd; }
672  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getDstpreadd();
678  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
679  return result;
680  }
681  fpreal64 getDstpremul() const { return myDstpremul; }
682  void setDstpremul(fpreal64 val) { myDstpremul = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getDstpremul();
688  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
689  return result;
690  }
691  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
692  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getSrcpreadd();
698  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
699  return result;
700  }
701  fpreal64 getSrcpremul() const { return mySrcpremul; }
702  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getSrcpremul();
708  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
709  return result;
710  }
711  fpreal64 getPostadd() const { return myPostadd; }
712  void setPostadd(fpreal64 val) { myPostadd = val; }
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getPostadd();
718  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
719  return result;
720  }
721  fpreal64 getPostmul() const { return myPostmul; }
722  void setPostmul(fpreal64 val) { myPostmul = val; }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getPostmul();
728  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
729  return result;
730  }
731  bool getDoclampmin() const { return myDoclampmin; }
732  void setDoclampmin(bool val) { myDoclampmin = val; }
733  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getDoclampmin();
737  bool result;
738  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
739  return result;
740  }
741  fpreal64 getClampmin() const { return myClampmin; }
742  void setClampmin(fpreal64 val) { myClampmin = val; }
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getClampmin();
748  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getDoclampmax() const { return myDoclampmax; }
752  void setDoclampmax(bool val) { myDoclampmax = val; }
753  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getDoclampmax();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
759  return result;
760  }
761  fpreal64 getClampmax() const { return myClampmax; }
762  void setClampmax(fpreal64 val) { myClampmax = val; }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getClampmax();
768  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
769  return result;
770  }
771  bool getExpandvdb() const { return myExpandvdb; }
772  void setExpandvdb(bool val) { myExpandvdb = val; }
773  bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getExpandvdb();
777  bool result;
778  OP_Utils::evalOpParm(result, thissop, "expandvdb", cookparms.getCookTime(), 0);
779  return result;
780  }
781 
782 private:
783  UT_StringHolder myGroup;
784  UT_StringHolder myMixgrp;
785  int64 myMixmethod;
786  UT_Vector2D myRange;
787  fpreal64 myBlend;
788  fpreal64 myExpr;
789  fpreal64 myDstpreadd;
790  fpreal64 myDstpremul;
791  fpreal64 mySrcpreadd;
792  fpreal64 mySrcpremul;
793  fpreal64 myPostadd;
794  fpreal64 myPostmul;
795  bool myDoclampmin;
796  fpreal64 myClampmin;
797  bool myDoclampmax;
798  fpreal64 myClampmax;
799  bool myExpandvdb;
800 
801 };
fpreal64 getDstpremul() const
GLdouble s
Definition: glew.h:1390
static void saveData(std::ostream &os, UT_Matrix3D v)
void setMixgrp(const UT_StringHolder &val)
Mixmethod getMixmethod() const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setRange(UT_Vector2D val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setGroup(const UT_StringHolder &val)
bool load(UT_IStream &is)
Mixmethod opMixmethod(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opClampmax(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool getDoclampmin() const
const char * getNestParmName(TempIndex fieldnum) const override
void setMixmethod(Mixmethod val)
fpreal64 getPostadd() const
exint bread(int32 *buffer, exint asize=1)
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2T< fpreal64 > UT_Vector2D
GLuint const GLfloat * val
Definition: glew.h:2794
const UT_StringHolder & getMixgrp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
~SOP_VolumeMixParms() override
bool operator!=(const SOP_VolumeMixParms &src) const
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
void setSrcpreadd(fpreal64 val)
fpreal64 opClampmin(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setExpandvdb(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
void setSrcpremul(fpreal64 val)
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
fpreal64 getSrcpremul() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setClampmax(fpreal64 val)
void setBlend(fpreal64 val)
void setClampmin(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opRange(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
double fpreal64
Definition: SYS_Types.h:201
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void save(std::ostream &os) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
static void saveData(std::ostream &os, UT_Vector2D v)
exint length() const
bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
fpreal64 getClampmax() const
fpreal64 getClampmin() const
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getBlend() const
const GLfloat * c
Definition: glew.h:16296
long long int64
Definition: SYS_Types.h:116
void setDstpremul(fpreal64 val)
bool operator==(const SOP_VolumeMixParms &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
void setDoclampmax(bool val)
void setPostadd(fpreal64 val)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getDstpreadd() const
bool getDoclampmax() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder opMixgrp(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void copyFrom(const SOP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 getExpr() const
bool getExpandvdb() const
void setDstpreadd(fpreal64 val)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setExpr(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal64 getPostmul() const
#define SOP_API
Definition: SOP_API.h:10
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setDoclampmin(bool val)
static void saveData(std::ostream &os, int64 v)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_Vector2D getRange() const
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 getSrcpreadd() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setPostmul(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528