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