HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribFromVolume.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 <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_AttribFromVolumeEnums
22 {
23  enum class Type
24  {
25  FLOAT = 0,
26  INT,
27  VECTOR
28  };
29  enum class MonoRampMode
30  {
31  CLAMP = 0,
32  PERIODIC
33  };
34  enum class Monopreset
35  {
36  NONE = 0,
37  INCREASING,
39  HILL,
40  VALLEY,
41  STEP,
42  SQUARE
43  };
44  enum class VectorRampMode
45  {
46  CLAMP = 0,
47  PERIODIC
48  };
49  enum class Vectorpreset
50  {
51  NONE = 0,
52  _FALSE,
53  PINK,
54  MONO,
55  BLACKBODY,
56  BIPARTITE
57  };
58 }
59 
60 
62 {
63 public:
64  static int version() { return 1; }
65 
67  {
68  myGroup = ""_sh;
69  myField = ""_sh;
70  myName = "Cd"_sh;
71  myCreateVarMap = false;
72  myVarName = ""_sh;
73  myType = 0;
74  mySize = 3;
75  myDefault = UT_Vector4D(0,0,0,0);
76  myRangeIn = UT_Vector2D(0,1);
77  myMonoEnable = false;
78  myMonoRampMode = 0;
79  myMonopreset = 0;
80  myMonoRamp = UT_SharedPtr<UT_Ramp>(0);
81  myVectorEnable = false;
82  myVectorRampMode = 0;
83  myVectorpreset = 0;
84  myVectorRamp = UT_SharedPtr<UT_Ramp>(0);
85  myRangeOut = UT_Vector2D(0,1);
86 
87  }
88 
89  explicit SOP_AttribFromVolumeParms(const SOP_AttribFromVolumeParms &) = default;
90 
92 
94  {
95  if (myGroup != src.myGroup) return false;
96  if (myField != src.myField) return false;
97  if (myName != src.myName) return false;
98  if (myCreateVarMap != src.myCreateVarMap) return false;
99  if (myVarName != src.myVarName) return false;
100  if (myType != src.myType) return false;
101  if (mySize != src.mySize) return false;
102  if (myDefault != src.myDefault) return false;
103  if (myRangeIn != src.myRangeIn) return false;
104  if (myMonoEnable != src.myMonoEnable) return false;
105  if (myMonoRampMode != src.myMonoRampMode) return false;
106  if (myMonopreset != src.myMonopreset) return false;
107  if (myMonoRamp != src.myMonoRamp) return false;
108  if (myVectorEnable != src.myVectorEnable) return false;
109  if (myVectorRampMode != src.myVectorRampMode) return false;
110  if (myVectorpreset != src.myVectorpreset) return false;
111  if (myVectorRamp != src.myVectorRamp) return false;
112  if (myRangeOut != src.myRangeOut) return false;
113 
114  return true;
115  }
117  {
118  return !operator==(src);
119  }
125 
126 
127 
128  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
129  {
130  if (true)
131  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
132  else myGroup = ""_sh;
133  if (true)
134  OP_Utils::evalOpParm(myField, node, "field", time, 0);
135  else myField = ""_sh;
136  if (true)
137  OP_Utils::evalOpParm(myName, node, "name", time, 0);
138  else myName = "Cd"_sh;
139  if (true)
140  OP_Utils::evalOpParm(myCreateVarMap, node, "createvarmap", time, 0);
141  else myCreateVarMap = false;
142  if (true && ( (!(((getCreateVarMap()==0)))) ) )
143  OP_Utils::evalOpParm(myVarName, node, "varname", time, 0);
144  else myVarName = ""_sh;
145  if (true)
146  OP_Utils::evalOpParm(myType, node, "type", time, 0);
147  else myType = 0;
148  if (true)
149  OP_Utils::evalOpParm(mySize, node, "size", time, 0);
150  else mySize = 3;
151  if (true)
152  OP_Utils::evalOpParm(myDefault, node, "default", time, 0);
153  else myDefault = UT_Vector4D(0,0,0,0);
154  if (true)
155  OP_Utils::evalOpParm(myRangeIn, node, "rangein", time, 0);
156  else myRangeIn = UT_Vector2D(0,1);
157  if (true)
158  OP_Utils::evalOpParm(myMonoEnable, node, "monoenable", time, 0);
159  else myMonoEnable = false;
160  if (true && ( (!(((getMonoEnable()==0)))) ) )
161  OP_Utils::evalOpParm(myMonoRampMode, node, "monorampmode", time, 0);
162  else myMonoRampMode = 0;
163  if (true && ( (!(((getMonoEnable()==0)))) ) )
164  OP_Utils::evalOpParm(myMonopreset, node, "monopreset", time, 0);
165  else myMonopreset = 0;
166  if (true && ( (!(((getMonoEnable()==0)))) ) )
167  OP_Utils::evalOpParm(myMonoRamp, node, "monoramp", time, 0);
168  else myMonoRamp = UT_SharedPtr<UT_Ramp>(0);
169  if (true)
170  OP_Utils::evalOpParm(myVectorEnable, node, "vectorenable", time, 0);
171  else myVectorEnable = false;
172  if (true && ( (!(((getVectorEnable()==0)))) ) )
173  OP_Utils::evalOpParm(myVectorRampMode, node, "vectorrampmode", time, 0);
174  else myVectorRampMode = 0;
175  if (true && ( (!(((getVectorEnable()==0)))) ) )
176  OP_Utils::evalOpParm(myVectorpreset, node, "vectorpreset", time, 0);
177  else myVectorpreset = 0;
178  if (true && ( (!(((getVectorEnable()==0)))) ) )
179  OP_Utils::evalOpParm(myVectorRamp, node, "vectorramp", time, 0);
180  else myVectorRamp = UT_SharedPtr<UT_Ramp>(0);
181  if (true)
182  OP_Utils::evalOpParm(myRangeOut, node, "rangeout", time, 0);
183  else myRangeOut = UT_Vector2D(0,1);
184 
185  }
186 
187 
188  virtual void loadFromOpSubclass(const LoadParms &loadparms)
189  {
190  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
191  }
192 
193 
194  virtual void copyFrom(const SOP_NodeParms *src)
195  {
196  *this = *((const SOP_AttribFromVolumeParms *)src);
197  }
198 
199  template <typename T>
200  void
201  doGetParmValue(exint idx, T &value) const
202  {
203  switch (idx)
204  {
205  case 0:
206  coerceValue(value, myGroup);
207  break;
208  case 1:
209  coerceValue(value, myField);
210  break;
211  case 2:
212  coerceValue(value, myName);
213  break;
214  case 3:
215  coerceValue(value, myCreateVarMap);
216  break;
217  case 4:
218  coerceValue(value, myVarName);
219  break;
220  case 5:
221  coerceValue(value, myType);
222  break;
223  case 6:
224  coerceValue(value, mySize);
225  break;
226  case 7:
227  coerceValue(value, myDefault);
228  break;
229  case 8:
230  coerceValue(value, myRangeIn);
231  break;
232  case 9:
233  coerceValue(value, myMonoEnable);
234  break;
235  case 10:
236  coerceValue(value, myMonoRampMode);
237  break;
238  case 11:
239  coerceValue(value, myMonopreset);
240  break;
241  case 12:
242  coerceValue(value, myMonoRamp);
243  break;
244  case 13:
245  coerceValue(value, myVectorEnable);
246  break;
247  case 14:
248  coerceValue(value, myVectorRampMode);
249  break;
250  case 15:
251  coerceValue(value, myVectorpreset);
252  break;
253  case 16:
254  coerceValue(value, myVectorRamp);
255  break;
256  case 17:
257  coerceValue(value, myRangeOut);
258  break;
259 
260  }
261  }
262 
263  void getParmValue(exint idx, exint &value) const
264  { doGetParmValue(idx, value); }
265  void getParmValue(exint idx, fpreal &value) const
266  { doGetParmValue(idx, value); }
268  { doGetParmValue(idx, value); }
270  { doGetParmValue(idx, value); }
272  { doGetParmValue(idx, value); }
274  { doGetParmValue(idx, value); }
276  { doGetParmValue(idx, value); }
278  { doGetParmValue(idx, value); }
280  { doGetParmValue(idx, value); }
282  { doGetParmValue(idx, value); }
284  { doGetParmValue(idx, value); }
285 
286  template <typename T>
287  void
288  doSetParmValue(exint idx, const T &value)
289  {
290  switch (idx)
291  {
292  case 0:
293  coerceValue(myGroup, value);
294  break;
295  case 1:
296  coerceValue(myField, value);
297  break;
298  case 2:
299  coerceValue(myName, value);
300  break;
301  case 3:
302  coerceValue(myCreateVarMap, value);
303  break;
304  case 4:
305  coerceValue(myVarName, value);
306  break;
307  case 5:
308  coerceValue(myType, value);
309  break;
310  case 6:
311  coerceValue(mySize, value);
312  break;
313  case 7:
314  coerceValue(myDefault, value);
315  break;
316  case 8:
317  coerceValue(myRangeIn, value);
318  break;
319  case 9:
320  coerceValue(myMonoEnable, value);
321  break;
322  case 10:
323  coerceValue(myMonoRampMode, value);
324  break;
325  case 11:
326  coerceValue(myMonopreset, value);
327  break;
328  case 12:
329  coerceValue(myMonoRamp, value);
330  break;
331  case 13:
332  coerceValue(myVectorEnable, value);
333  break;
334  case 14:
335  coerceValue(myVectorRampMode, value);
336  break;
337  case 15:
338  coerceValue(myVectorpreset, value);
339  break;
340  case 16:
341  coerceValue(myVectorRamp, value);
342  break;
343  case 17:
344  coerceValue(myRangeOut, value);
345  break;
346 
347  }
348  }
349 
350  void setParmValue(exint idx, const exint &value)
351  { doSetParmValue(idx, value); }
352  void setParmValue(exint idx, const fpreal &value)
353  { doSetParmValue(idx, value); }
354  void setParmValue(exint idx, const UT_Vector2D &value)
355  { doSetParmValue(idx, value); }
356  void setParmValue(exint idx, const UT_Vector3D &value)
357  { doSetParmValue(idx, value); }
358  void setParmValue(exint idx, const UT_Vector4D &value)
359  { doSetParmValue(idx, value); }
360  void setParmValue(exint idx, const UT_Matrix2D &value)
361  { doSetParmValue(idx, value); }
362  void setParmValue(exint idx, const UT_Matrix3D &value)
363  { doSetParmValue(idx, value); }
364  void setParmValue(exint idx, const UT_Matrix4D &value)
365  { doSetParmValue(idx, value); }
367  { doSetParmValue(idx, value); }
369  { doSetParmValue(idx, value); }
371  { doSetParmValue(idx, value); }
372 
373  virtual exint getNumParms() const
374  {
375  return 18;
376  }
377 
378  virtual const char *getParmName(exint fieldnum) const
379  {
380  switch (fieldnum)
381  {
382  case 0:
383  return "group";
384  case 1:
385  return "field";
386  case 2:
387  return "name";
388  case 3:
389  return "createvarmap";
390  case 4:
391  return "varname";
392  case 5:
393  return "type";
394  case 6:
395  return "size";
396  case 7:
397  return "default";
398  case 8:
399  return "rangein";
400  case 9:
401  return "monoenable";
402  case 10:
403  return "monorampmode";
404  case 11:
405  return "monopreset";
406  case 12:
407  return "monoramp";
408  case 13:
409  return "vectorenable";
410  case 14:
411  return "vectorrampmode";
412  case 15:
413  return "vectorpreset";
414  case 16:
415  return "vectorramp";
416  case 17:
417  return "rangeout";
418 
419  }
420  return 0;
421  }
422 
423  virtual ParmType getParmType(exint fieldnum) const
424  {
425  switch (fieldnum)
426  {
427  case 0:
428  return PARM_STRING;
429  case 1:
430  return PARM_STRING;
431  case 2:
432  return PARM_STRING;
433  case 3:
434  return PARM_INTEGER;
435  case 4:
436  return PARM_STRING;
437  case 5:
438  return PARM_INTEGER;
439  case 6:
440  return PARM_INTEGER;
441  case 7:
442  return PARM_VECTOR4;
443  case 8:
444  return PARM_VECTOR2;
445  case 9:
446  return PARM_INTEGER;
447  case 10:
448  return PARM_INTEGER;
449  case 11:
450  return PARM_INTEGER;
451  case 12:
452  return PARM_RAMP;
453  case 13:
454  return PARM_INTEGER;
455  case 14:
456  return PARM_INTEGER;
457  case 15:
458  return PARM_INTEGER;
459  case 16:
460  return PARM_RAMP;
461  case 17:
462  return PARM_VECTOR2;
463 
464  }
465  return PARM_UNSUPPORTED;
466  }
467 
468  // Boiler plate to load individual types.
469  static void loadData(UT_IStream &is, int64 &v)
470  { is.bread(&v, 1); }
471  static void loadData(UT_IStream &is, bool &v)
472  { int64 iv; is.bread(&iv, 1); v = iv; }
473  static void loadData(UT_IStream &is, fpreal64 &v)
474  { is.bread<fpreal64>(&v, 1); }
475  static void loadData(UT_IStream &is, UT_Vector2D &v)
476  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
477  static void loadData(UT_IStream &is, UT_Vector3D &v)
478  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
479  is.bread<fpreal64>(&v.z(), 1); }
480  static void loadData(UT_IStream &is, UT_Vector4D &v)
481  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
482  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
483  static void loadData(UT_IStream &is, UT_Matrix2D &v)
484  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
485  static void loadData(UT_IStream &is, UT_Matrix3D &v)
486  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
487  static void loadData(UT_IStream &is, UT_Matrix4D &v)
488  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
489  static void loadData(UT_IStream &is, UT_Vector2I &v)
490  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
491  static void loadData(UT_IStream &is, UT_Vector3I &v)
492  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
493  is.bread<int64>(&v.z(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector4I &v)
495  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
496  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
498  { is.bread(v); }
500  { UT_StringHolder rampdata;
501  loadData(is, rampdata);
502  if (rampdata.isstring())
503  {
504  v.reset(new UT_Ramp());
505  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
506  v->load(istr);
507  }
508  else v.reset();
509  }
512  loadData(is, data);
513  if (data.isstring())
514  {
515  // Find the data type.
516  char *colon = UT_StringWrap(data).findChar(':');
517  if (colon)
518  {
519  int typelen = colon - data.buffer();
521  type.strncpy(data.buffer(), typelen);
522  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
523 
524  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
525  }
526  }
527  else v.reset();
528  }
529 
530  static void saveData(std::ostream &os, int64 v)
531  { UTwrite(os, &v); }
532  static void saveData(std::ostream &os, bool v)
533  { int64 iv = v; UTwrite(os, &iv); }
534  static void saveData(std::ostream &os, fpreal64 v)
535  { UTwrite<fpreal64>(os, &v); }
536  static void saveData(std::ostream &os, UT_Vector2D v)
537  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
538  static void saveData(std::ostream &os, UT_Vector3D v)
539  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
540  UTwrite<fpreal64>(os, &v.z()); }
541  static void saveData(std::ostream &os, UT_Vector4D v)
542  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
543  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
544  static void saveData(std::ostream &os, UT_Matrix2D v)
546  static void saveData(std::ostream &os, UT_Matrix3D v)
548  static void saveData(std::ostream &os, UT_Matrix4D v)
550  static void saveData(std::ostream &os, UT_StringHolder s)
551  { UT_StringWrap(s).saveBinary(os); }
552  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
553  { UT_StringHolder result;
554  UT_OStringStream ostr;
555  if (s) s->save(ostr);
556  result = ostr.str();
557  saveData(os, result);
558  }
559  static void saveData(std::ostream &os, PRM_DataItemHandle s)
560  { UT_StringHolder result;
561  UT_OStringStream ostr;
562  if (s)
563  {
564  ostr << s->getDataTypeToken();
565  ostr << ":";
566  s->saveBinary(ostr);
567  }
568  result = ostr.str();
569  saveData(os, result);
570  }
571 
572 
573  void save(std::ostream &os) const
574  {
575  int32 v = version();
576  UTwrite(os, &v);
577  saveData(os, myGroup);
578  saveData(os, myField);
579  saveData(os, myName);
580  saveData(os, myCreateVarMap);
581  saveData(os, myVarName);
582  saveData(os, myType);
583  saveData(os, mySize);
584  saveData(os, myDefault);
585  saveData(os, myRangeIn);
586  saveData(os, myMonoEnable);
587  saveData(os, myMonoRampMode);
588  saveData(os, myMonopreset);
589  saveData(os, myMonoRamp);
590  saveData(os, myVectorEnable);
591  saveData(os, myVectorRampMode);
592  saveData(os, myVectorpreset);
593  saveData(os, myVectorRamp);
594  saveData(os, myRangeOut);
595 
596  }
597 
598  bool load(UT_IStream &is)
599  {
600  int32 v;
601  is.bread(&v, 1);
602  if (version() != v)
603  {
604  // Fail incompatible versions
605  return false;
606  }
607  loadData(is, myGroup);
608  loadData(is, myField);
609  loadData(is, myName);
610  loadData(is, myCreateVarMap);
611  loadData(is, myVarName);
612  loadData(is, myType);
613  loadData(is, mySize);
614  loadData(is, myDefault);
615  loadData(is, myRangeIn);
616  loadData(is, myMonoEnable);
617  loadData(is, myMonoRampMode);
618  loadData(is, myMonopreset);
619  loadData(is, myMonoRamp);
620  loadData(is, myVectorEnable);
621  loadData(is, myVectorRampMode);
622  loadData(is, myVectorpreset);
623  loadData(is, myVectorRamp);
624  loadData(is, myRangeOut);
625 
626  return true;
627  }
628 
629  const UT_StringHolder & getGroup() const { return myGroup; }
630  void setGroup(const UT_StringHolder & val) { myGroup = val; }
632  {
633  SOP_Node *thissop = cookparms.getNode();
634  if (!thissop) return getGroup();
635  UT_StringHolder result;
636  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
637  return result;
638  }
639  const UT_StringHolder & getField() const { return myField; }
640  void setField(const UT_StringHolder & val) { myField = val; }
642  {
643  SOP_Node *thissop = cookparms.getNode();
644  if (!thissop) return getField();
645  UT_StringHolder result;
646  OP_Utils::evalOpParm(result, thissop, "field", cookparms.getCookTime(), 0);
647  return result;
648  }
649  const UT_StringHolder & getName() const { return myName; }
650  void setName(const UT_StringHolder & val) { myName = val; }
652  {
653  SOP_Node *thissop = cookparms.getNode();
654  if (!thissop) return getName();
655  UT_StringHolder result;
656  OP_Utils::evalOpParm(result, thissop, "name", cookparms.getCookTime(), 0);
657  return result;
658  }
659  bool getCreateVarMap() const { return myCreateVarMap; }
660  void setCreateVarMap(bool val) { myCreateVarMap = val; }
661  bool opCreateVarMap(const SOP_NodeVerb::CookParms &cookparms) const
662  {
663  SOP_Node *thissop = cookparms.getNode();
664  if (!thissop) return getCreateVarMap();
665  bool result;
666  OP_Utils::evalOpParm(result, thissop, "createvarmap", cookparms.getCookTime(), 0);
667  return result;
668  }
669  const UT_StringHolder & getVarName() const { return myVarName; }
670  void setVarName(const UT_StringHolder & val) { myVarName = val; }
672  {
673  SOP_Node *thissop = cookparms.getNode();
674  if (!thissop) return getVarName();
675  UT_StringHolder result;
676  OP_Utils::evalOpParm(result, thissop, "varname", cookparms.getCookTime(), 0);
677  return result;
678  }
679  Type getType() const { return Type(myType); }
680  void setType(Type val) { myType = int64(val); }
681  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
682  {
683  SOP_Node *thissop = cookparms.getNode();
684  if (!thissop) return getType();
685  int64 result;
686  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
687  return Type(result);
688  }
689  int64 getSize() const { return mySize; }
690  void setSize(int64 val) { mySize = val; }
691  int64 opSize(const SOP_NodeVerb::CookParms &cookparms) const
692  {
693  SOP_Node *thissop = cookparms.getNode();
694  if (!thissop) return getSize();
695  int64 result;
696  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
697  return result;
698  }
699  UT_Vector4D getDefault() const { return myDefault; }
700  void setDefault(UT_Vector4D val) { myDefault = val; }
702  {
703  SOP_Node *thissop = cookparms.getNode();
704  if (!thissop) return getDefault();
705  UT_Vector4D result;
706  OP_Utils::evalOpParm(result, thissop, "default", cookparms.getCookTime(), 0);
707  return result;
708  }
709  UT_Vector2D getRangeIn() const { return myRangeIn; }
710  void setRangeIn(UT_Vector2D val) { myRangeIn = val; }
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return getRangeIn();
715  UT_Vector2D result;
716  OP_Utils::evalOpParm(result, thissop, "rangein", cookparms.getCookTime(), 0);
717  return result;
718  }
719  bool getMonoEnable() const { return myMonoEnable; }
720  void setMonoEnable(bool val) { myMonoEnable = val; }
721  bool opMonoEnable(const SOP_NodeVerb::CookParms &cookparms) const
722  {
723  SOP_Node *thissop = cookparms.getNode();
724  if (!thissop) return getMonoEnable();
725  bool result;
726  OP_Utils::evalOpParm(result, thissop, "monoenable", cookparms.getCookTime(), 0);
727  return result;
728  }
729  MonoRampMode getMonoRampMode() const { return MonoRampMode(myMonoRampMode); }
730  void setMonoRampMode(MonoRampMode val) { myMonoRampMode = int64(val); }
732  {
733  SOP_Node *thissop = cookparms.getNode();
734  if (!thissop) return getMonoRampMode();
735  int64 result;
736  OP_Utils::evalOpParm(result, thissop, "monorampmode", cookparms.getCookTime(), 0);
737  return MonoRampMode(result);
738  }
739  Monopreset getMonopreset() const { return Monopreset(myMonopreset); }
740  void setMonopreset(Monopreset val) { myMonopreset = int64(val); }
742  {
743  SOP_Node *thissop = cookparms.getNode();
744  if (!thissop) return getMonopreset();
745  int64 result;
746  OP_Utils::evalOpParm(result, thissop, "monopreset", cookparms.getCookTime(), 0);
747  return Monopreset(result);
748  }
749  UT_SharedPtr<UT_Ramp> getMonoRamp() const { return myMonoRamp; }
750  void setMonoRamp(UT_SharedPtr<UT_Ramp> val) { myMonoRamp = val; }
752  {
753  SOP_Node *thissop = cookparms.getNode();
754  if (!thissop) return getMonoRamp();
755  UT_SharedPtr<UT_Ramp> result;
756  OP_Utils::evalOpParm(result, thissop, "monoramp", cookparms.getCookTime(), 0);
757  return result;
758  }
759  bool getVectorEnable() const { return myVectorEnable; }
760  void setVectorEnable(bool val) { myVectorEnable = val; }
761  bool opVectorEnable(const SOP_NodeVerb::CookParms &cookparms) const
762  {
763  SOP_Node *thissop = cookparms.getNode();
764  if (!thissop) return getVectorEnable();
765  bool result;
766  OP_Utils::evalOpParm(result, thissop, "vectorenable", cookparms.getCookTime(), 0);
767  return result;
768  }
769  VectorRampMode getVectorRampMode() const { return VectorRampMode(myVectorRampMode); }
770  void setVectorRampMode(VectorRampMode val) { myVectorRampMode = int64(val); }
772  {
773  SOP_Node *thissop = cookparms.getNode();
774  if (!thissop) return getVectorRampMode();
775  int64 result;
776  OP_Utils::evalOpParm(result, thissop, "vectorrampmode", cookparms.getCookTime(), 0);
777  return VectorRampMode(result);
778  }
779  Vectorpreset getVectorpreset() const { return Vectorpreset(myVectorpreset); }
780  void setVectorpreset(Vectorpreset val) { myVectorpreset = int64(val); }
782  {
783  SOP_Node *thissop = cookparms.getNode();
784  if (!thissop) return getVectorpreset();
785  int64 result;
786  OP_Utils::evalOpParm(result, thissop, "vectorpreset", cookparms.getCookTime(), 0);
787  return Vectorpreset(result);
788  }
789  UT_SharedPtr<UT_Ramp> getVectorRamp() const { return myVectorRamp; }
790  void setVectorRamp(UT_SharedPtr<UT_Ramp> val) { myVectorRamp = val; }
792  {
793  SOP_Node *thissop = cookparms.getNode();
794  if (!thissop) return getVectorRamp();
795  UT_SharedPtr<UT_Ramp> result;
796  OP_Utils::evalOpParm(result, thissop, "vectorramp", cookparms.getCookTime(), 0);
797  return result;
798  }
799  UT_Vector2D getRangeOut() const { return myRangeOut; }
800  void setRangeOut(UT_Vector2D val) { myRangeOut = val; }
802  {
803  SOP_Node *thissop = cookparms.getNode();
804  if (!thissop) return getRangeOut();
805  UT_Vector2D result;
806  OP_Utils::evalOpParm(result, thissop, "rangeout", cookparms.getCookTime(), 0);
807  return result;
808  }
809 
810 private:
811  UT_StringHolder myGroup;
812  UT_StringHolder myField;
813  UT_StringHolder myName;
814  bool myCreateVarMap;
815  UT_StringHolder myVarName;
816  int64 myType;
817  int64 mySize;
818  UT_Vector4D myDefault;
819  UT_Vector2D myRangeIn;
820  bool myMonoEnable;
821  int64 myMonoRampMode;
822  int64 myMonopreset;
823  UT_SharedPtr<UT_Ramp> myMonoRamp;
824  bool myVectorEnable;
825  int64 myVectorRampMode;
826  int64 myVectorpreset;
827  UT_SharedPtr<UT_Ramp> myVectorRamp;
828  UT_Vector2D myRangeOut;
829 
830 };
UT_SharedPtr< UT_Ramp > opVectorRamp(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector3D &value)
void getParmValue(exint idx, UT_Matrix2D &value) const
void setVectorRamp(UT_SharedPtr< UT_Ramp > val)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
void save(std::ostream &os) const
void doGetParmValue(exint idx, T &value) const
void setMonoRamp(UT_SharedPtr< UT_Ramp > val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_SharedPtr< UT_Ramp > opMonoRamp(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opRangeOut(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GT_API const UT_StringHolder time
void getParmValue(exint idx, PRM_DataItemHandle &value) const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector2T< fpreal64 > UT_Vector2D
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opVarName(const SOP_NodeVerb::CookParms &cookparms) const
virtual const char * getParmName(exint fieldnum) const
MonoRampMode opMonoRampMode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void setMonoRampMode(MonoRampMode val)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
virtual ParmType getParmType(exint fieldnum) const
UT_SharedPtr< UT_Ramp > getMonoRamp() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getParmValue(exint idx, UT_StringHolder &value) const
void getParmValue(exint idx, exint &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void setParmValue(exint idx, const UT_Matrix3D &value)
void setParmValue(exint idx, const fpreal &value)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
UT_Vector4D opDefault(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void doSetParmValue(exint idx, const T &value)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setName(const UT_StringHolder &val)
long long int64
Definition: SYS_Types.h:107
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
Vectorpreset opVectorpreset(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_Vector2D opRangeIn(const SOP_NodeVerb::CookParms &cookparms) const
bool opCreateVarMap(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void getParmValue(exint idx, UT_Matrix4D &value) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void loadData(UT_IStream &is, fpreal64 &v)
int64 exint
Definition: SYS_Types.h:116
const UT_StringHolder & getName() const
void setVectorRampMode(VectorRampMode val)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
void getParmValue(exint idx, fpreal &value) const
double fpreal64
Definition: SYS_Types.h:192
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getGroup() const
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
UT_StringHolder opField(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSize(const SOP_NodeVerb::CookParms &cookparms) const
void setVarName(const UT_StringHolder &val)
void setGroup(const UT_StringHolder &val)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Vector3D v)
GLboolean * data
Definition: glcorearb.h:130
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, bool &v)
int int32
Definition: SYS_Types.h:35
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
T & y(void)
Definition: UT_Vector4.h:377
static void saveData(std::ostream &os, int64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
bool operator==(const SOP_AttribFromVolumeParms &src) const
void setParmValue(exint idx, const UT_Matrix4D &value)
bool opVectorEnable(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setField(const UT_StringHolder &val)
UT_StringHolder opName(const SOP_NodeVerb::CookParms &cookparms) const
void setVectorpreset(Vectorpreset val)
static void saveData(std::ostream &os, bool v)
VectorRampMode getVectorRampMode() const
bool operator!=(const SOP_AttribFromVolumeParms &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void getParmValue(exint idx, UT_Vector2D &value) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, fpreal64 v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opMonoEnable(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
T & y(void)
Definition: UT_Vector2.h:287
const UT_StringHolder & getVarName() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_GeometryPredicates< REAL, false, true > & getDefault()
GLboolean r
Definition: glcorearb.h:1221
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector4T< fpreal64 > UT_Vector4D
T & w(void)
Definition: UT_Vector4.h:381
void setParmValue(exint idx, const exint &value)
const UT_StringHolder & getField() const
void getParmValue(exint idx, UT_Matrix3D &value) const
VectorRampMode opVectorRampMode(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< UT_Ramp > getVectorRamp() const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
Monopreset opMonopreset(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_Vector4D &value) const
void getParmValue(exint idx, UT_Vector3D &value) const
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setParmValue(exint idx, const UT_StringHolder &value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1792