HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeCombine.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_VolumeCombineEnums
24 {
25  enum class Combine
26  {
27  COPY = 0,
28  ADD,
29  SUB,
30  MUL,
31  DIV,
32  MAX,
33  MIN
34  };
35 
37  getToken(Combine enum_value)
38  {
39  using namespace UT::Literal;
40  switch (enum_value) {
41  case Combine::COPY: return "copy"_sh;
42  case Combine::ADD: return "add"_sh;
43  case Combine::SUB: return "sub"_sh;
44  case Combine::MUL: return "mul"_sh;
45  case Combine::DIV: return "div"_sh;
46  case Combine::MAX: return "max"_sh;
47  case Combine::MIN: return "min"_sh;
48  default: UT_ASSERT(false); return ""_sh;
49  }
50  }
51 
52  enum class Adjust
53  {
54  NONE = 0,
55  SCALE,
56  SCALEADD,
58  };
59 
61  getToken(Adjust enum_value)
62  {
63  using namespace UT::Literal;
64  switch (enum_value) {
65  case Adjust::NONE: return "none"_sh;
66  case Adjust::SCALE: return "scale"_sh;
67  case Adjust::SCALEADD: return "scaleadd"_sh;
68  case Adjust::SCALEADDPROCESS: return "scaleaddprocess"_sh;
69  default: UT_ASSERT(false); return ""_sh;
70  }
71  }
72 
73  enum class Process
74  {
75  NONE = 0,
76  RECIPROCAL,
77  CLAMP01,
80  };
81 
83  getToken(Process enum_value)
84  {
85  using namespace UT::Literal;
86  switch (enum_value) {
87  case Process::NONE: return "none"_sh;
88  case Process::RECIPROCAL: return "reciprocal"_sh;
89  case Process::CLAMP01: return "clamp01"_sh;
90  case Process::COMPLEMENT01: return "complement01"_sh;
91  case Process::THRESHOLD05: return "threshold05"_sh;
92  default: UT_ASSERT(false); return ""_sh;
93  }
94  }
95 
96  enum class Doblendvolume
97  {
98  OFF = 0,
99  ON
100  };
101 
103  getToken(Doblendvolume enum_value)
104  {
105  using namespace UT::Literal;
106  switch (enum_value) {
107  case Doblendvolume::OFF: return "off"_sh;
108  case Doblendvolume::ON: return "on"_sh;
109  default: UT_ASSERT(false); return ""_sh;
110  }
111  }
112 
113 }
114 
115 
117 {
118 public:
119  static int version() { return 1; }
121  {
122  bool enable;
132 
133 
135  {
136  enable = true;
137  combine = 1;
138  adjust = 0;
139  srcvolume = ""_UTsh;
140  scale = 1;
141  add = 0;
142  process = 0;
143  blend = 1;
144  doblendvolume = 0;
145  blendvolume = ""_UTsh;
146 
147  }
148 
149  bool operator==(const Combinations &src) const
150  {
151  if (enable != src.enable) return false;
152  if (combine != src.combine) return false;
153  if (adjust != src.adjust) return false;
154  if (srcvolume != src.srcvolume) return false;
155  if (scale != src.scale) return false;
156  if (add != src.add) return false;
157  if (process != src.process) return false;
158  if (blend != src.blend) return false;
159  if (doblendvolume != src.doblendvolume) return false;
160  if (blendvolume != src.blendvolume) return false;
161 
162  return true;
163  }
164  bool operator!=(const Combinations &src) const
165  {
166  return !operator==(src);
167  }
168 
169  };
170 
172  {
174 
175  buf.strcat("[ ");
176  for (int i = 0; i < list.entries(); i++)
177  {
178  if (i)
179  buf.strcat(", ");
180  buf.strcat("( ");
181  buf.append("");
182  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
183  buf.append(", ");
184  buf.appendSprintf("%d", (int) list(i).combine);
185  buf.append(", ");
186  buf.appendSprintf("%d", (int) list(i).adjust);
187  buf.append(", ");
188  { UT_String tmp; tmp = UT_StringWrap(list(i).srcvolume).makeQuotedString('"'); buf.strcat(tmp); }
189  buf.append(", ");
190  buf.appendSprintf("%f", (list(i).scale));
191  buf.append(", ");
192  buf.appendSprintf("%f", (list(i).add));
193  buf.append(", ");
194  buf.appendSprintf("%d", (int) list(i).process);
195  buf.append(", ");
196  buf.appendSprintf("%f", (list(i).blend));
197  buf.append(", ");
198  buf.appendSprintf("%d", (int) list(i).doblendvolume);
199  buf.append(", ");
200  { UT_String tmp; tmp = UT_StringWrap(list(i).blendvolume).makeQuotedString('"'); buf.strcat(tmp); }
201 
202  buf.strcat(" )");
203  }
204  buf.strcat(" ]");
205 
207  return result;
208  }
209 
211  {
212  myDstVolume = ""_UTsh;
213  myCombinations.setSize(1);
214  myPostScale = 1;
215  myDoThreshold = false;
216  myThreshold = 0.5;
217  myDoClampMin = false;
218  myClampMin = 0;
219  myDoClampMax = false;
220  myClampMax = 1;
221  myCreateMissing = true;
222  myForceScalar = false;
223  myDeleteSource = false;
224  myErrorMissing = true;
225 
226  }
227 
228  explicit SOP_VolumeCombineParms(const SOP_VolumeCombineParms &) = default;
230  SOP_VolumeCombineParms(SOP_VolumeCombineParms &&) noexcept = default;
231  SOP_VolumeCombineParms &operator=(SOP_VolumeCombineParms &&) noexcept = default;
232 
233  ~SOP_VolumeCombineParms() override {}
234 
236  {
237  if (myDstVolume != src.myDstVolume) return false;
238  if (myCombinations != src.myCombinations) return false;
239  if (myPostScale != src.myPostScale) return false;
240  if (myDoThreshold != src.myDoThreshold) return false;
241  if (myThreshold != src.myThreshold) return false;
242  if (myDoClampMin != src.myDoClampMin) return false;
243  if (myClampMin != src.myClampMin) return false;
244  if (myDoClampMax != src.myDoClampMax) return false;
245  if (myClampMax != src.myClampMax) return false;
246  if (myCreateMissing != src.myCreateMissing) return false;
247  if (myForceScalar != src.myForceScalar) return false;
248  if (myDeleteSource != src.myDeleteSource) return false;
249  if (myErrorMissing != src.myErrorMissing) return false;
250 
251  return true;
252  }
254  {
255  return !operator==(src);
256  }
261 
262 
263 
264  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
265  {
266  myDstVolume = ""_UTsh;
267  if (true)
268  graph->evalOpParm(myDstVolume, nodeidx, "dstvolume", time, 0);
269  if (true)
270  {
271  int64 length = 0;
272  graph->evalOpParm(length, nodeidx, "numcombines", time, 0);
273  if (length < 0) length = 0;
274  myCombinations.setSize(length);
275  for (exint i = 0; i < length; i++)
276  {
277  int parmidx[1];
278  int offsets[1];
279  parmidx[0] = i+1;
280  offsets[0] = 1;
281  auto && _curentry = myCombinations(i);
282  (void) _curentry;
283  _curentry.enable = true;
284  if (true)
285  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
286  _curentry.combine = 1;
287  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
288  graph->evalOpParmInst(_curentry.combine, nodeidx, "combine#", parmidx, offsets, time, 0, 2-1);
289  _curentry.adjust = 0;
290  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
291  graph->evalOpParmInst(_curentry.adjust, nodeidx, "adjust#", parmidx, offsets, time, 0, 2-1);
292  _curentry.srcvolume = ""_UTsh;
293  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
294  graph->evalOpParmInst(_curentry.srcvolume, nodeidx, "srcvolume#", parmidx, offsets, time, 0, 2-1);
295  _curentry.scale = 1;
296  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0)))) ) )
297  graph->evalOpParmInst(_curentry.scale, nodeidx, "scale#", parmidx, offsets, time, 0, 2-1);
298  _curentry.add = 0;
299  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0))||((_curentry.adjust==1)))) ) )
300  graph->evalOpParmInst(_curentry.add, nodeidx, "add#", parmidx, offsets, time, 0, 2-1);
301  _curentry.process = 0;
302  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0))||((_curentry.adjust==1))||((_curentry.adjust==2)))) ) )
303  graph->evalOpParmInst(_curentry.process, nodeidx, "process#", parmidx, offsets, time, 0, 2-1);
304  _curentry.blend = 1;
305  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
306  graph->evalOpParmInst(_curentry.blend, nodeidx, "blend#", parmidx, offsets, time, 0, 2-1);
307  _curentry.doblendvolume = 0;
308  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
309  graph->evalOpParmInst(_curentry.doblendvolume, nodeidx, "doblendvolume#", parmidx, offsets, time, 0, 2-1);
310  _curentry.blendvolume = ""_UTsh;
311  if (true && ( (true&&!(((_curentry.doblendvolume==0))||((_curentry.enable==0)))) ) )
312  graph->evalOpParmInst(_curentry.blendvolume, nodeidx, "blendvolume#", parmidx, offsets, time, 0, 2-1);
313 
314  }
315  }
316  else
317  myCombinations.clear();
318  myPostScale = 1;
319  if (true)
320  graph->evalOpParm(myPostScale, nodeidx, "postscale", time, 0);
321  myDoThreshold = false;
322  if (true)
323  graph->evalOpParm(myDoThreshold, nodeidx, "dothreshold", time, 0);
324  myThreshold = 0.5;
325  if (true && ( (true&&!(((getDoThreshold()==0)))) ) )
326  graph->evalOpParm(myThreshold, nodeidx, "threshold", time, 0);
327  myDoClampMin = false;
328  if (true)
329  graph->evalOpParm(myDoClampMin, nodeidx, "doclampmin", time, 0);
330  myClampMin = 0;
331  if (true && ( (true&&!(((getDoClampMin()==0)&&(getDoThreshold()==0)))) ) )
332  graph->evalOpParm(myClampMin, nodeidx, "clampmin", time, 0);
333  myDoClampMax = false;
334  if (true)
335  graph->evalOpParm(myDoClampMax, nodeidx, "doclampmax", time, 0);
336  myClampMax = 1;
337  if (true && ( (true&&!(((getDoClampMax()==0)&&(getDoThreshold()==0)))) ) )
338  graph->evalOpParm(myClampMax, nodeidx, "clampmax", time, 0);
339  myCreateMissing = true;
340  if (true)
341  graph->evalOpParm(myCreateMissing, nodeidx, "createmissing", time, 0);
342  myForceScalar = false;
343  if (true && ( (true&&!(((getCreateMissing()==0)))) ) )
344  graph->evalOpParm(myForceScalar, nodeidx, "forcescalar", time, 0);
345  myDeleteSource = false;
346  if (true)
347  graph->evalOpParm(myDeleteSource, nodeidx, "deletesource", time, 0);
348  myErrorMissing = true;
349  if (true)
350  graph->evalOpParm(myErrorMissing, nodeidx, "errormissing", time, 0);
351 
352  }
353 
354 
355  void loadFromOpSubclass(const LoadParms &loadparms) override
356  {
357  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
358  }
359 
360 
361  void copyFrom(const OP_NodeParms *src) override
362  {
363  *this = *((const SOP_VolumeCombineParms *)src);
364  }
365 
366  template <typename T>
367  void
368  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
369  {
370  if (idx.size() < 1)
371  return;
372  UT_ASSERT(idx.size() == instance.size()+1);
373  if (idx.size() != instance.size()+1)
374  return;
375  switch (idx[0])
376  {
377  case 0:
378  coerceValue(value, myDstVolume);
379  break;
380  case 1:
381  if (idx.size() == 1)
382  coerceValue(value, myCombinations.entries());
383  else if (instance[0] < myCombinations.entries())
384  {
385  auto && _data = myCombinations(instance[0]);
386  switch (idx[1])
387  {
388  case 0:
389  coerceValue(value, _data.enable);
390  break;
391  case 1:
392  coerceValue(value, _data.combine);
393  break;
394  case 2:
395  coerceValue(value, _data.adjust);
396  break;
397  case 3:
398  coerceValue(value, _data.srcvolume);
399  break;
400  case 4:
401  coerceValue(value, _data.scale);
402  break;
403  case 5:
404  coerceValue(value, _data.add);
405  break;
406  case 6:
407  coerceValue(value, _data.process);
408  break;
409  case 7:
410  coerceValue(value, _data.blend);
411  break;
412  case 8:
413  coerceValue(value, _data.doblendvolume);
414  break;
415  case 9:
416  coerceValue(value, _data.blendvolume);
417  break;
418 
419  }
420  }
421  break;
422  case 2:
423  coerceValue(value, myPostScale);
424  break;
425  case 3:
426  coerceValue(value, myDoThreshold);
427  break;
428  case 4:
429  coerceValue(value, myThreshold);
430  break;
431  case 5:
432  coerceValue(value, myDoClampMin);
433  break;
434  case 6:
435  coerceValue(value, myClampMin);
436  break;
437  case 7:
438  coerceValue(value, myDoClampMax);
439  break;
440  case 8:
441  coerceValue(value, myClampMax);
442  break;
443  case 9:
444  coerceValue(value, myCreateMissing);
445  break;
446  case 10:
447  coerceValue(value, myForceScalar);
448  break;
449  case 11:
450  coerceValue(value, myDeleteSource);
451  break;
452  case 12:
453  coerceValue(value, myErrorMissing);
454  break;
455 
456  }
457  }
458 
459  bool isParmColorRamp(exint idx) const override
460  {
461  switch (idx)
462  {
463 
464  }
465  return false;
466  }
467 
468  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
469  { doGetParmValue(idx, instance, value); }
470  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
471  { doGetParmValue(idx, instance, value); }
472  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
473  { doGetParmValue(idx, instance, value); }
474  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
475  { doGetParmValue(idx, instance, value); }
476  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
477  { doGetParmValue(idx, instance, value); }
478  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
479  { doGetParmValue(idx, instance, value); }
480  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
481  { doGetParmValue(idx, instance, value); }
482  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
483  { doGetParmValue(idx, instance, value); }
484  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
485  { doGetParmValue(idx, instance, value); }
486  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
487  { doGetParmValue(idx, instance, value); }
488  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
489  { doGetParmValue(idx, instance, value); }
490 
491  template <typename T>
492  void
493  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
494  {
495  if (idx.size() < 1)
496  return;
497  UT_ASSERT(idx.size() == instance.size()+1);
498  if (idx.size() != instance.size()+1)
499  return;
500  switch (idx[0])
501  {
502  case 0:
503  coerceValue(myDstVolume, ( ( value ) ));
504  break;
505  case 1:
506  if (idx.size() == 1)
507  {
508  exint newsize;
509  coerceValue(newsize, value);
510  if (newsize < 0) newsize = 0;
511  myCombinations.setSize(newsize);
512  }
513  else
514  {
515  if (instance[0] < 0)
516  return;
517  myCombinations.setSizeIfNeeded(instance[0]+1);
518  auto && _data = myCombinations(instance[0]);
519  switch (idx[1])
520  {
521  case 0:
522  coerceValue(_data.enable, value);
523  break;
524  case 1:
525  coerceValue(_data.combine, value);
526  break;
527  case 2:
528  coerceValue(_data.adjust, value);
529  break;
530  case 3:
531  coerceValue(_data.srcvolume, value);
532  break;
533  case 4:
534  coerceValue(_data.scale, value);
535  break;
536  case 5:
537  coerceValue(_data.add, value);
538  break;
539  case 6:
540  coerceValue(_data.process, value);
541  break;
542  case 7:
543  coerceValue(_data.blend, value);
544  break;
545  case 8:
546  coerceValue(_data.doblendvolume, value);
547  break;
548  case 9:
549  coerceValue(_data.blendvolume, value);
550  break;
551 
552  }
553  }
554  break;
555  case 2:
556  coerceValue(myPostScale, ( ( value ) ));
557  break;
558  case 3:
559  coerceValue(myDoThreshold, ( ( value ) ));
560  break;
561  case 4:
562  coerceValue(myThreshold, ( ( value ) ));
563  break;
564  case 5:
565  coerceValue(myDoClampMin, ( ( value ) ));
566  break;
567  case 6:
568  coerceValue(myClampMin, ( ( value ) ));
569  break;
570  case 7:
571  coerceValue(myDoClampMax, ( ( value ) ));
572  break;
573  case 8:
574  coerceValue(myClampMax, ( ( value ) ));
575  break;
576  case 9:
577  coerceValue(myCreateMissing, ( ( value ) ));
578  break;
579  case 10:
580  coerceValue(myForceScalar, ( ( value ) ));
581  break;
582  case 11:
583  coerceValue(myDeleteSource, ( ( value ) ));
584  break;
585  case 12:
586  coerceValue(myErrorMissing, ( ( value ) ));
587  break;
588 
589  }
590  }
591 
592  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
593  { doSetParmValue(idx, instance, value); }
594  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
595  { doSetParmValue(idx, instance, value); }
596  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
597  { doSetParmValue(idx, instance, value); }
598  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
599  { doSetParmValue(idx, instance, value); }
600  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
601  { doSetParmValue(idx, instance, value); }
602  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
603  { doSetParmValue(idx, instance, value); }
604  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
605  { doSetParmValue(idx, instance, value); }
606  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
607  { doSetParmValue(idx, instance, value); }
608  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
609  { doSetParmValue(idx, instance, value); }
610  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
611  { doSetParmValue(idx, instance, value); }
612  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
613  { doSetParmValue(idx, instance, value); }
614 
615  exint getNestNumParms(TempIndex idx) const override
616  {
617  if (idx.size() == 0)
618  return 13;
619  switch (idx[0])
620  {
621  case 1:
622  return 10;
623 
624  }
625  // Invalid
626  return 0;
627  }
628 
629  const char *getNestParmName(TempIndex fieldnum) const override
630  {
631  if (fieldnum.size() < 1)
632  return 0;
633  switch (fieldnum[0])
634  {
635  case 0:
636  return "dstvolume";
637  case 1:
638  if (fieldnum.size() == 1)
639  return "numcombines";
640  switch (fieldnum[1])
641  {
642  case 0:
643  return "enable#";
644  case 1:
645  return "combine#";
646  case 2:
647  return "adjust#";
648  case 3:
649  return "srcvolume#";
650  case 4:
651  return "scale#";
652  case 5:
653  return "add#";
654  case 6:
655  return "process#";
656  case 7:
657  return "blend#";
658  case 8:
659  return "doblendvolume#";
660  case 9:
661  return "blendvolume#";
662 
663  }
664  return 0;
665  case 2:
666  return "postscale";
667  case 3:
668  return "dothreshold";
669  case 4:
670  return "threshold";
671  case 5:
672  return "doclampmin";
673  case 6:
674  return "clampmin";
675  case 7:
676  return "doclampmax";
677  case 8:
678  return "clampmax";
679  case 9:
680  return "createmissing";
681  case 10:
682  return "forcescalar";
683  case 11:
684  return "deletesource";
685  case 12:
686  return "errormissing";
687 
688  }
689  return 0;
690  }
691 
692  ParmType getNestParmType(TempIndex fieldnum) const override
693  {
694  if (fieldnum.size() < 1)
695  return PARM_UNSUPPORTED;
696  switch (fieldnum[0])
697  {
698  case 0:
699  return PARM_STRING;
700  case 1:
701  if (fieldnum.size() == 1)
702  return PARM_MULTIPARM;
703  switch (fieldnum[1])
704  {
705  case 0:
706  return PARM_INTEGER;
707  case 1:
708  return PARM_INTEGER;
709  case 2:
710  return PARM_INTEGER;
711  case 3:
712  return PARM_STRING;
713  case 4:
714  return PARM_FLOAT;
715  case 5:
716  return PARM_FLOAT;
717  case 6:
718  return PARM_INTEGER;
719  case 7:
720  return PARM_FLOAT;
721  case 8:
722  return PARM_INTEGER;
723  case 9:
724  return PARM_STRING;
725 
726  }
727  return PARM_UNSUPPORTED;
728  case 2:
729  return PARM_FLOAT;
730  case 3:
731  return PARM_INTEGER;
732  case 4:
733  return PARM_FLOAT;
734  case 5:
735  return PARM_INTEGER;
736  case 6:
737  return PARM_FLOAT;
738  case 7:
739  return PARM_INTEGER;
740  case 8:
741  return PARM_FLOAT;
742  case 9:
743  return PARM_INTEGER;
744  case 10:
745  return PARM_INTEGER;
746  case 11:
747  return PARM_INTEGER;
748  case 12:
749  return PARM_INTEGER;
750 
751  }
752  return PARM_UNSUPPORTED;
753  }
754 
755  // Boiler plate to load individual types.
756  static void loadData(UT_IStream &is, int64 &v)
757  { is.bread(&v, 1); }
758  static void loadData(UT_IStream &is, bool &v)
759  { int64 iv; is.bread(&iv, 1); v = iv; }
760  static void loadData(UT_IStream &is, fpreal64 &v)
761  { is.bread<fpreal64>(&v, 1); }
762  static void loadData(UT_IStream &is, UT_Vector2D &v)
763  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
764  static void loadData(UT_IStream &is, UT_Vector3D &v)
765  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
766  is.bread<fpreal64>(&v.z(), 1); }
767  static void loadData(UT_IStream &is, UT_Vector4D &v)
768  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
769  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
770  static void loadData(UT_IStream &is, UT_Matrix2D &v)
771  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
772  static void loadData(UT_IStream &is, UT_Matrix3D &v)
773  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
774  static void loadData(UT_IStream &is, UT_Matrix4D &v)
775  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
776  static void loadData(UT_IStream &is, UT_Vector2I &v)
777  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
778  static void loadData(UT_IStream &is, UT_Vector3I &v)
779  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
780  is.bread<int64>(&v.z(), 1); }
781  static void loadData(UT_IStream &is, UT_Vector4I &v)
782  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
783  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
785  { is.bread(v); }
787  { UT_StringHolder rampdata;
788  loadData(is, rampdata);
789  if (rampdata.isstring())
790  {
791  v.reset(new UT_Ramp());
792  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
793  v->load(istr);
794  }
795  else v.reset();
796  }
799  loadData(is, data);
800  if (data.isstring())
801  {
802  // Find the data type.
803  const char *colon = UT_StringWrap(data).findChar(':');
804  if (colon)
805  {
806  int typelen = colon - data.buffer();
808  type.strncpy(data.buffer(), typelen);
809  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
810 
811  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
812  }
813  }
814  else v.reset();
815  }
816 
817  static void saveData(std::ostream &os, int64 v)
818  { UTwrite(os, &v); }
819  static void saveData(std::ostream &os, bool v)
820  { int64 iv = v; UTwrite(os, &iv); }
821  static void saveData(std::ostream &os, fpreal64 v)
822  { UTwrite<fpreal64>(os, &v); }
823  static void saveData(std::ostream &os, UT_Vector2D v)
824  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
825  static void saveData(std::ostream &os, UT_Vector3D v)
826  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
827  UTwrite<fpreal64>(os, &v.z()); }
828  static void saveData(std::ostream &os, UT_Vector4D v)
829  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
830  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
831  static void saveData(std::ostream &os, UT_Matrix2D v)
833  static void saveData(std::ostream &os, UT_Matrix3D v)
835  static void saveData(std::ostream &os, UT_Matrix4D v)
837  static void saveData(std::ostream &os, UT_StringHolder s)
838  { UT_StringWrap(s).saveBinary(os); }
839  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
841  UT_OStringStream ostr;
842  if (s) s->save(ostr);
843  result = ostr.str();
844  saveData(os, result);
845  }
846  static void saveData(std::ostream &os, PRM_DataItemHandle s)
848  UT_OStringStream ostr;
849  if (s)
850  {
851  ostr << s->getDataTypeToken();
852  ostr << ":";
853  s->saveBinary(ostr);
854  }
855  result = ostr.str();
856  saveData(os, result);
857  }
858 
859 
860  void save(std::ostream &os) const
861  {
862  int32 v = version();
863  UTwrite(os, &v);
864  saveData(os, myDstVolume);
865  {
866  int64 length = myCombinations.entries();
867  UTwrite(os, &length);
868  for (exint i = 0; i < length; i++)
869  {
870  auto && _curentry = myCombinations(i);
871  (void) _curentry;
872  saveData(os, _curentry.enable);
873  saveData(os, _curentry.combine);
874  saveData(os, _curentry.adjust);
875  saveData(os, _curentry.srcvolume);
876  saveData(os, _curentry.scale);
877  saveData(os, _curentry.add);
878  saveData(os, _curentry.process);
879  saveData(os, _curentry.blend);
880  saveData(os, _curentry.doblendvolume);
881  saveData(os, _curentry.blendvolume);
882 
883  }
884  }
885  saveData(os, myPostScale);
886  saveData(os, myDoThreshold);
887  saveData(os, myThreshold);
888  saveData(os, myDoClampMin);
889  saveData(os, myClampMin);
890  saveData(os, myDoClampMax);
891  saveData(os, myClampMax);
892  saveData(os, myCreateMissing);
893  saveData(os, myForceScalar);
894  saveData(os, myDeleteSource);
895  saveData(os, myErrorMissing);
896 
897  }
898 
899  bool load(UT_IStream &is)
900  {
901  int32 v;
902  is.bread(&v, 1);
903  if (version() != v)
904  {
905  // Fail incompatible versions
906  return false;
907  }
908  loadData(is, myDstVolume);
909  {
910  int64 length;
911  is.read(&length, 1);
912  myCombinations.setSize(length);
913  for (exint i = 0; i < length; i++)
914  {
915  auto && _curentry = myCombinations(i);
916  (void) _curentry;
917  loadData(is, _curentry.enable);
918  loadData(is, _curentry.combine);
919  loadData(is, _curentry.adjust);
920  loadData(is, _curentry.srcvolume);
921  loadData(is, _curentry.scale);
922  loadData(is, _curentry.add);
923  loadData(is, _curentry.process);
924  loadData(is, _curentry.blend);
925  loadData(is, _curentry.doblendvolume);
926  loadData(is, _curentry.blendvolume);
927 
928  }
929  }
930  loadData(is, myPostScale);
931  loadData(is, myDoThreshold);
932  loadData(is, myThreshold);
933  loadData(is, myDoClampMin);
934  loadData(is, myClampMin);
935  loadData(is, myDoClampMax);
936  loadData(is, myClampMax);
937  loadData(is, myCreateMissing);
938  loadData(is, myForceScalar);
939  loadData(is, myDeleteSource);
940  loadData(is, myErrorMissing);
941 
942  return true;
943  }
944 
945  const UT_StringHolder & getDstVolume() const { return myDstVolume; }
946  void setDstVolume(const UT_StringHolder & val) { myDstVolume = val; }
948  {
949  SOP_Node *thissop = cookparms.getNode();
950  if (!thissop) return getDstVolume();
952  OP_Utils::evalOpParm(result, thissop, "dstvolume", cookparms.getCookTime(), 0);
953  return result;
954  }
955  const UT_Array<Combinations> &getCombinations() const { return myCombinations; }
956 void setCombinations(const UT_Array<Combinations> &val) { myCombinations = val; }
958  {
959  SOP_Node *thissop = cookparms.getNode();
960  if (!thissop) return getCombinations().entries();
961  exint result;
962  OP_Utils::evalOpParm(result, thissop, "numcombines", cookparms.getCookTime(), 0);
963  return result;
964  }
965  bool opCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
966  { return opinstCombinations_enable(cookparms, &_idx); }
967  bool opinstCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
968  {
969  SOP_Node *thissop = cookparms.getNode();
970  if (!thissop) return (myCombinations(_idx[0]).enable);
971  int _parmidx[2-1];
972  _parmidx[1-1] = _idx[1-1] + 1;
973 
974  bool result;
975  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
976  return (result);
977  }
978  int64 opCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
979  { return opinstCombinations_combine(cookparms, &_idx); }
980  int64 opinstCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
981  {
982  SOP_Node *thissop = cookparms.getNode();
983  if (!thissop) return (myCombinations(_idx[0]).combine);
984  int _parmidx[2-1];
985  _parmidx[1-1] = _idx[1-1] + 1;
986 
987  int64 result;
988  OP_Utils::evalOpParmInst(result, thissop, "combine#", _parmidx, cookparms.getCookTime(), 0, 2-1);
989  return (result);
990  }
991  int64 opCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
992  { return opinstCombinations_adjust(cookparms, &_idx); }
993  int64 opinstCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
994  {
995  SOP_Node *thissop = cookparms.getNode();
996  if (!thissop) return (myCombinations(_idx[0]).adjust);
997  int _parmidx[2-1];
998  _parmidx[1-1] = _idx[1-1] + 1;
999 
1000  int64 result;
1001  OP_Utils::evalOpParmInst(result, thissop, "adjust#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1002  return (result);
1003  }
1005  { return opinstCombinations_srcvolume(cookparms, &_idx); }
1007  {
1008  SOP_Node *thissop = cookparms.getNode();
1009  if (!thissop) return (myCombinations(_idx[0]).srcvolume);
1010  int _parmidx[2-1];
1011  _parmidx[1-1] = _idx[1-1] + 1;
1012 
1014  OP_Utils::evalOpParmInst(result, thissop, "srcvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1015  return (result);
1016  }
1017  fpreal64 opCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1018  { return opinstCombinations_scale(cookparms, &_idx); }
1019  fpreal64 opinstCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1020  {
1021  SOP_Node *thissop = cookparms.getNode();
1022  if (!thissop) return (myCombinations(_idx[0]).scale);
1023  int _parmidx[2-1];
1024  _parmidx[1-1] = _idx[1-1] + 1;
1025 
1026  fpreal64 result;
1027  OP_Utils::evalOpParmInst(result, thissop, "scale#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1028  return (result);
1029  }
1030  fpreal64 opCombinations_add(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1031  { return opinstCombinations_add(cookparms, &_idx); }
1032  fpreal64 opinstCombinations_add(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1033  {
1034  SOP_Node *thissop = cookparms.getNode();
1035  if (!thissop) return (myCombinations(_idx[0]).add);
1036  int _parmidx[2-1];
1037  _parmidx[1-1] = _idx[1-1] + 1;
1038 
1039  fpreal64 result;
1040  OP_Utils::evalOpParmInst(result, thissop, "add#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1041  return (result);
1042  }
1043  int64 opCombinations_process(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1044  { return opinstCombinations_process(cookparms, &_idx); }
1045  int64 opinstCombinations_process(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1046  {
1047  SOP_Node *thissop = cookparms.getNode();
1048  if (!thissop) return (myCombinations(_idx[0]).process);
1049  int _parmidx[2-1];
1050  _parmidx[1-1] = _idx[1-1] + 1;
1051 
1052  int64 result;
1053  OP_Utils::evalOpParmInst(result, thissop, "process#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1054  return (result);
1055  }
1056  fpreal64 opCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1057  { return opinstCombinations_blend(cookparms, &_idx); }
1058  fpreal64 opinstCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1059  {
1060  SOP_Node *thissop = cookparms.getNode();
1061  if (!thissop) return (myCombinations(_idx[0]).blend);
1062  int _parmidx[2-1];
1063  _parmidx[1-1] = _idx[1-1] + 1;
1064 
1065  fpreal64 result;
1066  OP_Utils::evalOpParmInst(result, thissop, "blend#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1067  return (result);
1068  }
1070  { return opinstCombinations_doblendvolume(cookparms, &_idx); }
1071  int64 opinstCombinations_doblendvolume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1072  {
1073  SOP_Node *thissop = cookparms.getNode();
1074  if (!thissop) return (myCombinations(_idx[0]).doblendvolume);
1075  int _parmidx[2-1];
1076  _parmidx[1-1] = _idx[1-1] + 1;
1077 
1078  int64 result;
1079  OP_Utils::evalOpParmInst(result, thissop, "doblendvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1080  return (result);
1081  }
1083  { return opinstCombinations_blendvolume(cookparms, &_idx); }
1085  {
1086  SOP_Node *thissop = cookparms.getNode();
1087  if (!thissop) return (myCombinations(_idx[0]).blendvolume);
1088  int _parmidx[2-1];
1089  _parmidx[1-1] = _idx[1-1] + 1;
1090 
1092  OP_Utils::evalOpParmInst(result, thissop, "blendvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1093  return (result);
1094  }
1095 
1096  fpreal64 getPostScale() const { return myPostScale; }
1097  void setPostScale(fpreal64 val) { myPostScale = val; }
1099  {
1100  SOP_Node *thissop = cookparms.getNode();
1101  if (!thissop) return getPostScale();
1102  fpreal64 result;
1103  OP_Utils::evalOpParm(result, thissop, "postscale", cookparms.getCookTime(), 0);
1104  return result;
1105  }
1106  bool getDoThreshold() const { return myDoThreshold; }
1107  void setDoThreshold(bool val) { myDoThreshold = val; }
1108  bool opDoThreshold(const SOP_NodeVerb::CookParms &cookparms) const
1109  {
1110  SOP_Node *thissop = cookparms.getNode();
1111  if (!thissop) return getDoThreshold();
1112  bool result;
1113  OP_Utils::evalOpParm(result, thissop, "dothreshold", cookparms.getCookTime(), 0);
1114  return result;
1115  }
1116  fpreal64 getThreshold() const { return myThreshold; }
1117  void setThreshold(fpreal64 val) { myThreshold = val; }
1119  {
1120  SOP_Node *thissop = cookparms.getNode();
1121  if (!thissop) return getThreshold();
1122  fpreal64 result;
1123  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
1124  return result;
1125  }
1126  bool getDoClampMin() const { return myDoClampMin; }
1127  void setDoClampMin(bool val) { myDoClampMin = val; }
1128  bool opDoClampMin(const SOP_NodeVerb::CookParms &cookparms) const
1129  {
1130  SOP_Node *thissop = cookparms.getNode();
1131  if (!thissop) return getDoClampMin();
1132  bool result;
1133  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
1134  return result;
1135  }
1136  fpreal64 getClampMin() const { return myClampMin; }
1137  void setClampMin(fpreal64 val) { myClampMin = val; }
1139  {
1140  SOP_Node *thissop = cookparms.getNode();
1141  if (!thissop) return getClampMin();
1142  fpreal64 result;
1143  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
1144  return result;
1145  }
1146  bool getDoClampMax() const { return myDoClampMax; }
1147  void setDoClampMax(bool val) { myDoClampMax = val; }
1148  bool opDoClampMax(const SOP_NodeVerb::CookParms &cookparms) const
1149  {
1150  SOP_Node *thissop = cookparms.getNode();
1151  if (!thissop) return getDoClampMax();
1152  bool result;
1153  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
1154  return result;
1155  }
1156  fpreal64 getClampMax() const { return myClampMax; }
1157  void setClampMax(fpreal64 val) { myClampMax = val; }
1159  {
1160  SOP_Node *thissop = cookparms.getNode();
1161  if (!thissop) return getClampMax();
1162  fpreal64 result;
1163  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
1164  return result;
1165  }
1166  bool getCreateMissing() const { return myCreateMissing; }
1167  void setCreateMissing(bool val) { myCreateMissing = val; }
1168  bool opCreateMissing(const SOP_NodeVerb::CookParms &cookparms) const
1169  {
1170  SOP_Node *thissop = cookparms.getNode();
1171  if (!thissop) return getCreateMissing();
1172  bool result;
1173  OP_Utils::evalOpParm(result, thissop, "createmissing", cookparms.getCookTime(), 0);
1174  return result;
1175  }
1176  bool getForceScalar() const { return myForceScalar; }
1177  void setForceScalar(bool val) { myForceScalar = val; }
1178  bool opForceScalar(const SOP_NodeVerb::CookParms &cookparms) const
1179  {
1180  SOP_Node *thissop = cookparms.getNode();
1181  if (!thissop) return getForceScalar();
1182  bool result;
1183  OP_Utils::evalOpParm(result, thissop, "forcescalar", cookparms.getCookTime(), 0);
1184  return result;
1185  }
1186  bool getDeleteSource() const { return myDeleteSource; }
1187  void setDeleteSource(bool val) { myDeleteSource = val; }
1188  bool opDeleteSource(const SOP_NodeVerb::CookParms &cookparms) const
1189  {
1190  SOP_Node *thissop = cookparms.getNode();
1191  if (!thissop) return getDeleteSource();
1192  bool result;
1193  OP_Utils::evalOpParm(result, thissop, "deletesource", cookparms.getCookTime(), 0);
1194  return result;
1195  }
1196  bool getErrorMissing() const { return myErrorMissing; }
1197  void setErrorMissing(bool val) { myErrorMissing = val; }
1198  bool opErrorMissing(const SOP_NodeVerb::CookParms &cookparms) const
1199  {
1200  SOP_Node *thissop = cookparms.getNode();
1201  if (!thissop) return getErrorMissing();
1202  bool result;
1203  OP_Utils::evalOpParm(result, thissop, "errormissing", cookparms.getCookTime(), 0);
1204  return result;
1205  }
1206 
1207 private:
1208  UT_StringHolder myDstVolume;
1209  UT_Array<Combinations> myCombinations;
1210  fpreal64 myPostScale;
1211  bool myDoThreshold;
1212  fpreal64 myThreshold;
1213  bool myDoClampMin;
1214  fpreal64 myClampMin;
1215  bool myDoClampMax;
1216  fpreal64 myClampMax;
1217  bool myCreateMissing;
1218  bool myForceScalar;
1219  bool myDeleteSource;
1220  bool myErrorMissing;
1221 
1222 };
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const SOP_VolumeCombineParms &src) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opDoThreshold(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
fpreal64 opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opCombinations_add(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool opDeleteSource(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opCombinations_srcvolume(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void
Definition: png.h:1083
UT_StringHolder createString(const UT_Array< Combinations > &list) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
SYS_FORCE_INLINE UT_StringHolder getToken(Combine enum_value)
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
fpreal64 opCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
fpreal64 opinstCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
int64 opCombinations_doblendvolume(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
An output stream object that owns its own string buffer storage.
int64 opCombinations_process(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, bool &v)
**But if you need a result
Definition: thread.h:613
exint opCombinations(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opCreateMissing(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
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.
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool operator==(const Combinations &src) const
bool opinstCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
int64 opinstCombinations_process(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
exint getNestNumParms(TempIndex idx) const override
int64 opinstCombinations_doblendvolume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator!=(const SOP_VolumeCombineParms &src) const
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
Definition: simd.h:4784
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
GA_API const UT_StringHolder scale
void setDstVolume(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal64 opPostScale(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
int64 opCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opForceScalar(const SOP_NodeVerb::CookParms &cookparms) const
bool opErrorMissing(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
fpreal64 opClampMin(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
UT_StringHolder opinstCombinations_blendvolume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
void setCombinations(const UT_Array< Combinations > &val)
static void loadData(UT_IStream &is, int64 &v)
fpreal64 opClampMax(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opCombinations_blendvolume(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
UT_StringHolder opDstVolume(const SOP_NodeVerb::CookParms &cookparms) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
int64 opinstCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator!=(const Combinations &src) const
bool opDoClampMin(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
int64 opCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
int64 opinstCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const UT_StringHolder & getDstVolume() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
UT_StringHolder opinstCombinations_srcvolume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void copyFrom(const OP_NodeParms *src) override
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, UT_Matrix4D v)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 opinstCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opDoClampMax(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const char * getNestParmName(TempIndex fieldnum) const override
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 opinstCombinations_add(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
fpreal64 opCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_Array< Combinations > & getCombinations() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663