HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_VolumeVop.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_VolumeVopEnums
22 {
23  enum class Vexsrc
24  {
25  MYSELF = 0,
26  SHOP,
27  SCRIPT
28  };
29 }
30 
31 
33 {
34 public:
35  static int version() { return 1; }
36  struct Bindings
37  {
41 
42 
44  {
45  bindprimname = ""_sh;
46  bindprim = 0;
47  bindname = ""_sh;
48 
49  }
50 
51  bool operator==(const Bindings &src) const
52  {
53  if (bindprimname != src.bindprimname) return false;
54  if (bindprim != src.bindprim) return false;
55  if (bindname != src.bindname) return false;
56 
57  return true;
58  }
59 
60  };
61 
63  {
65 
66  buf.strcat("[ ");
67  for (int i = 0; i < list.entries(); i++)
68  {
69  if (i)
70  buf.strcat(", ");
71  buf.strcat("( ");
72  buf.append("");
73  { UT_String tmp; tmp = UT_StringWrap(list(i).bindprimname).makeQuotedString('"'); buf.strcat(tmp); }
74  buf.append(", ");
75  buf.appendSprintf("%d", (int) list(i).bindprim);
76  buf.append(", ");
77  { UT_String tmp; tmp = UT_StringWrap(list(i).bindname).makeQuotedString('"'); buf.strcat(tmp); }
78 
79  buf.strcat(" )");
80  }
81  buf.strcat(" ]");
82 
83  UT_StringHolder result = buf;
84  return result;
85  }
86 
88  {
89  myVexsrc = 0;
90  myShoppath = ""_sh;
91  myScript = "null"_sh;
92  myVop_compiler = "vcc -q $VOP_INCLUDEPATH -o $VOP_OBJECTFILE -e $VOP_ERRORFILE $VOP_SOURCEFILE"_sh;
93  myVex_cwdpath = ""_sh;
94  myVex_outputmask = "*"_sh;
95  myVex_multithread = false;
96  myVex_geometrygenerator = false;
97  myVdb_signedflood = false;
98  myAutobind = false;
99  myBindeach = false;
100 
101  }
102 
103  explicit SOP_VolumeVopParms(const SOP_VolumeVopParms &) = default;
104 
105  virtual ~SOP_VolumeVopParms() {}
106 
107  bool operator==(const SOP_VolumeVopParms &src) const
108  {
109  if (myVexsrc != src.myVexsrc) return false;
110  if (myShoppath != src.myShoppath) return false;
111  if (myScript != src.myScript) return false;
112  if (myVop_compiler != src.myVop_compiler) return false;
113  if (myVex_cwdpath != src.myVex_cwdpath) return false;
114  if (myVex_outputmask != src.myVex_outputmask) return false;
115  if (myVex_multithread != src.myVex_multithread) return false;
116  if (myVex_geometrygenerator != src.myVex_geometrygenerator) return false;
117  if (myVdb_signedflood != src.myVdb_signedflood) return false;
118  if (myAutobind != src.myAutobind) return false;
119  if (myBindeach != src.myBindeach) return false;
120  if (myBindings != src.myBindings) return false;
121 
122  return true;
123  }
125 
126 
127 
128  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
129  {
130  if (true)
131  OP_Utils::evalOpParm(myVexsrc, node, "vexsrc", time, 0);
132  else myVexsrc = 0;
133  if (true && ( (!(((int64(getVexsrc())!=1)))) ) )
134  OP_Utils::evalOpParm(myShoppath, node, "shoppath", time, 0);
135  else myShoppath = ""_sh;
136  if (true && ( (!(((int64(getVexsrc())!=2)))) ) )
137  OP_Utils::evalOpParm(myScript, node, "script", time, 0);
138  else myScript = "null"_sh;
139  if (true && ( (!(((int64(getVexsrc())!=0)))) ) )
140  OP_Utils::evalOpParm(myVop_compiler, node, "vop_compiler", time, 0);
141  else myVop_compiler = "vcc -q $VOP_INCLUDEPATH -o $VOP_OBJECTFILE -e $VOP_ERRORFILE $VOP_SOURCEFILE"_sh;
142  if (true)
143  OP_Utils::evalOpParm(myVex_cwdpath, node, "vex_cwdpath", time, 0);
144  else myVex_cwdpath = ""_sh;
145  if (true)
146  OP_Utils::evalOpParm(myVex_outputmask, node, "vex_outputmask", time, 0);
147  else myVex_outputmask = "*"_sh;
148  if (true)
149  OP_Utils::evalOpParm(myVex_multithread, node, "vex_multithread", time, 0);
150  else myVex_multithread = false;
151  if (true)
152  OP_Utils::evalOpParm(myVex_geometrygenerator, node, "vex_geometrygenerator", time, 0);
153  else myVex_geometrygenerator = false;
154  if (true)
155  OP_Utils::evalOpParm(myVdb_signedflood, node, "vdb_signedflood", time, 0);
156  else myVdb_signedflood = false;
157  if (true)
158  OP_Utils::evalOpParm(myAutobind, node, "autobind", time, 0);
159  else myAutobind = false;
160  if (true && ( (!(((getAutobind()==1)))) ) )
161  OP_Utils::evalOpParm(myBindeach, node, "bindeach", time, 0);
162  else myBindeach = false;
163  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) )
164  {
165  int64 length;
166  OP_Utils::evalOpParm(length, node, "bindings", time, 0);
167  myBindings.entries(length);
168  for (exint i = 0; i < length; i++)
169  {
170  int parmidx = i+1;
171  auto && _curentry = myBindings(i);
172  (void) _curentry;
173  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
174  OP_Utils::evalOpParmInst(myBindings(i).bindprimname, node, "bindprimname#", &parmidx, time, 0);
175  else myBindings(i).bindprimname = ""_sh;
176  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
177  OP_Utils::evalOpParmInst(myBindings(i).bindprim, node, "bindprim#", &parmidx, time, 0);
178  else myBindings(i).bindprim = 0;
179  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
180  OP_Utils::evalOpParmInst(myBindings(i).bindname, node, "bindname#", &parmidx, time, 0);
181  else myBindings(i).bindname = ""_sh;
182 
183  }
184  }
185  else
186  myBindings.clear();
187 
188  }
189 
190 
191  virtual void loadFromOpSubclass(const LoadParms &loadparms)
192  {
193  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
194  }
195 
196 
197  virtual void copyFrom(const SOP_NodeParms *src)
198  {
199  *this = *((const SOP_VolumeVopParms *)src);
200  }
201 
202  template <typename T>
203  void
204  doGetParmValue(exint idx, T &value) const
205  {
206  switch (idx)
207  {
208  case 0:
209  coerceValue(value, myVexsrc);
210  break;
211  case 1:
212  coerceValue(value, myShoppath);
213  break;
214  case 2:
215  coerceValue(value, myScript);
216  break;
217  case 3:
218  coerceValue(value, myVop_compiler);
219  break;
220  case 4:
221  coerceValue(value, myVex_cwdpath);
222  break;
223  case 5:
224  coerceValue(value, myVex_outputmask);
225  break;
226  case 6:
227  coerceValue(value, myVex_multithread);
228  break;
229  case 7:
230  coerceValue(value, myVex_geometrygenerator);
231  break;
232  case 8:
233  coerceValue(value, myVdb_signedflood);
234  break;
235  case 9:
236  coerceValue(value, myAutobind);
237  break;
238  case 10:
239  coerceValue(value, myBindeach);
240  break;
241 
242  }
243  }
244 
245  void getParmValue(exint idx, exint &value) const
246  { doGetParmValue(idx, value); }
247  void getParmValue(exint idx, fpreal &value) const
248  { doGetParmValue(idx, value); }
250  { doGetParmValue(idx, value); }
252  { doGetParmValue(idx, value); }
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); }
267 
268  template <typename T>
269  void
270  doSetParmValue(exint idx, const T &value)
271  {
272  switch (idx)
273  {
274  case 0:
275  coerceValue(myVexsrc, value);
276  break;
277  case 1:
278  coerceValue(myShoppath, value);
279  break;
280  case 2:
281  coerceValue(myScript, value);
282  break;
283  case 3:
284  coerceValue(myVop_compiler, value);
285  break;
286  case 4:
287  coerceValue(myVex_cwdpath, value);
288  break;
289  case 5:
290  coerceValue(myVex_outputmask, value);
291  break;
292  case 6:
293  coerceValue(myVex_multithread, value);
294  break;
295  case 7:
296  coerceValue(myVex_geometrygenerator, value);
297  break;
298  case 8:
299  coerceValue(myVdb_signedflood, value);
300  break;
301  case 9:
302  coerceValue(myAutobind, value);
303  break;
304  case 10:
305  coerceValue(myBindeach, value);
306  break;
307 
308  }
309  }
310 
311  void setParmValue(exint idx, const exint &value)
312  { doSetParmValue(idx, value); }
313  void setParmValue(exint idx, const fpreal &value)
314  { doSetParmValue(idx, value); }
315  void setParmValue(exint idx, const UT_Vector2D &value)
316  { doSetParmValue(idx, value); }
317  void setParmValue(exint idx, const UT_Vector3D &value)
318  { doSetParmValue(idx, value); }
319  void setParmValue(exint idx, const UT_Vector4D &value)
320  { doSetParmValue(idx, value); }
321  void setParmValue(exint idx, const UT_Matrix2D &value)
322  { doSetParmValue(idx, value); }
323  void setParmValue(exint idx, const UT_Matrix3D &value)
324  { doSetParmValue(idx, value); }
325  void setParmValue(exint idx, const UT_Matrix4D &value)
326  { doSetParmValue(idx, value); }
328  { doSetParmValue(idx, value); }
330  { doSetParmValue(idx, value); }
332  { doSetParmValue(idx, value); }
333 
334  virtual exint getNumParms() const
335  {
336  return 12;
337  }
338 
339  virtual const char *getParmName(exint fieldnum) const
340  {
341  switch (fieldnum)
342  {
343  case 0:
344  return "vexsrc";
345  case 1:
346  return "shoppath";
347  case 2:
348  return "script";
349  case 3:
350  return "vop_compiler";
351  case 4:
352  return "vex_cwdpath";
353  case 5:
354  return "vex_outputmask";
355  case 6:
356  return "vex_multithread";
357  case 7:
358  return "vex_geometrygenerator";
359  case 8:
360  return "vdb_signedflood";
361  case 9:
362  return "autobind";
363  case 10:
364  return "bindeach";
365  case 11:
366  return "bindings";
367 
368  }
369  return 0;
370  }
371 
372  virtual ParmType getParmType(exint fieldnum) const
373  {
374  switch (fieldnum)
375  {
376  case 0:
377  return PARM_INTEGER;
378  case 1:
379  return PARM_STRING;
380  case 2:
381  return PARM_STRING;
382  case 3:
383  return PARM_STRING;
384  case 4:
385  return PARM_STRING;
386  case 5:
387  return PARM_STRING;
388  case 6:
389  return PARM_INTEGER;
390  case 7:
391  return PARM_INTEGER;
392  case 8:
393  return PARM_INTEGER;
394  case 9:
395  return PARM_INTEGER;
396  case 10:
397  return PARM_INTEGER;
398 
399  }
400  return PARM_UNSUPPORTED;
401  }
402 
403  // Boiler plate to load individual types.
404  static void loadData(UT_IStream &is, int64 &v)
405  { is.bread(&v, 1); }
406  static void loadData(UT_IStream &is, bool &v)
407  { int64 iv; is.bread(&iv, 1); v = iv; }
408  static void loadData(UT_IStream &is, fpreal64 &v)
409  { is.bread<fpreal64>(&v, 1); }
410  static void loadData(UT_IStream &is, UT_Vector2D &v)
411  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
412  static void loadData(UT_IStream &is, UT_Vector3D &v)
413  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
414  is.bread<fpreal64>(&v.z(), 1); }
415  static void loadData(UT_IStream &is, UT_Vector4D &v)
416  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
417  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
418  static void loadData(UT_IStream &is, UT_Matrix2D &v)
419  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
420  static void loadData(UT_IStream &is, UT_Matrix3D &v)
421  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
422  static void loadData(UT_IStream &is, UT_Matrix4D &v)
423  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
424  static void loadData(UT_IStream &is, UT_Vector2I &v)
425  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector3I &v)
427  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
428  is.bread<int64>(&v.z(), 1); }
429  static void loadData(UT_IStream &is, UT_Vector4I &v)
430  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
431  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
433  { is.bread(v); }
435  { UT_StringHolder rampdata;
436  loadData(is, rampdata);
437  if (rampdata.isstring())
438  {
439  v.reset(new UT_Ramp());
440  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
441  v->load(istr);
442  }
443  else v.reset();
444  }
447  loadData(is, data);
448  if (data.isstring())
449  {
450  // Find the data type.
451  char *colon = UT_StringWrap(data).findChar(':');
452  if (colon)
453  {
454  int typelen = colon - data.buffer();
456  type.strncpy(data.buffer(), typelen);
457  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
458 
459  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
460  }
461  }
462  else v.reset();
463  }
464 
465  static void saveData(std::ostream &os, int64 v)
466  { UTwrite(os, &v); }
467  static void saveData(std::ostream &os, bool v)
468  { int64 iv = v; UTwrite(os, &iv); }
469  static void saveData(std::ostream &os, fpreal64 v)
470  { UTwrite<fpreal64>(os, &v); }
471  static void saveData(std::ostream &os, UT_Vector2D v)
472  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
473  static void saveData(std::ostream &os, UT_Vector3D v)
474  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
475  UTwrite<fpreal64>(os, &v.z()); }
476  static void saveData(std::ostream &os, UT_Vector4D v)
477  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
478  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
479  static void saveData(std::ostream &os, UT_Matrix2D v)
481  static void saveData(std::ostream &os, UT_Matrix3D v)
483  static void saveData(std::ostream &os, UT_Matrix4D v)
485  static void saveData(std::ostream &os, UT_StringHolder s)
486  { UT_StringWrap(s).saveBinary(os); }
487  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
488  { UT_StringHolder result;
489  UT_OStringStream ostr;
490  if (s) s->save(ostr);
491  result = ostr.str();
492  saveData(os, result);
493  }
494  static void saveData(std::ostream &os, PRM_DataItemHandle s)
495  { UT_StringHolder result;
496  UT_OStringStream ostr;
497  if (s)
498  {
499  ostr << s->getDataTypeToken();
500  ostr << ":";
501  s->saveBinary(ostr);
502  }
503  result = ostr.str();
504  saveData(os, result);
505  }
506 
507 
508  void save(std::ostream &os) const
509  {
510  int32 v = version();
511  UTwrite(os, &v);
512  saveData(os, myVexsrc);
513  saveData(os, myShoppath);
514  saveData(os, myScript);
515  saveData(os, myVop_compiler);
516  saveData(os, myVex_cwdpath);
517  saveData(os, myVex_outputmask);
518  saveData(os, myVex_multithread);
519  saveData(os, myVex_geometrygenerator);
520  saveData(os, myVdb_signedflood);
521  saveData(os, myAutobind);
522  saveData(os, myBindeach);
523  {
524  int64 length = myBindings.entries();
525  UTwrite(os, &length);
526  for (exint i = 0; i < length; i++)
527  {
528  saveData(os, myBindings(i).bindprimname);
529  saveData(os, myBindings(i).bindprim);
530  saveData(os, myBindings(i).bindname);
531 
532  }
533  }
534 
535  }
536 
537  bool load(UT_IStream &is)
538  {
539  int32 v;
540  is.bread(&v, 1);
541  if (version() != v)
542  {
543  // Fail incompatible versions
544  return false;
545  }
546  loadData(is, myVexsrc);
547  loadData(is, myShoppath);
548  loadData(is, myScript);
549  loadData(is, myVop_compiler);
550  loadData(is, myVex_cwdpath);
551  loadData(is, myVex_outputmask);
552  loadData(is, myVex_multithread);
553  loadData(is, myVex_geometrygenerator);
554  loadData(is, myVdb_signedflood);
555  loadData(is, myAutobind);
556  loadData(is, myBindeach);
557  {
558  int64 length;
559  is.read(&length, 1);
560  myBindings.entries(length);
561  for (exint i = 0; i < length; i++)
562  {
563  loadData(is, myBindings(i).bindprimname);
564  loadData(is, myBindings(i).bindprim);
565  loadData(is, myBindings(i).bindname);
566 
567  }
568  }
569 
570  return true;
571  }
572 
573  Vexsrc getVexsrc() const { return Vexsrc(myVexsrc); }
574  void setVexsrc(Vexsrc val) { myVexsrc = int64(val); }
575  Vexsrc opVexsrc(const SOP_NodeVerb::CookParms &cookparms) const
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getVexsrc();
579  int64 result;
580  OP_Utils::evalOpParm(result, thissop, "vexsrc", cookparms.getCookTime(), 0);
581  return Vexsrc(result);
582  }
583  const UT_StringHolder & getShoppath() const { return myShoppath; }
584  void setShoppath(const UT_StringHolder & val) { myShoppath = val; }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getShoppath();
589  UT_StringHolder result;
590  OP_Utils::evalOpParm(result, thissop, "shoppath", cookparms.getCookTime(), 0);
591  return result;
592  }
593  const UT_StringHolder & getScript() const { return myScript; }
594  void setScript(const UT_StringHolder & val) { myScript = val; }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getScript();
599  UT_StringHolder result;
600  OP_Utils::evalOpParm(result, thissop, "script", cookparms.getCookTime(), 0);
601  return result;
602  }
603  const UT_StringHolder & getVop_compiler() const { return myVop_compiler; }
604  void setVop_compiler(const UT_StringHolder & val) { myVop_compiler = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getVop_compiler();
609  UT_StringHolder result;
610  OP_Utils::evalOpParm(result, thissop, "vop_compiler", cookparms.getCookTime(), 0);
611  return result;
612  }
613  const UT_StringHolder & getVex_cwdpath() const { return myVex_cwdpath; }
614  void setVex_cwdpath(const UT_StringHolder & val) { myVex_cwdpath = val; }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getVex_cwdpath();
619  UT_StringHolder result;
620  OP_Utils::evalOpParm(result, thissop, "vex_cwdpath", cookparms.getCookTime(), 0);
621  return result;
622  }
623  const UT_StringHolder & getVex_outputmask() const { return myVex_outputmask; }
624  void setVex_outputmask(const UT_StringHolder & val) { myVex_outputmask = val; }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getVex_outputmask();
629  UT_StringHolder result;
630  OP_Utils::evalOpParm(result, thissop, "vex_outputmask", cookparms.getCookTime(), 0);
631  return result;
632  }
633  bool getVex_multithread() const { return myVex_multithread; }
634  void setVex_multithread(bool val) { myVex_multithread = val; }
635  bool opVex_multithread(const SOP_NodeVerb::CookParms &cookparms) const
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getVex_multithread();
639  bool result;
640  OP_Utils::evalOpParm(result, thissop, "vex_multithread", cookparms.getCookTime(), 0);
641  return result;
642  }
643  bool getVex_geometrygenerator() const { return myVex_geometrygenerator; }
644  void setVex_geometrygenerator(bool val) { myVex_geometrygenerator = val; }
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getVex_geometrygenerator();
649  bool result;
650  OP_Utils::evalOpParm(result, thissop, "vex_geometrygenerator", cookparms.getCookTime(), 0);
651  return result;
652  }
653  bool getVdb_signedflood() const { return myVdb_signedflood; }
654  void setVdb_signedflood(bool val) { myVdb_signedflood = val; }
655  bool opVdb_signedflood(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getVdb_signedflood();
659  bool result;
660  OP_Utils::evalOpParm(result, thissop, "vdb_signedflood", cookparms.getCookTime(), 0);
661  return result;
662  }
663  bool getAutobind() const { return myAutobind; }
664  void setAutobind(bool val) { myAutobind = val; }
665  bool opAutobind(const SOP_NodeVerb::CookParms &cookparms) const
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getAutobind();
669  bool result;
670  OP_Utils::evalOpParm(result, thissop, "autobind", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getBindeach() const { return myBindeach; }
674  void setBindeach(bool val) { myBindeach = val; }
675  bool opBindeach(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getBindeach();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "bindeach", cookparms.getCookTime(), 0);
681  return result;
682  }
683  const UT_Array<Bindings> &getBindings() const { return myBindings; }
684  void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
685  exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getBindings().entries();
689  exint result;
690  OP_Utils::evalOpParm(result, thissop, "bindings", cookparms.getCookTime(), 0);
691  return result;
692  }
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return (myBindings(_idx).bindprimname);
697  int _parmidx = _idx + 1;
698  UT_StringHolder result;
699  OP_Utils::evalOpParmInst(result, thissop, "bindprimname#", &_parmidx, cookparms.getCookTime(), 0);
700  return (result);
701  }
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return (myBindings(_idx).bindprim);
706  int _parmidx = _idx + 1;
707  int64 result;
708  OP_Utils::evalOpParmInst(result, thissop, "bindprim#", &_parmidx, cookparms.getCookTime(), 0);
709  return (result);
710  }
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return (myBindings(_idx).bindname);
715  int _parmidx = _idx + 1;
716  UT_StringHolder result;
717  OP_Utils::evalOpParmInst(result, thissop, "bindname#", &_parmidx, cookparms.getCookTime(), 0);
718  return (result);
719  }
720 
721 
722 private:
723  int64 myVexsrc;
724  UT_StringHolder myShoppath;
725  UT_StringHolder myScript;
726  UT_StringHolder myVop_compiler;
727  UT_StringHolder myVex_cwdpath;
728  UT_StringHolder myVex_outputmask;
729  bool myVex_multithread;
730  bool myVex_geometrygenerator;
731  bool myVdb_signedflood;
732  bool myAutobind;
733  bool myBindeach;
734  UT_Array<Bindings> myBindings;
735 
736 };
int64 opBindings_bindprim(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setParmValue(exint idx, const exint &value)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
static void saveData(std::ostream &os, UT_Vector4D v)
T & z(void)
Definition: UT_Vector4.h:372
UT_StringHolder opBindings_bindprimname(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool getVex_multithread() const
static void saveData(std::ostream &os, int64 v)
void setBindeach(bool val)
bool opVex_geometrygenerator(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getShoppath() const
exint bread(int32 *buffer, exint asize=1)
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
void setParmValue(exint idx, const UT_Matrix3D &value)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
bool opVdb_signedflood(const SOP_NodeVerb::CookParms &cookparms) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
virtual ParmType getParmType(exint fieldnum) const
void setVex_geometrygenerator(bool val)
T & x(void)
Definition: UT_Vector2.h:284
UT_StringHolder opShoppath(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
An output stream object that owns its own string buffer storage.
virtual exint getNumParms() const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void setVex_cwdpath(const UT_StringHolder &val)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
void setBindings(const UT_Array< Bindings > &val)
void getParmValue(exint idx, UT_Matrix2D &value) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
png_uint_32 i
Definition: png.h:2877
void setVexsrc(Vexsrc val)
UT_StringHolder opVex_cwdpath(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_VolumeVopParms &src) const
static void saveData(std::ostream &os, fpreal64 v)
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
const UT_StringHolder & getScript() const
UT_StringHolder opVop_compiler(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:106
Vexsrc opVexsrc(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setParmValue(exint idx, const fpreal &value)
void append(char character)
SYS_FORCE_INLINE const char * buffer() const
int64 exint
Definition: SYS_Types.h:115
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:191
void getParmValue(exint idx, UT_Matrix4D &value) const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:280
void setAutobind(bool val)
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getVex_cwdpath() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opBindeach(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Bindings &src) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setVop_compiler(const UT_StringHolder &val)
void setParmValue(exint idx, const UT_StringHolder &value)
GLboolean * data
Definition: glcorearb.h:130
void setParmValue(exint idx, const UT_Matrix4D &value)
void getParmValue(exint idx, UT_StringHolder &value) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
int int32
Definition: SYS_Types.h:34
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
T & y(void)
Definition: UT_Vector4.h:370
Vexsrc getVexsrc() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
void getParmValue(exint idx, fpreal &value) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:446
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getParmValue(exint idx, UT_Vector2D &value) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
UT_StringHolder opScript(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
UT_StringHolder opBindings_bindname(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void save(std::ostream &os) const
void strncpy(const char *src, exint maxlen)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const UT_StringHolder & getVex_outputmask() const
static void saveData(std::ostream &os, UT_Vector3D v)
virtual const char * getParmName(exint fieldnum) const
void getParmValue(exint idx, UT_Vector4D &value) const
void getParmValue(exint idx, UT_Vector3D &value) const
static void loadData(UT_IStream &is, fpreal64 &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void setVex_outputmask(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setVdb_signedflood(bool val)
#define SOP_API
Definition: SOP_API.h:10
bool opAutobind(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void doSetParmValue(exint idx, const T &value)
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
void setParmValue(exint idx, const UT_Vector3D &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_Array< Bindings > & getBindings() const
T & y(void)
Definition: UT_Vector2.h:286
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setParmValue(exint idx, const UT_Vector4D &value)
void setVex_multithread(bool val)
virtual void copyFrom(const SOP_NodeParms *src)
GLboolean r
Definition: glcorearb.h:1221
bool getVdb_signedflood() const
void doGetParmValue(exint idx, T &value) const
bool getVex_geometrygenerator() const
UT_StringHolder createString(const UT_Array< Bindings > &list) const
void strcat(const char *src)
T & w(void)
Definition: UT_Vector4.h:374
UT_StringHolder opVex_outputmask(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getVop_compiler() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opVex_multithread(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
void setScript(const UT_StringHolder &val)
void setShoppath(const UT_StringHolder &val)
void setParmValue(exint idx, const UT_Vector2D &value)
SYS_FORCE_INLINE bool isstring() const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getParmValue(exint idx, exint &value) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void saveData(std::ostream &os, UT_StringHolder s)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1792