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