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