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_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_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 
42  getToken(Mixmethod enum_value)
43  {
44  using namespace UT::Literal;
45  switch (enum_value) {
46  case Mixmethod::COPY: return "copy"_sh;
47  case Mixmethod::ADD: return "add"_sh;
48  case Mixmethod::SUB: return "sub"_sh;
49  case Mixmethod::DIFF: return "diff"_sh;
50  case Mixmethod::MUL: return "mul"_sh;
51  case Mixmethod::DIV: return "div"_sh;
52  case Mixmethod::INVERT: return "invert"_sh;
53  case Mixmethod::MAX: return "max"_sh;
54  case Mixmethod::MIN: return "min"_sh;
55  case Mixmethod::CLAMP: return "clamp"_sh;
56  case Mixmethod::BLEND: return "blend"_sh;
57  case Mixmethod::USER: return "user"_sh;
58  default: UT_ASSERT(false); return ""_sh;
59  }
60  }
61 
62 }
63 
64 
66 {
67 public:
68  static int version() { return 1; }
69 
71  {
72  myGroup = ""_UTsh;
73  myMixgrp = ""_UTsh;
74  myMixmethod = 0;
75  myRange = UT_Vector2D(0,1);
76  myBlend = 0.5;
77  myExpr = 0;
78  myDstpreadd = 0;
79  myDstpremul = 1;
80  mySrcpreadd = 0;
81  mySrcpremul = 1;
82  myPostadd = 0;
83  myPostmul = 1;
84  myDoclampmin = false;
85  myClampmin = 0;
86  myDoclampmax = false;
87  myClampmax = 1;
88  myExpandvdb = true;
89 
90  }
91 
92  explicit SOP_VolumeMixParms(const SOP_VolumeMixParms &) = default;
94  SOP_VolumeMixParms(SOP_VolumeMixParms &&) noexcept = default;
95  SOP_VolumeMixParms &operator=(SOP_VolumeMixParms &&) noexcept = default;
96 
97  ~SOP_VolumeMixParms() override {}
98 
99  bool operator==(const SOP_VolumeMixParms &src) const
100  {
101  if (myGroup != src.myGroup) return false;
102  if (myMixgrp != src.myMixgrp) return false;
103  if (myMixmethod != src.myMixmethod) return false;
104  if (myRange != src.myRange) return false;
105  if (myBlend != src.myBlend) return false;
106  if (myExpr != src.myExpr) return false;
107  if (myDstpreadd != src.myDstpreadd) return false;
108  if (myDstpremul != src.myDstpremul) return false;
109  if (mySrcpreadd != src.mySrcpreadd) return false;
110  if (mySrcpremul != src.mySrcpremul) return false;
111  if (myPostadd != src.myPostadd) return false;
112  if (myPostmul != src.myPostmul) return false;
113  if (myDoclampmin != src.myDoclampmin) return false;
114  if (myClampmin != src.myClampmin) return false;
115  if (myDoclampmax != src.myDoclampmax) return false;
116  if (myClampmax != src.myClampmax) return false;
117  if (myExpandvdb != src.myExpandvdb) return false;
118 
119 
120  if (baseGetSignature() != src.baseGetSignature()) return false;
121 
122  return true;
123  }
124  bool operator!=(const SOP_VolumeMixParms &src) const
125  {
126  return !operator==(src);
127  }
129 
130 
131 
132  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
133  {
134  myGroup = ""_UTsh;
135  if (true)
136  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
137  myMixgrp = ""_UTsh;
138  if (true)
139  graph->evalOpParm(myMixgrp, nodeidx, "mixgrp", time, graph->isDirect()?nullptr:depnode);
140  myMixmethod = 0;
141  if (true)
142  graph->evalOpParm(myMixmethod, nodeidx, "mixmethod", time, graph->isDirect()?nullptr:depnode);
143  myRange = UT_Vector2D(0,1);
144  if (true && ( (true&&!(((int64(getMixmethod())!=9)))) ) )
145  graph->evalOpParm(myRange, nodeidx, "range", time, graph->isDirect()?nullptr:depnode);
146  myBlend = 0.5;
147  if (true && ( (true&&!(((int64(getMixmethod())!=10)))) ) )
148  graph->evalOpParm(myBlend, nodeidx, "blend", time, graph->isDirect()?nullptr:depnode);
149  myExpr = 0;
150  if (true && ( (true&&!(((int64(getMixmethod())!=11)))) ) )
151  graph->evalOpParm(myExpr, nodeidx, "expr", time, graph->isDirect()?nullptr:depnode);
152  myDstpreadd = 0;
153  if (true)
154  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, graph->isDirect()?nullptr:depnode);
155  myDstpremul = 1;
156  if (true)
157  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, graph->isDirect()?nullptr:depnode);
158  mySrcpreadd = 0;
159  if (true)
160  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, graph->isDirect()?nullptr:depnode);
161  mySrcpremul = 1;
162  if (true)
163  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, graph->isDirect()?nullptr:depnode);
164  myPostadd = 0;
165  if (true)
166  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, graph->isDirect()?nullptr:depnode);
167  myPostmul = 1;
168  if (true)
169  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, graph->isDirect()?nullptr:depnode);
170  myDoclampmin = false;
171  if (true)
172  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, graph->isDirect()?nullptr:depnode);
173  myClampmin = 0;
174  if (true && ( (true&&!(((getDoclampmin()==0)))) ) )
175  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, graph->isDirect()?nullptr:depnode);
176  myDoclampmax = false;
177  if (true)
178  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, graph->isDirect()?nullptr:depnode);
179  myClampmax = 1;
180  if (true && ( (true&&!(((getDoclampmax()==0)))) ) )
181  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, graph->isDirect()?nullptr:depnode);
182  myExpandvdb = true;
183  if (true)
184  graph->evalOpParm(myExpandvdb, nodeidx, "expandvdb", time, graph->isDirect()?nullptr:depnode);
185 
186  }
187 
188 
189  void loadFromOpSubclass(const LoadParms &loadparms) override
190  {
191  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
192  }
193 
194 
195  void copyFrom(const OP_NodeParms *src) override
196  {
197  *this = *((const SOP_VolumeMixParms *)src);
198  }
199 
200  template <typename T>
201  void
202  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
203  {
204  if (idx.size() < 1)
205  return;
206  UT_ASSERT(idx.size() == instance.size()+1);
207  if (idx.size() != instance.size()+1)
208  return;
209  switch (idx[0])
210  {
211  case 0:
212  coerceValue(value, myGroup);
213  break;
214  case 1:
215  coerceValue(value, myMixgrp);
216  break;
217  case 2:
218  coerceValue(value, myMixmethod);
219  break;
220  case 3:
221  coerceValue(value, myRange);
222  break;
223  case 4:
224  coerceValue(value, myBlend);
225  break;
226  case 5:
227  coerceValue(value, myExpr);
228  break;
229  case 6:
230  coerceValue(value, myDstpreadd);
231  break;
232  case 7:
233  coerceValue(value, myDstpremul);
234  break;
235  case 8:
236  coerceValue(value, mySrcpreadd);
237  break;
238  case 9:
239  coerceValue(value, mySrcpremul);
240  break;
241  case 10:
242  coerceValue(value, myPostadd);
243  break;
244  case 11:
245  coerceValue(value, myPostmul);
246  break;
247  case 12:
248  coerceValue(value, myDoclampmin);
249  break;
250  case 13:
251  coerceValue(value, myClampmin);
252  break;
253  case 14:
254  coerceValue(value, myDoclampmax);
255  break;
256  case 15:
257  coerceValue(value, myClampmax);
258  break;
259  case 16:
260  coerceValue(value, myExpandvdb);
261  break;
262 
263  }
264  }
265 
266  bool isParmColorRamp(exint idx) const override
267  {
268  switch (idx)
269  {
270 
271  }
272  return false;
273  }
274 
275  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
296  { doGetParmValue(idx, instance, value); }
297 
298  template <typename T>
299  void
300  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
301  {
302  if (idx.size() < 1)
303  return;
304  UT_ASSERT(idx.size() == instance.size()+1);
305  if (idx.size() != instance.size()+1)
306  return;
307  switch (idx[0])
308  {
309  case 0:
310  coerceValue(myGroup, ( ( value ) ));
311  break;
312  case 1:
313  coerceValue(myMixgrp, ( ( value ) ));
314  break;
315  case 2:
316  coerceValue(myMixmethod, clampMinValue(0, clampMaxValue(11, value ) ));
317  break;
318  case 3:
319  coerceValue(myRange, ( ( value ) ));
320  break;
321  case 4:
322  coerceValue(myBlend, ( ( value ) ));
323  break;
324  case 5:
325  coerceValue(myExpr, ( ( value ) ));
326  break;
327  case 6:
328  coerceValue(myDstpreadd, ( ( value ) ));
329  break;
330  case 7:
331  coerceValue(myDstpremul, ( ( value ) ));
332  break;
333  case 8:
334  coerceValue(mySrcpreadd, ( ( value ) ));
335  break;
336  case 9:
337  coerceValue(mySrcpremul, ( ( value ) ));
338  break;
339  case 10:
340  coerceValue(myPostadd, ( ( value ) ));
341  break;
342  case 11:
343  coerceValue(myPostmul, ( ( value ) ));
344  break;
345  case 12:
346  coerceValue(myDoclampmin, ( ( value ) ));
347  break;
348  case 13:
349  coerceValue(myClampmin, ( ( value ) ));
350  break;
351  case 14:
352  coerceValue(myDoclampmax, ( ( value ) ));
353  break;
354  case 15:
355  coerceValue(myClampmax, ( ( value ) ));
356  break;
357  case 16:
358  coerceValue(myExpandvdb, ( ( value ) ));
359  break;
360 
361  }
362  }
363 
364  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
365  { doSetParmValue(idx, instance, value); }
366  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
367  { doSetParmValue(idx, instance, value); }
368  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
385  { doSetParmValue(idx, instance, value); }
386 
387  exint getNestNumParms(TempIndex idx) const override
388  {
389  if (idx.size() == 0)
390  return 17;
391  switch (idx[0])
392  {
393 
394  }
395  // Invalid
396  return 0;
397  }
398 
399  const char *getNestParmName(TempIndex fieldnum) const override
400  {
401  if (fieldnum.size() < 1)
402  return 0;
403  switch (fieldnum[0])
404  {
405  case 0:
406  return "group";
407  case 1:
408  return "mixgrp";
409  case 2:
410  return "mixmethod";
411  case 3:
412  return "range";
413  case 4:
414  return "blend";
415  case 5:
416  return "expr";
417  case 6:
418  return "dstpreadd";
419  case 7:
420  return "dstpremul";
421  case 8:
422  return "srcpreadd";
423  case 9:
424  return "srcpremul";
425  case 10:
426  return "postadd";
427  case 11:
428  return "postmul";
429  case 12:
430  return "doclampmin";
431  case 13:
432  return "clampmin";
433  case 14:
434  return "doclampmax";
435  case 15:
436  return "clampmax";
437  case 16:
438  return "expandvdb";
439 
440  }
441  return 0;
442  }
443 
444  ParmType getNestParmType(TempIndex fieldnum) const override
445  {
446  if (fieldnum.size() < 1)
447  return PARM_UNSUPPORTED;
448  switch (fieldnum[0])
449  {
450  case 0:
451  return PARM_STRING;
452  case 1:
453  return PARM_STRING;
454  case 2:
455  return PARM_INTEGER;
456  case 3:
457  return PARM_VECTOR2;
458  case 4:
459  return PARM_FLOAT;
460  case 5:
461  return PARM_FLOAT;
462  case 6:
463  return PARM_FLOAT;
464  case 7:
465  return PARM_FLOAT;
466  case 8:
467  return PARM_FLOAT;
468  case 9:
469  return PARM_FLOAT;
470  case 10:
471  return PARM_FLOAT;
472  case 11:
473  return PARM_FLOAT;
474  case 12:
475  return PARM_INTEGER;
476  case 13:
477  return PARM_FLOAT;
478  case 14:
479  return PARM_INTEGER;
480  case 15:
481  return PARM_FLOAT;
482  case 16:
483  return PARM_INTEGER;
484 
485  }
486  return PARM_UNSUPPORTED;
487  }
488 
489  // Boiler plate to load individual types.
490  static void loadData(UT_IStream &is, int64 &v)
491  { is.bread(&v, 1); }
492  static void loadData(UT_IStream &is, bool &v)
493  { int64 iv; is.bread(&iv, 1); v = iv; }
494  static void loadData(UT_IStream &is, fpreal64 &v)
495  { is.bread<fpreal64>(&v, 1); }
496  static void loadData(UT_IStream &is, UT_Vector2D &v)
497  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
498  static void loadData(UT_IStream &is, UT_Vector3D &v)
499  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
500  is.bread<fpreal64>(&v.z(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector4D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
503  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
504  static void loadData(UT_IStream &is, UT_Matrix2D &v)
505  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
506  static void loadData(UT_IStream &is, UT_Matrix3D &v)
507  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
508  static void loadData(UT_IStream &is, UT_Matrix4D &v)
509  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
510  static void loadData(UT_IStream &is, UT_Vector2I &v)
511  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
512  static void loadData(UT_IStream &is, UT_Vector3I &v)
513  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
514  is.bread<int64>(&v.z(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector4I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
517  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
519  { is.bread(v); }
521  { UT_StringHolder rampdata;
522  loadData(is, rampdata);
523  if (rampdata.isstring())
524  {
525  v.reset(new UT_Ramp());
526  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
527  v->load(istr);
528  }
529  else v.reset();
530  }
533  loadData(is, data);
534  if (data.isstring())
535  {
536  // Find the data type.
537  const char *colon = UT_StringWrap(data).findChar(':');
538  if (colon)
539  {
540  int typelen = colon - data.buffer();
542  type.strncpy(data.buffer(), typelen);
543  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
544 
545  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
546  }
547  }
548  else v.reset();
549  }
550 
551  static void saveData(std::ostream &os, int64 v)
552  { UTwrite(os, &v); }
553  static void saveData(std::ostream &os, bool v)
554  { int64 iv = v; UTwrite(os, &iv); }
555  static void saveData(std::ostream &os, fpreal64 v)
556  { UTwrite<fpreal64>(os, &v); }
557  static void saveData(std::ostream &os, UT_Vector2D v)
558  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
559  static void saveData(std::ostream &os, UT_Vector3D v)
560  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
561  UTwrite<fpreal64>(os, &v.z()); }
562  static void saveData(std::ostream &os, UT_Vector4D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
564  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
565  static void saveData(std::ostream &os, UT_Matrix2D v)
567  static void saveData(std::ostream &os, UT_Matrix3D v)
569  static void saveData(std::ostream &os, UT_Matrix4D v)
571  static void saveData(std::ostream &os, UT_StringHolder s)
572  { UT_StringWrap(s).saveBinary(os); }
573  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
575  UT_OStringStream ostr;
576  if (s) s->save(ostr);
577  result = ostr.str();
578  saveData(os, result);
579  }
580  static void saveData(std::ostream &os, PRM_DataItemHandle s)
582  UT_OStringStream ostr;
583  if (s)
584  {
585  ostr << s->getDataTypeToken();
586  ostr << ":";
587  s->saveBinary(ostr);
588  }
589  result = ostr.str();
590  saveData(os, result);
591  }
592 
593 
594  void save(std::ostream &os) const
595  {
596  int32 v = version();
597  UTwrite(os, &v);
598  saveData(os, myGroup);
599  saveData(os, myMixgrp);
600  saveData(os, myMixmethod);
601  saveData(os, myRange);
602  saveData(os, myBlend);
603  saveData(os, myExpr);
604  saveData(os, myDstpreadd);
605  saveData(os, myDstpremul);
606  saveData(os, mySrcpreadd);
607  saveData(os, mySrcpremul);
608  saveData(os, myPostadd);
609  saveData(os, myPostmul);
610  saveData(os, myDoclampmin);
611  saveData(os, myClampmin);
612  saveData(os, myDoclampmax);
613  saveData(os, myClampmax);
614  saveData(os, myExpandvdb);
615 
616  }
617 
618  bool load(UT_IStream &is)
619  {
620  int32 v;
621  is.bread(&v, 1);
622  if (version() != v)
623  {
624  // Fail incompatible versions
625  return false;
626  }
627  loadData(is, myGroup);
628  loadData(is, myMixgrp);
629  loadData(is, myMixmethod);
630  loadData(is, myRange);
631  loadData(is, myBlend);
632  loadData(is, myExpr);
633  loadData(is, myDstpreadd);
634  loadData(is, myDstpremul);
635  loadData(is, mySrcpreadd);
636  loadData(is, mySrcpremul);
637  loadData(is, myPostadd);
638  loadData(is, myPostmul);
639  loadData(is, myDoclampmin);
640  loadData(is, myClampmin);
641  loadData(is, myDoclampmax);
642  loadData(is, myClampmax);
643  loadData(is, myExpandvdb);
644 
645  return true;
646  }
647 
648  const UT_StringHolder & getGroup() const { return myGroup; }
649  void setGroup(const UT_StringHolder & val) { myGroup = val; }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getGroup();
655  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
656  return result;
657  }
658  const UT_StringHolder & getMixgrp() const { return myMixgrp; }
659  void setMixgrp(const UT_StringHolder & val) { myMixgrp = val; }
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getMixgrp();
665  OP_Utils::evalOpParm(result, thissop, "mixgrp", cookparms.getCookTime(), 0);
666  return result;
667  }
668  Mixmethod getMixmethod() const { return Mixmethod(myMixmethod); }
669  void setMixmethod(Mixmethod val) { myMixmethod = int64(val); }
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getMixmethod();
674  int64 result;
675  OP_Utils::evalOpParm(result, thissop, "mixmethod", cookparms.getCookTime(), 0);
676  return Mixmethod(result);
677  }
678  UT_Vector2D getRange() const { return myRange; }
679  void setRange(UT_Vector2D val) { myRange = val; }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getRange();
685  OP_Utils::evalOpParm(result, thissop, "range", cookparms.getCookTime(), 0);
686  return result;
687  }
688  fpreal64 getBlend() const { return myBlend; }
689  void setBlend(fpreal64 val) { myBlend = val; }
690  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getBlend();
695  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
696  return result;
697  }
698  fpreal64 getExpr() const { return myExpr; }
699  void setExpr(fpreal64 val) { myExpr = val; }
700  fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getExpr();
705  OP_Utils::evalOpParm(result, thissop, "expr", cookparms.getCookTime(), 0);
706  return result;
707  }
708  fpreal64 getDstpreadd() const { return myDstpreadd; }
709  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getDstpreadd();
715  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
716  return result;
717  }
718  fpreal64 getDstpremul() const { return myDstpremul; }
719  void setDstpremul(fpreal64 val) { myDstpremul = val; }
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getDstpremul();
725  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
726  return result;
727  }
728  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
729  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getSrcpreadd();
735  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
736  return result;
737  }
738  fpreal64 getSrcpremul() const { return mySrcpremul; }
739  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
741  {
742  SOP_Node *thissop = cookparms.getNode();
743  if (!thissop) return getSrcpremul();
745  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
746  return result;
747  }
748  fpreal64 getPostadd() const { return myPostadd; }
749  void setPostadd(fpreal64 val) { myPostadd = val; }
751  {
752  SOP_Node *thissop = cookparms.getNode();
753  if (!thissop) return getPostadd();
755  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
756  return result;
757  }
758  fpreal64 getPostmul() const { return myPostmul; }
759  void setPostmul(fpreal64 val) { myPostmul = val; }
761  {
762  SOP_Node *thissop = cookparms.getNode();
763  if (!thissop) return getPostmul();
765  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
766  return result;
767  }
768  bool getDoclampmin() const { return myDoclampmin; }
769  void setDoclampmin(bool val) { myDoclampmin = val; }
770  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
771  {
772  SOP_Node *thissop = cookparms.getNode();
773  if (!thissop) return getDoclampmin();
774  bool result;
775  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
776  return result;
777  }
778  fpreal64 getClampmin() const { return myClampmin; }
779  void setClampmin(fpreal64 val) { myClampmin = val; }
781  {
782  SOP_Node *thissop = cookparms.getNode();
783  if (!thissop) return getClampmin();
785  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
786  return result;
787  }
788  bool getDoclampmax() const { return myDoclampmax; }
789  void setDoclampmax(bool val) { myDoclampmax = val; }
790  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
791  {
792  SOP_Node *thissop = cookparms.getNode();
793  if (!thissop) return getDoclampmax();
794  bool result;
795  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
796  return result;
797  }
798  fpreal64 getClampmax() const { return myClampmax; }
799  void setClampmax(fpreal64 val) { myClampmax = val; }
801  {
802  SOP_Node *thissop = cookparms.getNode();
803  if (!thissop) return getClampmax();
805  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
806  return result;
807  }
808  bool getExpandvdb() const { return myExpandvdb; }
809  void setExpandvdb(bool val) { myExpandvdb = val; }
810  bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
811  {
812  SOP_Node *thissop = cookparms.getNode();
813  if (!thissop) return getExpandvdb();
814  bool result;
815  OP_Utils::evalOpParm(result, thissop, "expandvdb", cookparms.getCookTime(), 0);
816  return result;
817  }
818 
819 private:
820  UT_StringHolder myGroup;
821  UT_StringHolder myMixgrp;
822  int64 myMixmethod;
823  UT_Vector2D myRange;
824  fpreal64 myBlend;
825  fpreal64 myExpr;
826  fpreal64 myDstpreadd;
827  fpreal64 myDstpremul;
828  fpreal64 mySrcpreadd;
829  fpreal64 mySrcpremul;
830  fpreal64 myPostadd;
831  fpreal64 myPostmul;
832  bool myDoclampmin;
833  fpreal64 myClampmin;
834  bool myDoclampmax;
835  fpreal64 myClampmax;
836  bool myExpandvdb;
837 
838 };
fpreal64 getDstpremul() const
type
Definition: core.h:556
static void saveData(std::ostream &os, UT_Matrix3D v)
void setMixgrp(const UT_StringHolder &val)
Mixmethod getMixmethod() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
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)
GLboolean * data
Definition: glcorearb.h:131
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
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
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool operator!=(const SOP_VolumeMixParms &src) const
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
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
**But if you need a result
Definition: thread.h:622
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
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.
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)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
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
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 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)
static void saveData(std::ostream &os, UT_Vector2D v)
bool isParmColorRamp(exint idx) const override
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:36
void copyFrom(const OP_NodeParms *src) override
fpreal64 getClampmax() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
fpreal64 getClampmin() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getBlend() const
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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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:303
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
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 buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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 getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
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
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
fpreal64 getExpr() const
bool getExpandvdb() const
void setDstpreadd(fpreal64 val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
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
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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
void setDoclampmin(bool val)
SYS_FORCE_INLINE UT_StringHolder getToken(Mixmethod enum_value)
static void saveData(std::ostream &os, int64 v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
GLboolean r
Definition: glcorearb.h:1222
fpreal64 getSrcpreadd() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setPostmul(fpreal64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
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)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663