HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeCompress.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_VolumeCompressEnums
24 {
25  enum class Compression
26  {
27  NONE = 0,
28  COMPRESS,
29  UNCOMPRESS,
31  };
32  enum class Dither
33  {
34  NONE = 0,
35  ORDERED
36  };
37 }
38 
39 
41 {
42 public:
43  static int version() { return 1; }
44 
46  {
47  myGroup = ""_UTsh;
48  myCompression = 1;
49  myUpdateSettings = false;
50  myConstantTol = 0;
51  myQuantizeTol = 0;
52  myDither = 1;
53  myUseFP16 = false;
54  myMaskGroup = ""_UTsh;
55  myDoMaskMin = false;
56  myMaskMin = 0;
57  myDoMaskMax = false;
58  myMaskMax = 0;
59  myInvertMask = false;
60 
61  }
62 
63  explicit SOP_VolumeCompressParms(const SOP_VolumeCompressParms &) = default;
65  SOP_VolumeCompressParms(SOP_VolumeCompressParms &&) noexcept = default;
66  SOP_VolumeCompressParms &operator=(SOP_VolumeCompressParms &&) noexcept = default;
67 
68  ~SOP_VolumeCompressParms() override {}
69 
71  {
72  if (myGroup != src.myGroup) return false;
73  if (myCompression != src.myCompression) return false;
74  if (myUpdateSettings != src.myUpdateSettings) return false;
75  if (myConstantTol != src.myConstantTol) return false;
76  if (myQuantizeTol != src.myQuantizeTol) return false;
77  if (myDither != src.myDither) return false;
78  if (myUseFP16 != src.myUseFP16) return false;
79  if (myMaskGroup != src.myMaskGroup) return false;
80  if (myDoMaskMin != src.myDoMaskMin) return false;
81  if (myMaskMin != src.myMaskMin) return false;
82  if (myDoMaskMax != src.myDoMaskMax) return false;
83  if (myMaskMax != src.myMaskMax) return false;
84  if (myInvertMask != src.myInvertMask) return false;
85 
86  return true;
87  }
89  {
90  return !operator==(src);
91  }
94 
95 
96 
97  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
98  {
99  myGroup = ""_UTsh;
100  if (true)
101  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
102  myCompression = 1;
103  if (true)
104  graph->evalOpParm(myCompression, nodeidx, "compression", time, 0);
105  myUpdateSettings = false;
106  if (true)
107  graph->evalOpParm(myUpdateSettings, nodeidx, "updatesettings", time, 0);
108  myConstantTol = 0;
109  if (true && ( (true&&!(((getUpdateSettings()==0)))) ) )
110  graph->evalOpParm(myConstantTol, nodeidx, "constanttol", time, 0);
111  myQuantizeTol = 0;
112  if (true && ( (true&&!(((getUpdateSettings()==0)))) ) )
113  graph->evalOpParm(myQuantizeTol, nodeidx, "quantizetol", time, 0);
114  myDither = 1;
115  if (true && ( (true&&!(((getUpdateSettings()==0)))) ) )
116  graph->evalOpParm(myDither, nodeidx, "dither", time, 0);
117  myUseFP16 = false;
118  if (true && ( (true&&!(((getUpdateSettings()==0)))) ) )
119  graph->evalOpParm(myUseFP16, nodeidx, "usefp16", time, 0);
120  myMaskGroup = ""_UTsh;
121  if (true)
122  graph->evalOpParm(myMaskGroup, nodeidx, "maskgrp", time, 0);
123  myDoMaskMin = false;
124  if (true)
125  graph->evalOpParm(myDoMaskMin, nodeidx, "domaskmin", time, 0);
126  myMaskMin = 0;
127  if (true && ( (true&&!(((getDoMaskMin()==0)))) ) )
128  graph->evalOpParm(myMaskMin, nodeidx, "maskmin", time, 0);
129  myDoMaskMax = false;
130  if (true)
131  graph->evalOpParm(myDoMaskMax, nodeidx, "domaskmax", time, 0);
132  myMaskMax = 0;
133  if (true && ( (true&&!(((getDoMaskMax()==0)))) ) )
134  graph->evalOpParm(myMaskMax, nodeidx, "maskmax", time, 0);
135  myInvertMask = false;
136  if (true)
137  graph->evalOpParm(myInvertMask, nodeidx, "invertmask", time, 0);
138 
139  }
140 
141 
142  void loadFromOpSubclass(const LoadParms &loadparms) override
143  {
144  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
145  }
146 
147 
148  void copyFrom(const OP_NodeParms *src) override
149  {
150  *this = *((const SOP_VolumeCompressParms *)src);
151  }
152 
153  template <typename T>
154  void
155  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
156  {
157  if (idx.size() < 1)
158  return;
159  UT_ASSERT(idx.size() == instance.size()+1);
160  if (idx.size() != instance.size()+1)
161  return;
162  switch (idx[0])
163  {
164  case 0:
165  coerceValue(value, myGroup);
166  break;
167  case 1:
168  coerceValue(value, myCompression);
169  break;
170  case 2:
171  coerceValue(value, myUpdateSettings);
172  break;
173  case 3:
174  coerceValue(value, myConstantTol);
175  break;
176  case 4:
177  coerceValue(value, myQuantizeTol);
178  break;
179  case 5:
180  coerceValue(value, myDither);
181  break;
182  case 6:
183  coerceValue(value, myUseFP16);
184  break;
185  case 7:
186  coerceValue(value, myMaskGroup);
187  break;
188  case 8:
189  coerceValue(value, myDoMaskMin);
190  break;
191  case 9:
192  coerceValue(value, myMaskMin);
193  break;
194  case 10:
195  coerceValue(value, myDoMaskMax);
196  break;
197  case 11:
198  coerceValue(value, myMaskMax);
199  break;
200  case 12:
201  coerceValue(value, myInvertMask);
202  break;
203 
204  }
205  }
206 
207  bool isParmColorRamp(exint idx) const override
208  {
209  switch (idx)
210  {
211 
212  }
213  return false;
214  }
215 
216  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
237  { doGetParmValue(idx, instance, value); }
238 
239  template <typename T>
240  void
241  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
242  {
243  if (idx.size() < 1)
244  return;
245  UT_ASSERT(idx.size() == instance.size()+1);
246  if (idx.size() != instance.size()+1)
247  return;
248  switch (idx[0])
249  {
250  case 0:
251  coerceValue(myGroup, ( ( value ) ));
252  break;
253  case 1:
254  coerceValue(myCompression, clampMinValue(0, clampMaxValue(3, value ) ));
255  break;
256  case 2:
257  coerceValue(myUpdateSettings, ( ( value ) ));
258  break;
259  case 3:
260  coerceValue(myConstantTol, clampMinValue(0, ( value ) ));
261  break;
262  case 4:
263  coerceValue(myQuantizeTol, clampMinValue(0, ( value ) ));
264  break;
265  case 5:
266  coerceValue(myDither, clampMinValue(0, clampMaxValue(1, value ) ));
267  break;
268  case 6:
269  coerceValue(myUseFP16, ( ( value ) ));
270  break;
271  case 7:
272  coerceValue(myMaskGroup, ( ( value ) ));
273  break;
274  case 8:
275  coerceValue(myDoMaskMin, ( ( value ) ));
276  break;
277  case 9:
278  coerceValue(myMaskMin, ( ( value ) ));
279  break;
280  case 10:
281  coerceValue(myDoMaskMax, ( ( value ) ));
282  break;
283  case 11:
284  coerceValue(myMaskMax, ( ( value ) ));
285  break;
286  case 12:
287  coerceValue(myInvertMask, ( ( value ) ));
288  break;
289 
290  }
291  }
292 
293  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
314  { doSetParmValue(idx, instance, value); }
315 
316  exint getNestNumParms(TempIndex idx) const override
317  {
318  if (idx.size() == 0)
319  return 13;
320  switch (idx[0])
321  {
322 
323  }
324  // Invalid
325  return 0;
326  }
327 
328  const char *getNestParmName(TempIndex fieldnum) const override
329  {
330  if (fieldnum.size() < 1)
331  return 0;
332  switch (fieldnum[0])
333  {
334  case 0:
335  return "group";
336  case 1:
337  return "compression";
338  case 2:
339  return "updatesettings";
340  case 3:
341  return "constanttol";
342  case 4:
343  return "quantizetol";
344  case 5:
345  return "dither";
346  case 6:
347  return "usefp16";
348  case 7:
349  return "maskgrp";
350  case 8:
351  return "domaskmin";
352  case 9:
353  return "maskmin";
354  case 10:
355  return "domaskmax";
356  case 11:
357  return "maskmax";
358  case 12:
359  return "invertmask";
360 
361  }
362  return 0;
363  }
364 
365  ParmType getNestParmType(TempIndex fieldnum) const override
366  {
367  if (fieldnum.size() < 1)
368  return PARM_UNSUPPORTED;
369  switch (fieldnum[0])
370  {
371  case 0:
372  return PARM_STRING;
373  case 1:
374  return PARM_INTEGER;
375  case 2:
376  return PARM_INTEGER;
377  case 3:
378  return PARM_FLOAT;
379  case 4:
380  return PARM_FLOAT;
381  case 5:
382  return PARM_INTEGER;
383  case 6:
384  return PARM_INTEGER;
385  case 7:
386  return PARM_STRING;
387  case 8:
388  return PARM_INTEGER;
389  case 9:
390  return PARM_FLOAT;
391  case 10:
392  return PARM_INTEGER;
393  case 11:
394  return PARM_FLOAT;
395  case 12:
396  return PARM_INTEGER;
397 
398  }
399  return PARM_UNSUPPORTED;
400  }
401 
402  // Boiler plate to load individual types.
403  static void loadData(UT_IStream &is, int64 &v)
404  { is.bread(&v, 1); }
405  static void loadData(UT_IStream &is, bool &v)
406  { int64 iv; is.bread(&iv, 1); v = iv; }
407  static void loadData(UT_IStream &is, fpreal64 &v)
408  { is.bread<fpreal64>(&v, 1); }
409  static void loadData(UT_IStream &is, UT_Vector2D &v)
410  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
411  static void loadData(UT_IStream &is, UT_Vector3D &v)
412  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
413  is.bread<fpreal64>(&v.z(), 1); }
414  static void loadData(UT_IStream &is, UT_Vector4D &v)
415  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
416  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
417  static void loadData(UT_IStream &is, UT_Matrix2D &v)
418  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
419  static void loadData(UT_IStream &is, UT_Matrix3D &v)
420  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
421  static void loadData(UT_IStream &is, UT_Matrix4D &v)
422  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
423  static void loadData(UT_IStream &is, UT_Vector2I &v)
424  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
425  static void loadData(UT_IStream &is, UT_Vector3I &v)
426  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
427  is.bread<int64>(&v.z(), 1); }
428  static void loadData(UT_IStream &is, UT_Vector4I &v)
429  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
430  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
432  { is.bread(v); }
434  { UT_StringHolder rampdata;
435  loadData(is, rampdata);
436  if (rampdata.isstring())
437  {
438  v.reset(new UT_Ramp());
439  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
440  v->load(istr);
441  }
442  else v.reset();
443  }
446  loadData(is, data);
447  if (data.isstring())
448  {
449  // Find the data type.
450  const char *colon = UT_StringWrap(data).findChar(':');
451  if (colon)
452  {
453  int typelen = colon - data.buffer();
455  type.strncpy(data.buffer(), typelen);
456  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
457 
458  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
459  }
460  }
461  else v.reset();
462  }
463 
464  static void saveData(std::ostream &os, int64 v)
465  { UTwrite(os, &v); }
466  static void saveData(std::ostream &os, bool v)
467  { int64 iv = v; UTwrite(os, &iv); }
468  static void saveData(std::ostream &os, fpreal64 v)
469  { UTwrite<fpreal64>(os, &v); }
470  static void saveData(std::ostream &os, UT_Vector2D v)
471  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
472  static void saveData(std::ostream &os, UT_Vector3D v)
473  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
474  UTwrite<fpreal64>(os, &v.z()); }
475  static void saveData(std::ostream &os, UT_Vector4D v)
476  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
477  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
478  static void saveData(std::ostream &os, UT_Matrix2D v)
480  static void saveData(std::ostream &os, UT_Matrix3D v)
482  static void saveData(std::ostream &os, UT_Matrix4D v)
484  static void saveData(std::ostream &os, UT_StringHolder s)
485  { UT_StringWrap(s).saveBinary(os); }
486  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
488  UT_OStringStream ostr;
489  if (s) s->save(ostr);
490  result = ostr.str();
491  saveData(os, result);
492  }
493  static void saveData(std::ostream &os, PRM_DataItemHandle s)
495  UT_OStringStream ostr;
496  if (s)
497  {
498  ostr << s->getDataTypeToken();
499  ostr << ":";
500  s->saveBinary(ostr);
501  }
502  result = ostr.str();
503  saveData(os, result);
504  }
505 
506 
507  void save(std::ostream &os) const
508  {
509  int32 v = version();
510  UTwrite(os, &v);
511  saveData(os, myGroup);
512  saveData(os, myCompression);
513  saveData(os, myUpdateSettings);
514  saveData(os, myConstantTol);
515  saveData(os, myQuantizeTol);
516  saveData(os, myDither);
517  saveData(os, myUseFP16);
518  saveData(os, myMaskGroup);
519  saveData(os, myDoMaskMin);
520  saveData(os, myMaskMin);
521  saveData(os, myDoMaskMax);
522  saveData(os, myMaskMax);
523  saveData(os, myInvertMask);
524 
525  }
526 
527  bool load(UT_IStream &is)
528  {
529  int32 v;
530  is.bread(&v, 1);
531  if (version() != v)
532  {
533  // Fail incompatible versions
534  return false;
535  }
536  loadData(is, myGroup);
537  loadData(is, myCompression);
538  loadData(is, myUpdateSettings);
539  loadData(is, myConstantTol);
540  loadData(is, myQuantizeTol);
541  loadData(is, myDither);
542  loadData(is, myUseFP16);
543  loadData(is, myMaskGroup);
544  loadData(is, myDoMaskMin);
545  loadData(is, myMaskMin);
546  loadData(is, myDoMaskMax);
547  loadData(is, myMaskMax);
548  loadData(is, myInvertMask);
549 
550  return true;
551  }
552 
553  const UT_StringHolder & getGroup() const { return myGroup; }
554  void setGroup(const UT_StringHolder & val) { myGroup = val; }
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getGroup();
560  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
561  return result;
562  }
563  Compression getCompression() const { return Compression(myCompression); }
564  void setCompression(Compression val) { myCompression = int64(val); }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getCompression();
569  int64 result;
570  OP_Utils::evalOpParm(result, thissop, "compression", cookparms.getCookTime(), 0);
571  return Compression(result);
572  }
573  bool getUpdateSettings() const { return myUpdateSettings; }
574  void setUpdateSettings(bool val) { myUpdateSettings = val; }
575  bool opUpdateSettings(const SOP_NodeVerb::CookParms &cookparms) const
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getUpdateSettings();
579  bool result;
580  OP_Utils::evalOpParm(result, thissop, "updatesettings", cookparms.getCookTime(), 0);
581  return result;
582  }
583  fpreal64 getConstantTol() const { return myConstantTol; }
584  void setConstantTol(fpreal64 val) { myConstantTol = val; }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getConstantTol();
590  OP_Utils::evalOpParm(result, thissop, "constanttol", cookparms.getCookTime(), 0);
591  return result;
592  }
593  fpreal64 getQuantizeTol() const { return myQuantizeTol; }
594  void setQuantizeTol(fpreal64 val) { myQuantizeTol = val; }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getQuantizeTol();
600  OP_Utils::evalOpParm(result, thissop, "quantizetol", cookparms.getCookTime(), 0);
601  return result;
602  }
603  Dither getDither() const { return Dither(myDither); }
604  void setDither(Dither val) { myDither = int64(val); }
605  Dither opDither(const SOP_NodeVerb::CookParms &cookparms) const
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getDither();
609  int64 result;
610  OP_Utils::evalOpParm(result, thissop, "dither", cookparms.getCookTime(), 0);
611  return Dither(result);
612  }
613  bool getUseFP16() const { return myUseFP16; }
614  void setUseFP16(bool val) { myUseFP16 = val; }
615  bool opUseFP16(const SOP_NodeVerb::CookParms &cookparms) const
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getUseFP16();
619  bool result;
620  OP_Utils::evalOpParm(result, thissop, "usefp16", cookparms.getCookTime(), 0);
621  return result;
622  }
623  const UT_StringHolder & getMaskGroup() const { return myMaskGroup; }
624  void setMaskGroup(const UT_StringHolder & val) { myMaskGroup = val; }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getMaskGroup();
630  OP_Utils::evalOpParm(result, thissop, "maskgrp", cookparms.getCookTime(), 0);
631  return result;
632  }
633  bool getDoMaskMin() const { return myDoMaskMin; }
634  void setDoMaskMin(bool val) { myDoMaskMin = val; }
635  bool opDoMaskMin(const SOP_NodeVerb::CookParms &cookparms) const
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getDoMaskMin();
639  bool result;
640  OP_Utils::evalOpParm(result, thissop, "domaskmin", cookparms.getCookTime(), 0);
641  return result;
642  }
643  fpreal64 getMaskMin() const { return myMaskMin; }
644  void setMaskMin(fpreal64 val) { myMaskMin = val; }
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getMaskMin();
650  OP_Utils::evalOpParm(result, thissop, "maskmin", cookparms.getCookTime(), 0);
651  return result;
652  }
653  bool getDoMaskMax() const { return myDoMaskMax; }
654  void setDoMaskMax(bool val) { myDoMaskMax = val; }
655  bool opDoMaskMax(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getDoMaskMax();
659  bool result;
660  OP_Utils::evalOpParm(result, thissop, "domaskmax", cookparms.getCookTime(), 0);
661  return result;
662  }
663  fpreal64 getMaskMax() const { return myMaskMax; }
664  void setMaskMax(fpreal64 val) { myMaskMax = val; }
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getMaskMax();
670  OP_Utils::evalOpParm(result, thissop, "maskmax", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getInvertMask() const { return myInvertMask; }
674  void setInvertMask(bool val) { myInvertMask = val; }
675  bool opInvertMask(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getInvertMask();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "invertmask", cookparms.getCookTime(), 0);
681  return result;
682  }
683 
684 private:
685  UT_StringHolder myGroup;
686  int64 myCompression;
687  bool myUpdateSettings;
688  fpreal64 myConstantTol;
689  fpreal64 myQuantizeTol;
690  int64 myDither;
691  bool myUseFP16;
692  UT_StringHolder myMaskGroup;
693  bool myDoMaskMin;
694  fpreal64 myMaskMin;
695  bool myDoMaskMax;
696  fpreal64 myMaskMax;
697  bool myInvertMask;
698 
699 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
Dither opDither(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setCompression(Compression val)
const UT_StringHolder & getMaskGroup() const
Compression getCompression() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_Matrix2D &v)
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
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMF_EXPORT_ENUM Compression
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opDoMaskMax(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &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, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Vector4D v)
ParmType getNestParmType(TempIndex fieldnum) const override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
exint getNestNumParms(TempIndex idx) const override
fpreal64 opConstantTol(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
void save(std::ostream &os) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, fpreal64 v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
fpreal64 opMaskMin(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, int64 &v)
bool opUseFP16(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
long long int64
Definition: SYS_Types.h:116
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opInvertMask(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opQuantizeTol(const SOP_NodeVerb::CookParms &cookparms) const
bool opUpdateSettings(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
bool opDoMaskMin(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMaskMax(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, fpreal64 &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool operator==(const SOP_VolumeCompressParms &src) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
void setMaskGroup(const UT_StringHolder &val)
const char * getNestParmName(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getGroup() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
Compression opCompression(const SOP_NodeVerb::CookParms &cookparms) 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
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GLboolean r
Definition: glcorearb.h:1222
UT_StringHolder opMaskGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_VolumeCompressParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663