HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  myVarName = ""_sh;
72  myType = 0;
73  mySize = 3;
74  myDefault = UT_Vector4D(0,0,0,0);
75  myRangeIn = UT_Vector2D(0,1);
76  myMonoEnable = false;
77  myMonoRampMode = 0;
78  myMonopreset = 0;
79  myMonoRamp = UT_SharedPtr<UT_Ramp>(0);
80  myVectorEnable = false;
81  myVectorRampMode = 0;
82  myVectorpreset = 0;
83  myVectorRamp = UT_SharedPtr<UT_Ramp>(0);
84  myRangeOut = UT_Vector2D(0,1);
85 
86  }
87 
88  explicit SOP_AttribFromVolumeParms(const SOP_AttribFromVolumeParms &) = default;
89 
91 
93  {
94  if (myGroup != src.myGroup) return false;
95  if (myField != src.myField) return false;
96  if (myName != src.myName) return false;
97  if (myVarName != src.myVarName) return false;
98  if (myType != src.myType) return false;
99  if (mySize != src.mySize) return false;
100  if (myDefault != src.myDefault) return false;
101  if (myRangeIn != src.myRangeIn) return false;
102  if (myMonoEnable != src.myMonoEnable) return false;
103  if (myMonoRampMode != src.myMonoRampMode) return false;
104  if (myMonopreset != src.myMonopreset) return false;
105  if (myMonoRamp != src.myMonoRamp) return false;
106  if (myVectorEnable != src.myVectorEnable) return false;
107  if (myVectorRampMode != src.myVectorRampMode) return false;
108  if (myVectorpreset != src.myVectorpreset) return false;
109  if (myVectorRamp != src.myVectorRamp) return false;
110  if (myRangeOut != src.myRangeOut) return false;
111 
112  return true;
113  }
119 
120 
121 
122  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
123  {
124  if (true)
125  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
126  else myGroup = ""_sh;
127  if (true)
128  OP_Utils::evalOpParm(myField, node, "field", time, 0);
129  else myField = ""_sh;
130  if (true)
131  OP_Utils::evalOpParm(myName, node, "name", time, 0);
132  else myName = "Cd"_sh;
133  if (true)
134  OP_Utils::evalOpParm(myVarName, node, "varname", time, 0);
135  else myVarName = ""_sh;
136  if (true)
137  OP_Utils::evalOpParm(myType, node, "type", time, 0);
138  else myType = 0;
139  if (true)
140  OP_Utils::evalOpParm(mySize, node, "size", time, 0);
141  else mySize = 3;
142  if (true)
143  OP_Utils::evalOpParm(myDefault, node, "default", time, 0);
144  else myDefault = UT_Vector4D(0,0,0,0);
145  if (true)
146  OP_Utils::evalOpParm(myRangeIn, node, "rangein", time, 0);
147  else myRangeIn = UT_Vector2D(0,1);
148  if (true)
149  OP_Utils::evalOpParm(myMonoEnable, node, "monoenable", time, 0);
150  else myMonoEnable = false;
151  if (true && ( (!(((getMonoEnable()==0)))) ) )
152  OP_Utils::evalOpParm(myMonoRampMode, node, "monorampmode", time, 0);
153  else myMonoRampMode = 0;
154  if (true && ( (!(((getMonoEnable()==0)))) ) )
155  OP_Utils::evalOpParm(myMonopreset, node, "monopreset", time, 0);
156  else myMonopreset = 0;
157  if (true && ( (!(((getMonoEnable()==0)))) ) )
158  OP_Utils::evalOpParm(myMonoRamp, node, "monoramp", time, 0);
159  else myMonoRamp = UT_SharedPtr<UT_Ramp>(0);
160  if (true)
161  OP_Utils::evalOpParm(myVectorEnable, node, "vectorenable", time, 0);
162  else myVectorEnable = false;
163  if (true && ( (!(((getVectorEnable()==0)))) ) )
164  OP_Utils::evalOpParm(myVectorRampMode, node, "vectorrampmode", time, 0);
165  else myVectorRampMode = 0;
166  if (true && ( (!(((getVectorEnable()==0)))) ) )
167  OP_Utils::evalOpParm(myVectorpreset, node, "vectorpreset", time, 0);
168  else myVectorpreset = 0;
169  if (true && ( (!(((getVectorEnable()==0)))) ) )
170  OP_Utils::evalOpParm(myVectorRamp, node, "vectorramp", time, 0);
171  else myVectorRamp = UT_SharedPtr<UT_Ramp>(0);
172  if (true)
173  OP_Utils::evalOpParm(myRangeOut, node, "rangeout", time, 0);
174  else myRangeOut = UT_Vector2D(0,1);
175 
176  }
177 
178 
179  virtual void loadFromOpSubclass(const LoadParms &loadparms)
180  {
181  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
182  }
183 
184 
185  virtual void copyFrom(const SOP_NodeParms *src)
186  {
187  *this = *((const SOP_AttribFromVolumeParms *)src);
188  }
189 
190  template <typename T>
191  void
192  doGetParmValue(exint idx, T &value) const
193  {
194  switch (idx)
195  {
196  case 0:
197  coerceValue(value, myGroup);
198  break;
199  case 1:
200  coerceValue(value, myField);
201  break;
202  case 2:
203  coerceValue(value, myName);
204  break;
205  case 3:
206  coerceValue(value, myVarName);
207  break;
208  case 4:
209  coerceValue(value, myType);
210  break;
211  case 5:
212  coerceValue(value, mySize);
213  break;
214  case 6:
215  coerceValue(value, myDefault);
216  break;
217  case 7:
218  coerceValue(value, myRangeIn);
219  break;
220  case 8:
221  coerceValue(value, myMonoEnable);
222  break;
223  case 9:
224  coerceValue(value, myMonoRampMode);
225  break;
226  case 10:
227  coerceValue(value, myMonopreset);
228  break;
229  case 11:
230  coerceValue(value, myMonoRamp);
231  break;
232  case 12:
233  coerceValue(value, myVectorEnable);
234  break;
235  case 13:
236  coerceValue(value, myVectorRampMode);
237  break;
238  case 14:
239  coerceValue(value, myVectorpreset);
240  break;
241  case 15:
242  coerceValue(value, myVectorRamp);
243  break;
244  case 16:
245  coerceValue(value, myRangeOut);
246  break;
247 
248  }
249  }
250 
251  void getParmValue(exint idx, exint &value) const
252  { doGetParmValue(idx, value); }
253  void getParmValue(exint idx, fpreal &value) const
254  { doGetParmValue(idx, value); }
256  { doGetParmValue(idx, value); }
258  { doGetParmValue(idx, value); }
260  { doGetParmValue(idx, value); }
262  { doGetParmValue(idx, value); }
264  { doGetParmValue(idx, value); }
266  { doGetParmValue(idx, value); }
268  { doGetParmValue(idx, value); }
270  { doGetParmValue(idx, value); }
272  { doGetParmValue(idx, value); }
273 
274  template <typename T>
275  void
276  doSetParmValue(exint idx, const T &value)
277  {
278  switch (idx)
279  {
280  case 0:
281  coerceValue(myGroup, value);
282  break;
283  case 1:
284  coerceValue(myField, value);
285  break;
286  case 2:
287  coerceValue(myName, value);
288  break;
289  case 3:
290  coerceValue(myVarName, value);
291  break;
292  case 4:
293  coerceValue(myType, value);
294  break;
295  case 5:
296  coerceValue(mySize, value);
297  break;
298  case 6:
299  coerceValue(myDefault, value);
300  break;
301  case 7:
302  coerceValue(myRangeIn, value);
303  break;
304  case 8:
305  coerceValue(myMonoEnable, value);
306  break;
307  case 9:
308  coerceValue(myMonoRampMode, value);
309  break;
310  case 10:
311  coerceValue(myMonopreset, value);
312  break;
313  case 11:
314  coerceValue(myMonoRamp, value);
315  break;
316  case 12:
317  coerceValue(myVectorEnable, value);
318  break;
319  case 13:
320  coerceValue(myVectorRampMode, value);
321  break;
322  case 14:
323  coerceValue(myVectorpreset, value);
324  break;
325  case 15:
326  coerceValue(myVectorRamp, value);
327  break;
328  case 16:
329  coerceValue(myRangeOut, value);
330  break;
331 
332  }
333  }
334 
335  void setParmValue(exint idx, const exint &value)
336  { doSetParmValue(idx, value); }
337  void setParmValue(exint idx, const fpreal &value)
338  { doSetParmValue(idx, value); }
339  void setParmValue(exint idx, const UT_Vector2D &value)
340  { doSetParmValue(idx, value); }
341  void setParmValue(exint idx, const UT_Vector3D &value)
342  { doSetParmValue(idx, value); }
343  void setParmValue(exint idx, const UT_Vector4D &value)
344  { doSetParmValue(idx, value); }
345  void setParmValue(exint idx, const UT_Matrix2D &value)
346  { doSetParmValue(idx, value); }
347  void setParmValue(exint idx, const UT_Matrix3D &value)
348  { doSetParmValue(idx, value); }
349  void setParmValue(exint idx, const UT_Matrix4D &value)
350  { doSetParmValue(idx, value); }
352  { doSetParmValue(idx, value); }
354  { doSetParmValue(idx, value); }
356  { doSetParmValue(idx, value); }
357 
358  virtual exint getNumParms() const
359  {
360  return 17;
361  }
362 
363  virtual const char *getParmName(exint fieldnum) const
364  {
365  switch (fieldnum)
366  {
367  case 0:
368  return "group";
369  case 1:
370  return "field";
371  case 2:
372  return "name";
373  case 3:
374  return "varname";
375  case 4:
376  return "type";
377  case 5:
378  return "size";
379  case 6:
380  return "default";
381  case 7:
382  return "rangein";
383  case 8:
384  return "monoenable";
385  case 9:
386  return "monorampmode";
387  case 10:
388  return "monopreset";
389  case 11:
390  return "monoramp";
391  case 12:
392  return "vectorenable";
393  case 13:
394  return "vectorrampmode";
395  case 14:
396  return "vectorpreset";
397  case 15:
398  return "vectorramp";
399  case 16:
400  return "rangeout";
401 
402  }
403  return 0;
404  }
405 
406  virtual ParmType getParmType(exint fieldnum) const
407  {
408  switch (fieldnum)
409  {
410  case 0:
411  return PARM_STRING;
412  case 1:
413  return PARM_STRING;
414  case 2:
415  return PARM_STRING;
416  case 3:
417  return PARM_STRING;
418  case 4:
419  return PARM_INTEGER;
420  case 5:
421  return PARM_INTEGER;
422  case 6:
423  return PARM_VECTOR4;
424  case 7:
425  return PARM_VECTOR2;
426  case 8:
427  return PARM_INTEGER;
428  case 9:
429  return PARM_INTEGER;
430  case 10:
431  return PARM_INTEGER;
432  case 11:
433  return PARM_RAMP;
434  case 12:
435  return PARM_INTEGER;
436  case 13:
437  return PARM_INTEGER;
438  case 14:
439  return PARM_INTEGER;
440  case 15:
441  return PARM_RAMP;
442  case 16:
443  return PARM_VECTOR2;
444 
445  }
446  return PARM_UNSUPPORTED;
447  }
448 
449  // Boiler plate to load individual types.
450  static void loadData(UT_IStream &is, int64 &v)
451  { is.bread(&v, 1); }
452  static void loadData(UT_IStream &is, bool &v)
453  { int64 iv; is.bread(&iv, 1); v = iv; }
454  static void loadData(UT_IStream &is, fpreal64 &v)
455  { is.bread<fpreal64>(&v, 1); }
456  static void loadData(UT_IStream &is, UT_Vector2D &v)
457  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector3D &v)
459  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
460  is.bread<fpreal64>(&v.z(), 1); }
461  static void loadData(UT_IStream &is, UT_Vector4D &v)
462  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
463  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
464  static void loadData(UT_IStream &is, UT_Matrix2D &v)
465  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
466  static void loadData(UT_IStream &is, UT_Matrix3D &v)
467  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
468  static void loadData(UT_IStream &is, UT_Matrix4D &v)
469  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
470  static void loadData(UT_IStream &is, UT_Vector2I &v)
471  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
472  static void loadData(UT_IStream &is, UT_Vector3I &v)
473  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
474  is.bread<int64>(&v.z(), 1); }
475  static void loadData(UT_IStream &is, UT_Vector4I &v)
476  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
477  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
479  { is.bread(v); }
481  { UT_StringHolder rampdata;
482  loadData(is, rampdata);
483  if (rampdata.isstring())
484  {
485  v.reset(new UT_Ramp());
486  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
487  v->load(istr);
488  }
489  else v.reset();
490  }
493  loadData(is, data);
494  if (data.isstring())
495  {
496  // Find the data type.
497  char *colon = UT_StringWrap(data).findChar(':');
498  if (colon)
499  {
500  int typelen = colon - data.buffer();
502  type.strncpy(data.buffer(), typelen);
503  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
504 
505  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
506  }
507  }
508  else v.reset();
509  }
510 
511  static void saveData(std::ostream &os, int64 v)
512  { UTwrite(os, &v); }
513  static void saveData(std::ostream &os, bool v)
514  { int64 iv = v; UTwrite(os, &iv); }
515  static void saveData(std::ostream &os, fpreal64 v)
516  { UTwrite<fpreal64>(os, &v); }
517  static void saveData(std::ostream &os, UT_Vector2D v)
518  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
519  static void saveData(std::ostream &os, UT_Vector3D v)
520  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
521  UTwrite<fpreal64>(os, &v.z()); }
522  static void saveData(std::ostream &os, UT_Vector4D v)
523  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
524  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
525  static void saveData(std::ostream &os, UT_Matrix2D v)
527  static void saveData(std::ostream &os, UT_Matrix3D v)
529  static void saveData(std::ostream &os, UT_Matrix4D v)
531  static void saveData(std::ostream &os, UT_StringHolder s)
532  { UT_StringWrap(s).saveBinary(os); }
533  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
534  { UT_StringHolder result;
535  UT_OStringStream ostr;
536  if (s) s->save(ostr);
537  result = ostr.str();
538  saveData(os, result);
539  }
540  static void saveData(std::ostream &os, PRM_DataItemHandle s)
541  { UT_StringHolder result;
542  UT_OStringStream ostr;
543  if (s)
544  {
545  ostr << s->getDataTypeToken();
546  ostr << ":";
547  s->saveBinary(ostr);
548  }
549  result = ostr.str();
550  saveData(os, result);
551  }
552 
553 
554  void save(std::ostream &os) const
555  {
556  int32 v = version();
557  UTwrite(os, &v);
558  saveData(os, myGroup);
559  saveData(os, myField);
560  saveData(os, myName);
561  saveData(os, myVarName);
562  saveData(os, myType);
563  saveData(os, mySize);
564  saveData(os, myDefault);
565  saveData(os, myRangeIn);
566  saveData(os, myMonoEnable);
567  saveData(os, myMonoRampMode);
568  saveData(os, myMonopreset);
569  saveData(os, myMonoRamp);
570  saveData(os, myVectorEnable);
571  saveData(os, myVectorRampMode);
572  saveData(os, myVectorpreset);
573  saveData(os, myVectorRamp);
574  saveData(os, myRangeOut);
575 
576  }
577 
578  bool load(UT_IStream &is)
579  {
580  int32 v;
581  is.bread(&v, 1);
582  if (version() != v)
583  {
584  // Fail incompatible versions
585  return false;
586  }
587  loadData(is, myGroup);
588  loadData(is, myField);
589  loadData(is, myName);
590  loadData(is, myVarName);
591  loadData(is, myType);
592  loadData(is, mySize);
593  loadData(is, myDefault);
594  loadData(is, myRangeIn);
595  loadData(is, myMonoEnable);
596  loadData(is, myMonoRampMode);
597  loadData(is, myMonopreset);
598  loadData(is, myMonoRamp);
599  loadData(is, myVectorEnable);
600  loadData(is, myVectorRampMode);
601  loadData(is, myVectorpreset);
602  loadData(is, myVectorRamp);
603  loadData(is, myRangeOut);
604 
605  return true;
606  }
607 
608  const UT_StringHolder & getGroup() const { return myGroup; }
609  void setGroup(const UT_StringHolder & val) { myGroup = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getGroup();
614  UT_StringHolder result;
615  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
616  return result;
617  }
618  const UT_StringHolder & getField() const { return myField; }
619  void setField(const UT_StringHolder & val) { myField = val; }
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getField();
624  UT_StringHolder result;
625  OP_Utils::evalOpParm(result, thissop, "field", cookparms.getCookTime(), 0);
626  return result;
627  }
628  const UT_StringHolder & getName() const { return myName; }
629  void setName(const UT_StringHolder & val) { myName = val; }
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getName();
634  UT_StringHolder result;
635  OP_Utils::evalOpParm(result, thissop, "name", cookparms.getCookTime(), 0);
636  return result;
637  }
638  const UT_StringHolder & getVarName() const { return myVarName; }
639  void setVarName(const UT_StringHolder & val) { myVarName = val; }
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getVarName();
644  UT_StringHolder result;
645  OP_Utils::evalOpParm(result, thissop, "varname", cookparms.getCookTime(), 0);
646  return result;
647  }
648  Type getType() const { return Type(myType); }
649  void setType(Type val) { myType = int64(val); }
650  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getType();
654  int64 result;
655  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
656  return Type(result);
657  }
658  int64 getSize() const { return mySize; }
659  void setSize(int64 val) { mySize = val; }
660  int64 opSize(const SOP_NodeVerb::CookParms &cookparms) const
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getSize();
664  int64 result;
665  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
666  return result;
667  }
668  UT_Vector4D getDefault() const { return myDefault; }
669  void setDefault(UT_Vector4D val) { myDefault = val; }
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getDefault();
674  UT_Vector4D result;
675  OP_Utils::evalOpParm(result, thissop, "default", cookparms.getCookTime(), 0);
676  return result;
677  }
678  UT_Vector2D getRangeIn() const { return myRangeIn; }
679  void setRangeIn(UT_Vector2D val) { myRangeIn = val; }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getRangeIn();
684  UT_Vector2D result;
685  OP_Utils::evalOpParm(result, thissop, "rangein", cookparms.getCookTime(), 0);
686  return result;
687  }
688  bool getMonoEnable() const { return myMonoEnable; }
689  void setMonoEnable(bool val) { myMonoEnable = val; }
690  bool opMonoEnable(const SOP_NodeVerb::CookParms &cookparms) const
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getMonoEnable();
694  bool result;
695  OP_Utils::evalOpParm(result, thissop, "monoenable", cookparms.getCookTime(), 0);
696  return result;
697  }
698  MonoRampMode getMonoRampMode() const { return MonoRampMode(myMonoRampMode); }
699  void setMonoRampMode(MonoRampMode val) { myMonoRampMode = int64(val); }
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getMonoRampMode();
704  int64 result;
705  OP_Utils::evalOpParm(result, thissop, "monorampmode", cookparms.getCookTime(), 0);
706  return MonoRampMode(result);
707  }
708  Monopreset getMonopreset() const { return Monopreset(myMonopreset); }
709  void setMonopreset(Monopreset val) { myMonopreset = int64(val); }
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getMonopreset();
714  int64 result;
715  OP_Utils::evalOpParm(result, thissop, "monopreset", cookparms.getCookTime(), 0);
716  return Monopreset(result);
717  }
718  UT_SharedPtr<UT_Ramp> getMonoRamp() const { return myMonoRamp; }
719  void setMonoRamp(UT_SharedPtr<UT_Ramp> val) { myMonoRamp = val; }
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getMonoRamp();
724  UT_SharedPtr<UT_Ramp> result;
725  OP_Utils::evalOpParm(result, thissop, "monoramp", cookparms.getCookTime(), 0);
726  return result;
727  }
728  bool getVectorEnable() const { return myVectorEnable; }
729  void setVectorEnable(bool val) { myVectorEnable = val; }
730  bool opVectorEnable(const SOP_NodeVerb::CookParms &cookparms) const
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getVectorEnable();
734  bool result;
735  OP_Utils::evalOpParm(result, thissop, "vectorenable", cookparms.getCookTime(), 0);
736  return result;
737  }
738  VectorRampMode getVectorRampMode() const { return VectorRampMode(myVectorRampMode); }
739  void setVectorRampMode(VectorRampMode val) { myVectorRampMode = int64(val); }
741  {
742  SOP_Node *thissop = cookparms.getNode();
743  if (!thissop) return getVectorRampMode();
744  int64 result;
745  OP_Utils::evalOpParm(result, thissop, "vectorrampmode", cookparms.getCookTime(), 0);
746  return VectorRampMode(result);
747  }
748  Vectorpreset getVectorpreset() const { return Vectorpreset(myVectorpreset); }
749  void setVectorpreset(Vectorpreset val) { myVectorpreset = int64(val); }
751  {
752  SOP_Node *thissop = cookparms.getNode();
753  if (!thissop) return getVectorpreset();
754  int64 result;
755  OP_Utils::evalOpParm(result, thissop, "vectorpreset", cookparms.getCookTime(), 0);
756  return Vectorpreset(result);
757  }
758  UT_SharedPtr<UT_Ramp> getVectorRamp() const { return myVectorRamp; }
759  void setVectorRamp(UT_SharedPtr<UT_Ramp> val) { myVectorRamp = val; }
761  {
762  SOP_Node *thissop = cookparms.getNode();
763  if (!thissop) return getVectorRamp();
764  UT_SharedPtr<UT_Ramp> result;
765  OP_Utils::evalOpParm(result, thissop, "vectorramp", cookparms.getCookTime(), 0);
766  return result;
767  }
768  UT_Vector2D getRangeOut() const { return myRangeOut; }
769  void setRangeOut(UT_Vector2D val) { myRangeOut = val; }
771  {
772  SOP_Node *thissop = cookparms.getNode();
773  if (!thissop) return getRangeOut();
774  UT_Vector2D result;
775  OP_Utils::evalOpParm(result, thissop, "rangeout", cookparms.getCookTime(), 0);
776  return result;
777  }
778 
779 private:
780  UT_StringHolder myGroup;
781  UT_StringHolder myField;
782  UT_StringHolder myName;
783  UT_StringHolder myVarName;
784  int64 myType;
785  int64 mySize;
786  UT_Vector4D myDefault;
787  UT_Vector2D myRangeIn;
788  bool myMonoEnable;
789  int64 myMonoRampMode;
790  int64 myMonopreset;
791  UT_SharedPtr<UT_Ramp> myMonoRamp;
792  bool myVectorEnable;
793  int64 myVectorRampMode;
794  int64 myVectorpreset;
795  UT_SharedPtr<UT_Ramp> myVectorRamp;
796  UT_Vector2D myRangeOut;
797 
798 };
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:492
T & z(void)
Definition: UT_Vector4.h:372
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)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
fpreal getTime() const
Definition: OP_Context.h:34
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)
T & x(void)
Definition: UT_Vector2.h:284
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:581
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:585
void setName(const UT_StringHolder &val)
long long int64
Definition: SYS_Types.h:106
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
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
static void loadData(UT_IStream &is, fpreal64 &v)
int64 exint
Definition: SYS_Types.h:115
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:191
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:34
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
T & y(void)
Definition: UT_Vector4.h:370
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)
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:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:269
void strncpy(const char *src, exint maxlen)
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
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)
const char * buffer() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
T & x(void)
Definition: UT_Vector4.h:368
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:286
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:374
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
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)
GLenum src
Definition: glcorearb.h:1792