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