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