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 <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_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 
252  if (baseGetSignature() != src.baseGetSignature()) return false;
253 
254  return true;
255  }
257  {
258  return !operator==(src);
259  }
264 
265 
266 
267  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
268  {
269  myDstVolume = ""_UTsh;
270  if (true)
271  graph->evalOpParm(myDstVolume, nodeidx, "dstvolume", time, graph->isDirect()?nullptr:depnode);
272  if (true)
273  {
274  int64 length = 0;
275  graph->evalOpParm(length, nodeidx, "numcombines", time, graph->isDirect()?nullptr:depnode);
276  if (length < 0) length = 0;
277  myCombinations.setSize(length);
278  for (exint i = 0; i < length; i++)
279  {
280  int parmidx[1];
281  int offsets[1];
282  parmidx[0] = i+1;
283  offsets[0] = 1;
284  auto && _curentry = myCombinations(i);
285  (void) _curentry;
286  _curentry.enable = true;
287  if (true)
288  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
289  _curentry.combine = 1;
290  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
291  graph->evalOpParmInst(_curentry.combine, nodeidx, "combine#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
292  _curentry.adjust = 0;
293  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
294  graph->evalOpParmInst(_curentry.adjust, nodeidx, "adjust#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
295  _curentry.srcvolume = ""_UTsh;
296  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
297  graph->evalOpParmInst(_curentry.srcvolume, nodeidx, "srcvolume#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
298  _curentry.scale = 1;
299  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0)))) ) )
300  graph->evalOpParmInst(_curentry.scale, nodeidx, "scale#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
301  _curentry.add = 0;
302  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0))||((_curentry.adjust==1)))) ) )
303  graph->evalOpParmInst(_curentry.add, nodeidx, "add#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
304  _curentry.process = 0;
305  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.adjust==0))||((_curentry.adjust==1))||((_curentry.adjust==2)))) ) )
306  graph->evalOpParmInst(_curentry.process, nodeidx, "process#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
307  _curentry.blend = 1;
308  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
309  graph->evalOpParmInst(_curentry.blend, nodeidx, "blend#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
310  _curentry.doblendvolume = 0;
311  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
312  graph->evalOpParmInst(_curentry.doblendvolume, nodeidx, "doblendvolume#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
313  _curentry.blendvolume = ""_UTsh;
314  if (true && ( (true&&!(((_curentry.doblendvolume==0))||((_curentry.enable==0)))) ) )
315  graph->evalOpParmInst(_curentry.blendvolume, nodeidx, "blendvolume#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
316 
317  }
318  }
319  else
320  myCombinations.clear();
321  myPostScale = 1;
322  if (true)
323  graph->evalOpParm(myPostScale, nodeidx, "postscale", time, graph->isDirect()?nullptr:depnode);
324  myDoThreshold = false;
325  if (true)
326  graph->evalOpParm(myDoThreshold, nodeidx, "dothreshold", time, graph->isDirect()?nullptr:depnode);
327  myThreshold = 0.5;
328  if (true && ( (true&&!(((getDoThreshold()==0)))) ) )
329  graph->evalOpParm(myThreshold, nodeidx, "threshold", time, graph->isDirect()?nullptr:depnode);
330  myDoClampMin = false;
331  if (true)
332  graph->evalOpParm(myDoClampMin, nodeidx, "doclampmin", time, graph->isDirect()?nullptr:depnode);
333  myClampMin = 0;
334  if (true && ( (true&&!(((getDoClampMin()==0)&&(getDoThreshold()==0)))) ) )
335  graph->evalOpParm(myClampMin, nodeidx, "clampmin", time, graph->isDirect()?nullptr:depnode);
336  myDoClampMax = false;
337  if (true)
338  graph->evalOpParm(myDoClampMax, nodeidx, "doclampmax", time, graph->isDirect()?nullptr:depnode);
339  myClampMax = 1;
340  if (true && ( (true&&!(((getDoClampMax()==0)&&(getDoThreshold()==0)))) ) )
341  graph->evalOpParm(myClampMax, nodeidx, "clampmax", time, graph->isDirect()?nullptr:depnode);
342  myCreateMissing = true;
343  if (true)
344  graph->evalOpParm(myCreateMissing, nodeidx, "createmissing", time, graph->isDirect()?nullptr:depnode);
345  myForceScalar = false;
346  if (true && ( (true&&!(((getCreateMissing()==0)))) ) )
347  graph->evalOpParm(myForceScalar, nodeidx, "forcescalar", time, graph->isDirect()?nullptr:depnode);
348  myDeleteSource = false;
349  if (true)
350  graph->evalOpParm(myDeleteSource, nodeidx, "deletesource", time, graph->isDirect()?nullptr:depnode);
351  myErrorMissing = true;
352  if (true)
353  graph->evalOpParm(myErrorMissing, nodeidx, "errormissing", time, graph->isDirect()?nullptr:depnode);
354 
355  }
356 
357 
358  void loadFromOpSubclass(const LoadParms &loadparms) override
359  {
360  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
361  }
362 
363 
364  void copyFrom(const OP_NodeParms *src) override
365  {
366  *this = *((const SOP_VolumeCombineParms *)src);
367  }
368 
369  template <typename T>
370  void
371  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
372  {
373  if (idx.size() < 1)
374  return;
375  UT_ASSERT(idx.size() == instance.size()+1);
376  if (idx.size() != instance.size()+1)
377  return;
378  switch (idx[0])
379  {
380  case 0:
381  coerceValue(value, myDstVolume);
382  break;
383  case 1:
384  if (idx.size() == 1)
385  coerceValue(value, myCombinations.entries());
386  else if (instance[0] < myCombinations.entries())
387  {
388  auto && _data = myCombinations(instance[0]);
389  switch (idx[1])
390  {
391  case 0:
392  coerceValue(value, _data.enable);
393  break;
394  case 1:
395  coerceValue(value, _data.combine);
396  break;
397  case 2:
398  coerceValue(value, _data.adjust);
399  break;
400  case 3:
401  coerceValue(value, _data.srcvolume);
402  break;
403  case 4:
404  coerceValue(value, _data.scale);
405  break;
406  case 5:
407  coerceValue(value, _data.add);
408  break;
409  case 6:
410  coerceValue(value, _data.process);
411  break;
412  case 7:
413  coerceValue(value, _data.blend);
414  break;
415  case 8:
416  coerceValue(value, _data.doblendvolume);
417  break;
418  case 9:
419  coerceValue(value, _data.blendvolume);
420  break;
421 
422  }
423  }
424  break;
425  case 2:
426  coerceValue(value, myPostScale);
427  break;
428  case 3:
429  coerceValue(value, myDoThreshold);
430  break;
431  case 4:
432  coerceValue(value, myThreshold);
433  break;
434  case 5:
435  coerceValue(value, myDoClampMin);
436  break;
437  case 6:
438  coerceValue(value, myClampMin);
439  break;
440  case 7:
441  coerceValue(value, myDoClampMax);
442  break;
443  case 8:
444  coerceValue(value, myClampMax);
445  break;
446  case 9:
447  coerceValue(value, myCreateMissing);
448  break;
449  case 10:
450  coerceValue(value, myForceScalar);
451  break;
452  case 11:
453  coerceValue(value, myDeleteSource);
454  break;
455  case 12:
456  coerceValue(value, myErrorMissing);
457  break;
458 
459  }
460  }
461 
462  bool isParmColorRamp(exint idx) const override
463  {
464  switch (idx)
465  {
466 
467  }
468  return false;
469  }
470 
471  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
472  { doGetParmValue(idx, instance, value); }
473  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
474  { doGetParmValue(idx, instance, value); }
475  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
476  { doGetParmValue(idx, instance, value); }
477  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
478  { doGetParmValue(idx, instance, value); }
479  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
480  { doGetParmValue(idx, instance, value); }
481  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
482  { doGetParmValue(idx, instance, value); }
483  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
484  { doGetParmValue(idx, instance, value); }
485  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
486  { doGetParmValue(idx, instance, value); }
487  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
488  { doGetParmValue(idx, instance, value); }
489  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
490  { doGetParmValue(idx, instance, value); }
491  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
492  { doGetParmValue(idx, instance, value); }
493 
494  template <typename T>
495  void
496  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
497  {
498  if (idx.size() < 1)
499  return;
500  UT_ASSERT(idx.size() == instance.size()+1);
501  if (idx.size() != instance.size()+1)
502  return;
503  switch (idx[0])
504  {
505  case 0:
506  coerceValue(myDstVolume, ( ( value ) ));
507  break;
508  case 1:
509  if (idx.size() == 1)
510  {
511  exint newsize;
512  coerceValue(newsize, value);
513  if (newsize < 0) newsize = 0;
514  myCombinations.setSize(newsize);
515  }
516  else
517  {
518  if (instance[0] < 0)
519  return;
520  myCombinations.setSizeIfNeeded(instance[0]+1);
521  auto && _data = myCombinations(instance[0]);
522  switch (idx[1])
523  {
524  case 0:
525  coerceValue(_data.enable, value);
526  break;
527  case 1:
528  coerceValue(_data.combine, value);
529  break;
530  case 2:
531  coerceValue(_data.adjust, value);
532  break;
533  case 3:
534  coerceValue(_data.srcvolume, value);
535  break;
536  case 4:
537  coerceValue(_data.scale, value);
538  break;
539  case 5:
540  coerceValue(_data.add, value);
541  break;
542  case 6:
543  coerceValue(_data.process, value);
544  break;
545  case 7:
546  coerceValue(_data.blend, value);
547  break;
548  case 8:
549  coerceValue(_data.doblendvolume, value);
550  break;
551  case 9:
552  coerceValue(_data.blendvolume, value);
553  break;
554 
555  }
556  }
557  break;
558  case 2:
559  coerceValue(myPostScale, ( ( value ) ));
560  break;
561  case 3:
562  coerceValue(myDoThreshold, ( ( value ) ));
563  break;
564  case 4:
565  coerceValue(myThreshold, ( ( value ) ));
566  break;
567  case 5:
568  coerceValue(myDoClampMin, ( ( value ) ));
569  break;
570  case 6:
571  coerceValue(myClampMin, ( ( value ) ));
572  break;
573  case 7:
574  coerceValue(myDoClampMax, ( ( value ) ));
575  break;
576  case 8:
577  coerceValue(myClampMax, ( ( value ) ));
578  break;
579  case 9:
580  coerceValue(myCreateMissing, ( ( value ) ));
581  break;
582  case 10:
583  coerceValue(myForceScalar, ( ( value ) ));
584  break;
585  case 11:
586  coerceValue(myDeleteSource, ( ( value ) ));
587  break;
588  case 12:
589  coerceValue(myErrorMissing, ( ( value ) ));
590  break;
591 
592  }
593  }
594 
595  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
596  { doSetParmValue(idx, instance, value); }
597  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
598  { doSetParmValue(idx, instance, value); }
599  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
600  { doSetParmValue(idx, instance, value); }
601  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
602  { doSetParmValue(idx, instance, value); }
603  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
604  { doSetParmValue(idx, instance, value); }
605  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
606  { doSetParmValue(idx, instance, value); }
607  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
608  { doSetParmValue(idx, instance, value); }
609  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
610  { doSetParmValue(idx, instance, value); }
611  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
612  { doSetParmValue(idx, instance, value); }
613  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
614  { doSetParmValue(idx, instance, value); }
615  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
616  { doSetParmValue(idx, instance, value); }
617 
618  exint getNestNumParms(TempIndex idx) const override
619  {
620  if (idx.size() == 0)
621  return 13;
622  switch (idx[0])
623  {
624  case 1:
625  return 10;
626 
627  }
628  // Invalid
629  return 0;
630  }
631 
632  const char *getNestParmName(TempIndex fieldnum) const override
633  {
634  if (fieldnum.size() < 1)
635  return 0;
636  switch (fieldnum[0])
637  {
638  case 0:
639  return "dstvolume";
640  case 1:
641  if (fieldnum.size() == 1)
642  return "numcombines";
643  switch (fieldnum[1])
644  {
645  case 0:
646  return "enable#";
647  case 1:
648  return "combine#";
649  case 2:
650  return "adjust#";
651  case 3:
652  return "srcvolume#";
653  case 4:
654  return "scale#";
655  case 5:
656  return "add#";
657  case 6:
658  return "process#";
659  case 7:
660  return "blend#";
661  case 8:
662  return "doblendvolume#";
663  case 9:
664  return "blendvolume#";
665 
666  }
667  return 0;
668  case 2:
669  return "postscale";
670  case 3:
671  return "dothreshold";
672  case 4:
673  return "threshold";
674  case 5:
675  return "doclampmin";
676  case 6:
677  return "clampmin";
678  case 7:
679  return "doclampmax";
680  case 8:
681  return "clampmax";
682  case 9:
683  return "createmissing";
684  case 10:
685  return "forcescalar";
686  case 11:
687  return "deletesource";
688  case 12:
689  return "errormissing";
690 
691  }
692  return 0;
693  }
694 
695  ParmType getNestParmType(TempIndex fieldnum) const override
696  {
697  if (fieldnum.size() < 1)
698  return PARM_UNSUPPORTED;
699  switch (fieldnum[0])
700  {
701  case 0:
702  return PARM_STRING;
703  case 1:
704  if (fieldnum.size() == 1)
705  return PARM_MULTIPARM;
706  switch (fieldnum[1])
707  {
708  case 0:
709  return PARM_INTEGER;
710  case 1:
711  return PARM_INTEGER;
712  case 2:
713  return PARM_INTEGER;
714  case 3:
715  return PARM_STRING;
716  case 4:
717  return PARM_FLOAT;
718  case 5:
719  return PARM_FLOAT;
720  case 6:
721  return PARM_INTEGER;
722  case 7:
723  return PARM_FLOAT;
724  case 8:
725  return PARM_INTEGER;
726  case 9:
727  return PARM_STRING;
728 
729  }
730  return PARM_UNSUPPORTED;
731  case 2:
732  return PARM_FLOAT;
733  case 3:
734  return PARM_INTEGER;
735  case 4:
736  return PARM_FLOAT;
737  case 5:
738  return PARM_INTEGER;
739  case 6:
740  return PARM_FLOAT;
741  case 7:
742  return PARM_INTEGER;
743  case 8:
744  return PARM_FLOAT;
745  case 9:
746  return PARM_INTEGER;
747  case 10:
748  return PARM_INTEGER;
749  case 11:
750  return PARM_INTEGER;
751  case 12:
752  return PARM_INTEGER;
753 
754  }
755  return PARM_UNSUPPORTED;
756  }
757 
758  // Boiler plate to load individual types.
759  static void loadData(UT_IStream &is, int64 &v)
760  { is.bread(&v, 1); }
761  static void loadData(UT_IStream &is, bool &v)
762  { int64 iv; is.bread(&iv, 1); v = iv; }
763  static void loadData(UT_IStream &is, fpreal64 &v)
764  { is.bread<fpreal64>(&v, 1); }
765  static void loadData(UT_IStream &is, UT_Vector2D &v)
766  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
767  static void loadData(UT_IStream &is, UT_Vector3D &v)
768  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
769  is.bread<fpreal64>(&v.z(), 1); }
770  static void loadData(UT_IStream &is, UT_Vector4D &v)
771  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
772  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
773  static void loadData(UT_IStream &is, UT_Matrix2D &v)
774  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
775  static void loadData(UT_IStream &is, UT_Matrix3D &v)
776  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
777  static void loadData(UT_IStream &is, UT_Matrix4D &v)
778  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
779  static void loadData(UT_IStream &is, UT_Vector2I &v)
780  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
781  static void loadData(UT_IStream &is, UT_Vector3I &v)
782  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
783  is.bread<int64>(&v.z(), 1); }
784  static void loadData(UT_IStream &is, UT_Vector4I &v)
785  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
786  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
788  { is.bread(v); }
790  { UT_StringHolder rampdata;
791  loadData(is, rampdata);
792  if (rampdata.isstring())
793  {
794  v.reset(new UT_Ramp());
795  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
796  v->load(istr);
797  }
798  else v.reset();
799  }
802  loadData(is, data);
803  if (data.isstring())
804  {
805  // Find the data type.
806  const char *colon = UT_StringWrap(data).findChar(':');
807  if (colon)
808  {
809  int typelen = colon - data.buffer();
811  type.strncpy(data.buffer(), typelen);
812  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
813 
814  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
815  }
816  }
817  else v.reset();
818  }
819 
820  static void saveData(std::ostream &os, int64 v)
821  { UTwrite(os, &v); }
822  static void saveData(std::ostream &os, bool v)
823  { int64 iv = v; UTwrite(os, &iv); }
824  static void saveData(std::ostream &os, fpreal64 v)
825  { UTwrite<fpreal64>(os, &v); }
826  static void saveData(std::ostream &os, UT_Vector2D v)
827  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
828  static void saveData(std::ostream &os, UT_Vector3D v)
829  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
830  UTwrite<fpreal64>(os, &v.z()); }
831  static void saveData(std::ostream &os, UT_Vector4D v)
832  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
833  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
834  static void saveData(std::ostream &os, UT_Matrix2D v)
836  static void saveData(std::ostream &os, UT_Matrix3D v)
838  static void saveData(std::ostream &os, UT_Matrix4D v)
840  static void saveData(std::ostream &os, UT_StringHolder s)
841  { UT_StringWrap(s).saveBinary(os); }
842  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
844  UT_OStringStream ostr;
845  if (s) s->save(ostr);
846  result = ostr.str();
847  saveData(os, result);
848  }
849  static void saveData(std::ostream &os, PRM_DataItemHandle s)
851  UT_OStringStream ostr;
852  if (s)
853  {
854  ostr << s->getDataTypeToken();
855  ostr << ":";
856  s->saveBinary(ostr);
857  }
858  result = ostr.str();
859  saveData(os, result);
860  }
861 
862 
863  void save(std::ostream &os) const
864  {
865  int32 v = version();
866  UTwrite(os, &v);
867  saveData(os, myDstVolume);
868  {
869  int64 length = myCombinations.entries();
870  UTwrite(os, &length);
871  for (exint i = 0; i < length; i++)
872  {
873  auto && _curentry = myCombinations(i);
874  (void) _curentry;
875  saveData(os, _curentry.enable);
876  saveData(os, _curentry.combine);
877  saveData(os, _curentry.adjust);
878  saveData(os, _curentry.srcvolume);
879  saveData(os, _curentry.scale);
880  saveData(os, _curentry.add);
881  saveData(os, _curentry.process);
882  saveData(os, _curentry.blend);
883  saveData(os, _curentry.doblendvolume);
884  saveData(os, _curentry.blendvolume);
885 
886  }
887  }
888  saveData(os, myPostScale);
889  saveData(os, myDoThreshold);
890  saveData(os, myThreshold);
891  saveData(os, myDoClampMin);
892  saveData(os, myClampMin);
893  saveData(os, myDoClampMax);
894  saveData(os, myClampMax);
895  saveData(os, myCreateMissing);
896  saveData(os, myForceScalar);
897  saveData(os, myDeleteSource);
898  saveData(os, myErrorMissing);
899 
900  }
901 
902  bool load(UT_IStream &is)
903  {
904  int32 v;
905  is.bread(&v, 1);
906  if (version() != v)
907  {
908  // Fail incompatible versions
909  return false;
910  }
911  loadData(is, myDstVolume);
912  {
913  int64 length;
914  is.read(&length, 1);
915  myCombinations.setSize(length);
916  for (exint i = 0; i < length; i++)
917  {
918  auto && _curentry = myCombinations(i);
919  (void) _curentry;
920  loadData(is, _curentry.enable);
921  loadData(is, _curentry.combine);
922  loadData(is, _curentry.adjust);
923  loadData(is, _curentry.srcvolume);
924  loadData(is, _curentry.scale);
925  loadData(is, _curentry.add);
926  loadData(is, _curentry.process);
927  loadData(is, _curentry.blend);
928  loadData(is, _curentry.doblendvolume);
929  loadData(is, _curentry.blendvolume);
930 
931  }
932  }
933  loadData(is, myPostScale);
934  loadData(is, myDoThreshold);
935  loadData(is, myThreshold);
936  loadData(is, myDoClampMin);
937  loadData(is, myClampMin);
938  loadData(is, myDoClampMax);
939  loadData(is, myClampMax);
940  loadData(is, myCreateMissing);
941  loadData(is, myForceScalar);
942  loadData(is, myDeleteSource);
943  loadData(is, myErrorMissing);
944 
945  return true;
946  }
947 
948  const UT_StringHolder & getDstVolume() const { return myDstVolume; }
949  void setDstVolume(const UT_StringHolder & val) { myDstVolume = val; }
951  {
952  SOP_Node *thissop = cookparms.getNode();
953  if (!thissop) return getDstVolume();
955  OP_Utils::evalOpParm(result, thissop, "dstvolume", cookparms.getCookTime(), 0);
956  return result;
957  }
958  const UT_Array<Combinations> &getCombinations() const { return myCombinations; }
959 void setCombinations(const UT_Array<Combinations> &val) { myCombinations = val; }
961  {
962  SOP_Node *thissop = cookparms.getNode();
963  if (!thissop) return getCombinations().entries();
964  exint result;
965  OP_Utils::evalOpParm(result, thissop, "numcombines", cookparms.getCookTime(), 0);
966  return result;
967  }
968  bool opCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
969  { return opinstCombinations_enable(cookparms, &_idx); }
970  bool opinstCombinations_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
971  {
972  SOP_Node *thissop = cookparms.getNode();
973  if (!thissop) return (myCombinations(_idx[0]).enable);
974  int _parmidx[2-1];
975  _parmidx[1-1] = _idx[1-1] + 1;
976 
977  bool result;
978  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
979  return (result);
980  }
981  int64 opCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
982  { return opinstCombinations_combine(cookparms, &_idx); }
983  int64 opinstCombinations_combine(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
984  {
985  SOP_Node *thissop = cookparms.getNode();
986  if (!thissop) return (myCombinations(_idx[0]).combine);
987  int _parmidx[2-1];
988  _parmidx[1-1] = _idx[1-1] + 1;
989 
990  int64 result;
991  OP_Utils::evalOpParmInst(result, thissop, "combine#", _parmidx, cookparms.getCookTime(), 0, 2-1);
992  return (result);
993  }
994  int64 opCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
995  { return opinstCombinations_adjust(cookparms, &_idx); }
996  int64 opinstCombinations_adjust(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
997  {
998  SOP_Node *thissop = cookparms.getNode();
999  if (!thissop) return (myCombinations(_idx[0]).adjust);
1000  int _parmidx[2-1];
1001  _parmidx[1-1] = _idx[1-1] + 1;
1002 
1003  int64 result;
1004  OP_Utils::evalOpParmInst(result, thissop, "adjust#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1005  return (result);
1006  }
1008  { return opinstCombinations_srcvolume(cookparms, &_idx); }
1010  {
1011  SOP_Node *thissop = cookparms.getNode();
1012  if (!thissop) return (myCombinations(_idx[0]).srcvolume);
1013  int _parmidx[2-1];
1014  _parmidx[1-1] = _idx[1-1] + 1;
1015 
1017  OP_Utils::evalOpParmInst(result, thissop, "srcvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1018  return (result);
1019  }
1020  fpreal64 opCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1021  { return opinstCombinations_scale(cookparms, &_idx); }
1022  fpreal64 opinstCombinations_scale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1023  {
1024  SOP_Node *thissop = cookparms.getNode();
1025  if (!thissop) return (myCombinations(_idx[0]).scale);
1026  int _parmidx[2-1];
1027  _parmidx[1-1] = _idx[1-1] + 1;
1028 
1029  fpreal64 result;
1030  OP_Utils::evalOpParmInst(result, thissop, "scale#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1031  return (result);
1032  }
1033  fpreal64 opCombinations_add(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1034  { return opinstCombinations_add(cookparms, &_idx); }
1035  fpreal64 opinstCombinations_add(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1036  {
1037  SOP_Node *thissop = cookparms.getNode();
1038  if (!thissop) return (myCombinations(_idx[0]).add);
1039  int _parmidx[2-1];
1040  _parmidx[1-1] = _idx[1-1] + 1;
1041 
1042  fpreal64 result;
1043  OP_Utils::evalOpParmInst(result, thissop, "add#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1044  return (result);
1045  }
1046  int64 opCombinations_process(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1047  { return opinstCombinations_process(cookparms, &_idx); }
1048  int64 opinstCombinations_process(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1049  {
1050  SOP_Node *thissop = cookparms.getNode();
1051  if (!thissop) return (myCombinations(_idx[0]).process);
1052  int _parmidx[2-1];
1053  _parmidx[1-1] = _idx[1-1] + 1;
1054 
1055  int64 result;
1056  OP_Utils::evalOpParmInst(result, thissop, "process#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1057  return (result);
1058  }
1059  fpreal64 opCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1060  { return opinstCombinations_blend(cookparms, &_idx); }
1061  fpreal64 opinstCombinations_blend(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1062  {
1063  SOP_Node *thissop = cookparms.getNode();
1064  if (!thissop) return (myCombinations(_idx[0]).blend);
1065  int _parmidx[2-1];
1066  _parmidx[1-1] = _idx[1-1] + 1;
1067 
1068  fpreal64 result;
1069  OP_Utils::evalOpParmInst(result, thissop, "blend#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1070  return (result);
1071  }
1073  { return opinstCombinations_doblendvolume(cookparms, &_idx); }
1074  int64 opinstCombinations_doblendvolume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return (myCombinations(_idx[0]).doblendvolume);
1078  int _parmidx[2-1];
1079  _parmidx[1-1] = _idx[1-1] + 1;
1080 
1081  int64 result;
1082  OP_Utils::evalOpParmInst(result, thissop, "doblendvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1083  return (result);
1084  }
1086  { return opinstCombinations_blendvolume(cookparms, &_idx); }
1088  {
1089  SOP_Node *thissop = cookparms.getNode();
1090  if (!thissop) return (myCombinations(_idx[0]).blendvolume);
1091  int _parmidx[2-1];
1092  _parmidx[1-1] = _idx[1-1] + 1;
1093 
1095  OP_Utils::evalOpParmInst(result, thissop, "blendvolume#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1096  return (result);
1097  }
1098 
1099  fpreal64 getPostScale() const { return myPostScale; }
1100  void setPostScale(fpreal64 val) { myPostScale = val; }
1102  {
1103  SOP_Node *thissop = cookparms.getNode();
1104  if (!thissop) return getPostScale();
1105  fpreal64 result;
1106  OP_Utils::evalOpParm(result, thissop, "postscale", cookparms.getCookTime(), 0);
1107  return result;
1108  }
1109  bool getDoThreshold() const { return myDoThreshold; }
1110  void setDoThreshold(bool val) { myDoThreshold = val; }
1111  bool opDoThreshold(const SOP_NodeVerb::CookParms &cookparms) const
1112  {
1113  SOP_Node *thissop = cookparms.getNode();
1114  if (!thissop) return getDoThreshold();
1115  bool result;
1116  OP_Utils::evalOpParm(result, thissop, "dothreshold", cookparms.getCookTime(), 0);
1117  return result;
1118  }
1119  fpreal64 getThreshold() const { return myThreshold; }
1120  void setThreshold(fpreal64 val) { myThreshold = val; }
1122  {
1123  SOP_Node *thissop = cookparms.getNode();
1124  if (!thissop) return getThreshold();
1125  fpreal64 result;
1126  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
1127  return result;
1128  }
1129  bool getDoClampMin() const { return myDoClampMin; }
1130  void setDoClampMin(bool val) { myDoClampMin = val; }
1131  bool opDoClampMin(const SOP_NodeVerb::CookParms &cookparms) const
1132  {
1133  SOP_Node *thissop = cookparms.getNode();
1134  if (!thissop) return getDoClampMin();
1135  bool result;
1136  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
1137  return result;
1138  }
1139  fpreal64 getClampMin() const { return myClampMin; }
1140  void setClampMin(fpreal64 val) { myClampMin = val; }
1142  {
1143  SOP_Node *thissop = cookparms.getNode();
1144  if (!thissop) return getClampMin();
1145  fpreal64 result;
1146  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
1147  return result;
1148  }
1149  bool getDoClampMax() const { return myDoClampMax; }
1150  void setDoClampMax(bool val) { myDoClampMax = val; }
1151  bool opDoClampMax(const SOP_NodeVerb::CookParms &cookparms) const
1152  {
1153  SOP_Node *thissop = cookparms.getNode();
1154  if (!thissop) return getDoClampMax();
1155  bool result;
1156  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
1157  return result;
1158  }
1159  fpreal64 getClampMax() const { return myClampMax; }
1160  void setClampMax(fpreal64 val) { myClampMax = val; }
1162  {
1163  SOP_Node *thissop = cookparms.getNode();
1164  if (!thissop) return getClampMax();
1165  fpreal64 result;
1166  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
1167  return result;
1168  }
1169  bool getCreateMissing() const { return myCreateMissing; }
1170  void setCreateMissing(bool val) { myCreateMissing = val; }
1171  bool opCreateMissing(const SOP_NodeVerb::CookParms &cookparms) const
1172  {
1173  SOP_Node *thissop = cookparms.getNode();
1174  if (!thissop) return getCreateMissing();
1175  bool result;
1176  OP_Utils::evalOpParm(result, thissop, "createmissing", cookparms.getCookTime(), 0);
1177  return result;
1178  }
1179  bool getForceScalar() const { return myForceScalar; }
1180  void setForceScalar(bool val) { myForceScalar = val; }
1181  bool opForceScalar(const SOP_NodeVerb::CookParms &cookparms) const
1182  {
1183  SOP_Node *thissop = cookparms.getNode();
1184  if (!thissop) return getForceScalar();
1185  bool result;
1186  OP_Utils::evalOpParm(result, thissop, "forcescalar", cookparms.getCookTime(), 0);
1187  return result;
1188  }
1189  bool getDeleteSource() const { return myDeleteSource; }
1190  void setDeleteSource(bool val) { myDeleteSource = val; }
1191  bool opDeleteSource(const SOP_NodeVerb::CookParms &cookparms) const
1192  {
1193  SOP_Node *thissop = cookparms.getNode();
1194  if (!thissop) return getDeleteSource();
1195  bool result;
1196  OP_Utils::evalOpParm(result, thissop, "deletesource", cookparms.getCookTime(), 0);
1197  return result;
1198  }
1199  bool getErrorMissing() const { return myErrorMissing; }
1200  void setErrorMissing(bool val) { myErrorMissing = val; }
1201  bool opErrorMissing(const SOP_NodeVerb::CookParms &cookparms) const
1202  {
1203  SOP_Node *thissop = cookparms.getNode();
1204  if (!thissop) return getErrorMissing();
1205  bool result;
1206  OP_Utils::evalOpParm(result, thissop, "errormissing", cookparms.getCookTime(), 0);
1207  return result;
1208  }
1209 
1210 private:
1211  UT_StringHolder myDstVolume;
1212  UT_Array<Combinations> myCombinations;
1213  fpreal64 myPostScale;
1214  bool myDoThreshold;
1215  fpreal64 myThreshold;
1216  bool myDoClampMin;
1217  fpreal64 myClampMin;
1218  bool myDoClampMax;
1219  fpreal64 myClampMax;
1220  bool myCreateMissing;
1221  bool myForceScalar;
1222  bool myDeleteSource;
1223  bool myErrorMissing;
1224 
1225 };
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
type
Definition: core.h:556
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:63
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:4949
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:303
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:655
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
bool process(T &func, UT_WorkBuffer &fullpath, exint fullpath_len, const UT_StringArray &paths, const UT_Array< FS_Stat > &stats)
Utility function to process the contents of the traverse() function.
Definition: FS_Traverse.h:24
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
static void loadData(UT_IStream &is, UT_StringHolder &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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