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