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 <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_VolumeVopEnums
24 {
25  enum class Vexsrc
26  {
27  MYSELF = 0,
28  SHOP,
29  SCRIPT
30  };
31 }
32 
33 
35 {
36 public:
37  static int version() { return 1; }
38  struct Bindings
39  {
43 
44 
46  {
47  bindprimname = ""_sh;
48  bindprim = 0;
49  bindname = ""_sh;
50 
51  }
52 
53  bool operator==(const Bindings &src) const
54  {
55  if (bindprimname != src.bindprimname) return false;
56  if (bindprim != src.bindprim) return false;
57  if (bindname != src.bindname) return false;
58 
59  return true;
60  }
61  bool operator!=(const Bindings &src) const
62  {
63  return !operator==(src);
64  }
65 
66  };
67 
69  {
71 
72  buf.strcat("[ ");
73  for (int i = 0; i < list.entries(); i++)
74  {
75  if (i)
76  buf.strcat(", ");
77  buf.strcat("( ");
78  buf.append("");
79  { UT_String tmp; tmp = UT_StringWrap(list(i).bindprimname).makeQuotedString('"'); buf.strcat(tmp); }
80  buf.append(", ");
81  buf.appendSprintf("%d", (int) list(i).bindprim);
82  buf.append(", ");
83  { UT_String tmp; tmp = UT_StringWrap(list(i).bindname).makeQuotedString('"'); buf.strcat(tmp); }
84 
85  buf.strcat(" )");
86  }
87  buf.strcat(" ]");
88 
90  return result;
91  }
92 
94  {
95  myVexsrc = 0;
96  myShoppath = ""_sh;
97  myScript = "null"_sh;
98  myVop_compiler = "vcc -q $VOP_INCLUDEPATH -o $VOP_OBJECTFILE -e $VOP_ERRORFILE $VOP_SOURCEFILE"_sh;
99  myVex_cwdpath = ""_sh;
100  myVex_outputmask = "*"_sh;
101  myVex_multithread = true;
102  myVex_geometrygenerator = false;
103  myVdb_signedflood = true;
104  myAutobind = true;
105  myBindeach = false;
106  myVexPrecision = "auto"_sh;
107 
108  }
109 
110  explicit SOP_VolumeVopParms(const SOP_VolumeVopParms &) = default;
111 
112  ~SOP_VolumeVopParms() override {}
113 
114  bool operator==(const SOP_VolumeVopParms &src) const
115  {
116  if (myVexsrc != src.myVexsrc) return false;
117  if (myShoppath != src.myShoppath) return false;
118  if (myScript != src.myScript) return false;
119  if (myVop_compiler != src.myVop_compiler) return false;
120  if (myVex_cwdpath != src.myVex_cwdpath) return false;
121  if (myVex_outputmask != src.myVex_outputmask) return false;
122  if (myVex_multithread != src.myVex_multithread) return false;
123  if (myVex_geometrygenerator != src.myVex_geometrygenerator) return false;
124  if (myVdb_signedflood != src.myVdb_signedflood) return false;
125  if (myAutobind != src.myAutobind) return false;
126  if (myBindeach != src.myBindeach) return false;
127  if (myBindings != src.myBindings) return false;
128  if (myVexPrecision != src.myVexPrecision) return false;
129 
130  return true;
131  }
132  bool operator!=(const SOP_VolumeVopParms &src) const
133  {
134  return !operator==(src);
135  }
137 
138 
139 
140  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
141  {
142  myVexsrc = 0;
143  if (true)
144  graph->evalOpParm(myVexsrc, nodeidx, "vexsrc", time, 0);
145  myShoppath = ""_sh;
146  if (true && ( (!(((int64(getVexsrc())!=1)))) ) )
147  graph->evalOpParm(myShoppath, nodeidx, "shoppath", time, 0);
148  myScript = "null"_sh;
149  if (true && ( (!(((int64(getVexsrc())!=2)))) ) )
150  graph->evalOpParm(myScript, nodeidx, "script", time, 0);
151  myVop_compiler = "vcc -q $VOP_INCLUDEPATH -o $VOP_OBJECTFILE -e $VOP_ERRORFILE $VOP_SOURCEFILE"_sh;
152  if (true && ( (!(((int64(getVexsrc())!=0)))) ) )
153  graph->evalOpParm(myVop_compiler, nodeidx, "vop_compiler", time, 0);
154  myVex_cwdpath = ""_sh;
155  if (true)
156  graph->evalOpParm(myVex_cwdpath, nodeidx, "vex_cwdpath", time, 0);
157  myVex_outputmask = "*"_sh;
158  if (true)
159  graph->evalOpParm(myVex_outputmask, nodeidx, "vex_outputmask", time, 0);
160  myVex_multithread = true;
161  if (true)
162  graph->evalOpParm(myVex_multithread, nodeidx, "vex_multithread", time, 0);
163  myVex_geometrygenerator = false;
164  if (true)
165  graph->evalOpParm(myVex_geometrygenerator, nodeidx, "vex_geometrygenerator", time, 0);
166  myVdb_signedflood = true;
167  if (true)
168  graph->evalOpParm(myVdb_signedflood, nodeidx, "vdb_signedflood", time, 0);
169  myAutobind = true;
170  if (true)
171  graph->evalOpParm(myAutobind, nodeidx, "autobind", time, 0);
172  myBindeach = false;
173  if (true && ( (!(((getAutobind()==1)))) ) )
174  graph->evalOpParm(myBindeach, nodeidx, "bindeach", time, 0);
175  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) )
176  {
177  int64 length = 0;
178  graph->evalOpParm(length, nodeidx, "bindings", time, 0);
179  myBindings.entries(length);
180  for (exint i = 0; i < length; i++)
181  {
182  int parmidx = i+1;
183  auto && _curentry = myBindings(i);
184  (void) _curentry;
185  myBindings(i).bindprimname = ""_sh;
186  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
187  graph->evalOpParmInst(myBindings(i).bindprimname, nodeidx, "bindprimname#", &parmidx, time, 0);
188  myBindings(i).bindprim = 0;
189  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
190  graph->evalOpParmInst(myBindings(i).bindprim, nodeidx, "bindprim#", &parmidx, time, 0);
191  myBindings(i).bindname = ""_sh;
192  if (true && ( (!(((getAutobind()==1))||((getBindeach()==1)))) ) && ( (!(((getAutobind()==1))||((getBindeach()==1))||((getAutobind()==1))||((getBindeach()==1)))) ) )
193  graph->evalOpParmInst(myBindings(i).bindname, nodeidx, "bindname#", &parmidx, time, 0);
194 
195  }
196  }
197  else
198  myBindings.clear();
199  myVexPrecision = "auto"_sh;
200  if (true)
201  graph->evalOpParm(myVexPrecision, nodeidx, "vex_precision", time, 0);
202 
203  }
204 
205 
206  void loadFromOpSubclass(const LoadParms &loadparms) override
207  {
208  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
209  }
210 
211 
212  void copyFrom(const SOP_NodeParms *src) override
213  {
214  *this = *((const SOP_VolumeVopParms *)src);
215  }
216 
217  template <typename T>
218  void
219  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
220  {
221  if (idx.size() < 1)
222  return;
223  UT_ASSERT(idx.size() == instance.size()+1);
224  if (idx.size() != instance.size()+1)
225  return;
226  switch (idx[0])
227  {
228  case 0:
229  coerceValue(value, myVexsrc);
230  break;
231  case 1:
232  coerceValue(value, myShoppath);
233  break;
234  case 2:
235  coerceValue(value, myScript);
236  break;
237  case 3:
238  coerceValue(value, myVop_compiler);
239  break;
240  case 4:
241  coerceValue(value, myVex_cwdpath);
242  break;
243  case 5:
244  coerceValue(value, myVex_outputmask);
245  break;
246  case 6:
247  coerceValue(value, myVex_multithread);
248  break;
249  case 7:
250  coerceValue(value, myVex_geometrygenerator);
251  break;
252  case 8:
253  coerceValue(value, myVdb_signedflood);
254  break;
255  case 9:
256  coerceValue(value, myAutobind);
257  break;
258  case 10:
259  coerceValue(value, myBindeach);
260  break;
261  case 11:
262  if (idx.size() == 1)
263  coerceValue(value, myBindings.entries());
264  else if (instance[0] < myBindings.entries())
265  {
266  auto && _data = myBindings(instance[0]);
267  switch (idx[1])
268  {
269  case 0:
270  coerceValue(value, _data.bindprimname);
271  break;
272  case 1:
273  coerceValue(value, _data.bindprim);
274  break;
275  case 2:
276  coerceValue(value, _data.bindname);
277  break;
278 
279  }
280  }
281  break;
282  case 12:
283  coerceValue(value, myVexPrecision);
284  break;
285 
286  }
287  }
288 
289  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
304  { doGetParmValue(idx, instance, value); }
305  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
306  { doGetParmValue(idx, instance, value); }
307  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
308  { doGetParmValue(idx, instance, value); }
309  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
310  { doGetParmValue(idx, instance, value); }
311 
312  template <typename T>
313  void
314  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
315  {
316  if (idx.size() < 1)
317  return;
318  UT_ASSERT(idx.size() == instance.size()+1);
319  if (idx.size() != instance.size()+1)
320  return;
321  switch (idx[0])
322  {
323  case 0:
324  coerceValue(myVexsrc, value);
325  break;
326  case 1:
327  coerceValue(myShoppath, value);
328  break;
329  case 2:
330  coerceValue(myScript, value);
331  break;
332  case 3:
333  coerceValue(myVop_compiler, value);
334  break;
335  case 4:
336  coerceValue(myVex_cwdpath, value);
337  break;
338  case 5:
339  coerceValue(myVex_outputmask, value);
340  break;
341  case 6:
342  coerceValue(myVex_multithread, value);
343  break;
344  case 7:
345  coerceValue(myVex_geometrygenerator, value);
346  break;
347  case 8:
348  coerceValue(myVdb_signedflood, value);
349  break;
350  case 9:
351  coerceValue(myAutobind, value);
352  break;
353  case 10:
354  coerceValue(myBindeach, value);
355  break;
356  case 11:
357  if (idx.size() == 1)
358  {
359  exint newsize;
360  coerceValue(newsize, value);
361  myBindings.setSize(newsize);
362  }
363  else
364  {
365  myBindings.setSizeIfNeeded(instance[0]+1);
366  auto && _data = myBindings(instance[0]);
367  switch (idx[1])
368  {
369  case 0:
370  coerceValue(_data.bindprimname, value);
371  break;
372  case 1:
373  coerceValue(_data.bindprim, value);
374  break;
375  case 2:
376  coerceValue(_data.bindname, value);
377  break;
378 
379  }
380  }
381  break;
382  case 12:
383  coerceValue(myVexPrecision, value);
384  break;
385 
386  }
387  }
388 
389  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
394  { doSetParmValue(idx, instance, value); }
395  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
396  { doSetParmValue(idx, instance, value); }
397  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
398  { doSetParmValue(idx, instance, value); }
399  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
400  { doSetParmValue(idx, instance, value); }
401  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
402  { doSetParmValue(idx, instance, value); }
403  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
404  { doSetParmValue(idx, instance, value); }
405  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
406  { doSetParmValue(idx, instance, value); }
407  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
408  { doSetParmValue(idx, instance, value); }
409  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
410  { doSetParmValue(idx, instance, value); }
411 
412  exint getNestNumParms(TempIndex idx) const override
413  {
414  if (idx.size() == 0)
415  return 13;
416  switch (idx[0])
417  {
418  case 11:
419  return 3;
420 
421  }
422  // Invalid
423  return 0;
424  }
425 
426  const char *getNestParmName(TempIndex fieldnum) const override
427  {
428  if (fieldnum.size() < 1)
429  return 0;
430  switch (fieldnum[0])
431  {
432  case 0:
433  return "vexsrc";
434  case 1:
435  return "shoppath";
436  case 2:
437  return "script";
438  case 3:
439  return "vop_compiler";
440  case 4:
441  return "vex_cwdpath";
442  case 5:
443  return "vex_outputmask";
444  case 6:
445  return "vex_multithread";
446  case 7:
447  return "vex_geometrygenerator";
448  case 8:
449  return "vdb_signedflood";
450  case 9:
451  return "autobind";
452  case 10:
453  return "bindeach";
454  case 11:
455  if (fieldnum.size() == 1)
456  return "bindings";
457  switch (fieldnum[1])
458  {
459  case 0:
460  return "bindprimname#";
461  case 1:
462  return "bindprim#";
463  case 2:
464  return "bindname#";
465 
466  }
467  return 0;
468  case 12:
469  return "vex_precision";
470 
471  }
472  return 0;
473  }
474 
475  ParmType getNestParmType(TempIndex fieldnum) const override
476  {
477  if (fieldnum.size() < 1)
478  return PARM_UNSUPPORTED;
479  switch (fieldnum[0])
480  {
481  case 0:
482  return PARM_INTEGER;
483  case 1:
484  return PARM_STRING;
485  case 2:
486  return PARM_STRING;
487  case 3:
488  return PARM_STRING;
489  case 4:
490  return PARM_STRING;
491  case 5:
492  return PARM_STRING;
493  case 6:
494  return PARM_INTEGER;
495  case 7:
496  return PARM_INTEGER;
497  case 8:
498  return PARM_INTEGER;
499  case 9:
500  return PARM_INTEGER;
501  case 10:
502  return PARM_INTEGER;
503  case 11:
504  if (fieldnum.size() == 1)
505  return PARM_MULTIPARM;
506  switch (fieldnum[1])
507  {
508  case 0:
509  return PARM_STRING;
510  case 1:
511  return PARM_INTEGER;
512  case 2:
513  return PARM_STRING;
514 
515  }
516  return PARM_UNSUPPORTED;
517  case 12:
518  return PARM_STRING;
519 
520  }
521  return PARM_UNSUPPORTED;
522  }
523 
524  // Boiler plate to load individual types.
525  static void loadData(UT_IStream &is, int64 &v)
526  { is.bread(&v, 1); }
527  static void loadData(UT_IStream &is, bool &v)
528  { int64 iv; is.bread(&iv, 1); v = iv; }
529  static void loadData(UT_IStream &is, fpreal64 &v)
530  { is.bread<fpreal64>(&v, 1); }
531  static void loadData(UT_IStream &is, UT_Vector2D &v)
532  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
533  static void loadData(UT_IStream &is, UT_Vector3D &v)
534  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
535  is.bread<fpreal64>(&v.z(), 1); }
536  static void loadData(UT_IStream &is, UT_Vector4D &v)
537  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
538  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
539  static void loadData(UT_IStream &is, UT_Matrix2D &v)
540  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
541  static void loadData(UT_IStream &is, UT_Matrix3D &v)
542  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
543  static void loadData(UT_IStream &is, UT_Matrix4D &v)
544  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
545  static void loadData(UT_IStream &is, UT_Vector2I &v)
546  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
547  static void loadData(UT_IStream &is, UT_Vector3I &v)
548  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
549  is.bread<int64>(&v.z(), 1); }
550  static void loadData(UT_IStream &is, UT_Vector4I &v)
551  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
552  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
554  { is.bread(v); }
556  { UT_StringHolder rampdata;
557  loadData(is, rampdata);
558  if (rampdata.isstring())
559  {
560  v.reset(new UT_Ramp());
561  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
562  v->load(istr);
563  }
564  else v.reset();
565  }
568  loadData(is, data);
569  if (data.isstring())
570  {
571  // Find the data type.
572  const char *colon = UT_StringWrap(data).findChar(':');
573  if (colon)
574  {
575  int typelen = colon - data.buffer();
577  type.strncpy(data.buffer(), typelen);
578  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
579 
580  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
581  }
582  }
583  else v.reset();
584  }
585 
586  static void saveData(std::ostream &os, int64 v)
587  { UTwrite(os, &v); }
588  static void saveData(std::ostream &os, bool v)
589  { int64 iv = v; UTwrite(os, &iv); }
590  static void saveData(std::ostream &os, fpreal64 v)
591  { UTwrite<fpreal64>(os, &v); }
592  static void saveData(std::ostream &os, UT_Vector2D v)
593  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
594  static void saveData(std::ostream &os, UT_Vector3D v)
595  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
596  UTwrite<fpreal64>(os, &v.z()); }
597  static void saveData(std::ostream &os, UT_Vector4D v)
598  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
599  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
600  static void saveData(std::ostream &os, UT_Matrix2D v)
602  static void saveData(std::ostream &os, UT_Matrix3D v)
604  static void saveData(std::ostream &os, UT_Matrix4D v)
606  static void saveData(std::ostream &os, UT_StringHolder s)
607  { UT_StringWrap(s).saveBinary(os); }
608  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
610  UT_OStringStream ostr;
611  if (s) s->save(ostr);
612  result = ostr.str();
613  saveData(os, result);
614  }
615  static void saveData(std::ostream &os, PRM_DataItemHandle s)
617  UT_OStringStream ostr;
618  if (s)
619  {
620  ostr << s->getDataTypeToken();
621  ostr << ":";
622  s->saveBinary(ostr);
623  }
624  result = ostr.str();
625  saveData(os, result);
626  }
627 
628 
629  void save(std::ostream &os) const
630  {
631  int32 v = version();
632  UTwrite(os, &v);
633  saveData(os, myVexsrc);
634  saveData(os, myShoppath);
635  saveData(os, myScript);
636  saveData(os, myVop_compiler);
637  saveData(os, myVex_cwdpath);
638  saveData(os, myVex_outputmask);
639  saveData(os, myVex_multithread);
640  saveData(os, myVex_geometrygenerator);
641  saveData(os, myVdb_signedflood);
642  saveData(os, myAutobind);
643  saveData(os, myBindeach);
644  {
645  int64 length = myBindings.entries();
646  UTwrite(os, &length);
647  for (exint i = 0; i < length; i++)
648  {
649  saveData(os, myBindings(i).bindprimname);
650  saveData(os, myBindings(i).bindprim);
651  saveData(os, myBindings(i).bindname);
652 
653  }
654  }
655  saveData(os, myVexPrecision);
656 
657  }
658 
659  bool load(UT_IStream &is)
660  {
661  int32 v;
662  is.bread(&v, 1);
663  if (version() != v)
664  {
665  // Fail incompatible versions
666  return false;
667  }
668  loadData(is, myVexsrc);
669  loadData(is, myShoppath);
670  loadData(is, myScript);
671  loadData(is, myVop_compiler);
672  loadData(is, myVex_cwdpath);
673  loadData(is, myVex_outputmask);
674  loadData(is, myVex_multithread);
675  loadData(is, myVex_geometrygenerator);
676  loadData(is, myVdb_signedflood);
677  loadData(is, myAutobind);
678  loadData(is, myBindeach);
679  {
680  int64 length;
681  is.read(&length, 1);
682  myBindings.entries(length);
683  for (exint i = 0; i < length; i++)
684  {
685  loadData(is, myBindings(i).bindprimname);
686  loadData(is, myBindings(i).bindprim);
687  loadData(is, myBindings(i).bindname);
688 
689  }
690  }
691  loadData(is, myVexPrecision);
692 
693  return true;
694  }
695 
696  Vexsrc getVexsrc() const { return Vexsrc(myVexsrc); }
697  void setVexsrc(Vexsrc val) { myVexsrc = int64(val); }
698  Vexsrc opVexsrc(const SOP_NodeVerb::CookParms &cookparms) const
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getVexsrc();
702  int64 result;
703  OP_Utils::evalOpParm(result, thissop, "vexsrc", cookparms.getCookTime(), 0);
704  return Vexsrc(result);
705  }
706  const UT_StringHolder & getShoppath() const { return myShoppath; }
707  void setShoppath(const UT_StringHolder & val) { myShoppath = val; }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getShoppath();
713  OP_Utils::evalOpParm(result, thissop, "shoppath", cookparms.getCookTime(), 0);
714  return result;
715  }
716  const UT_StringHolder & getScript() const { return myScript; }
717  void setScript(const UT_StringHolder & val) { myScript = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getScript();
723  OP_Utils::evalOpParm(result, thissop, "script", cookparms.getCookTime(), 0);
724  return result;
725  }
726  const UT_StringHolder & getVop_compiler() const { return myVop_compiler; }
727  void setVop_compiler(const UT_StringHolder & val) { myVop_compiler = val; }
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getVop_compiler();
733  OP_Utils::evalOpParm(result, thissop, "vop_compiler", cookparms.getCookTime(), 0);
734  return result;
735  }
736  const UT_StringHolder & getVex_cwdpath() const { return myVex_cwdpath; }
737  void setVex_cwdpath(const UT_StringHolder & val) { myVex_cwdpath = val; }
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getVex_cwdpath();
743  OP_Utils::evalOpParm(result, thissop, "vex_cwdpath", cookparms.getCookTime(), 0);
744  return result;
745  }
746  const UT_StringHolder & getVex_outputmask() const { return myVex_outputmask; }
747  void setVex_outputmask(const UT_StringHolder & val) { myVex_outputmask = val; }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getVex_outputmask();
753  OP_Utils::evalOpParm(result, thissop, "vex_outputmask", cookparms.getCookTime(), 0);
754  return result;
755  }
756  bool getVex_multithread() const { return myVex_multithread; }
757  void setVex_multithread(bool val) { myVex_multithread = val; }
758  bool opVex_multithread(const SOP_NodeVerb::CookParms &cookparms) const
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getVex_multithread();
762  bool result;
763  OP_Utils::evalOpParm(result, thissop, "vex_multithread", cookparms.getCookTime(), 0);
764  return result;
765  }
766  bool getVex_geometrygenerator() const { return myVex_geometrygenerator; }
767  void setVex_geometrygenerator(bool val) { myVex_geometrygenerator = val; }
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getVex_geometrygenerator();
772  bool result;
773  OP_Utils::evalOpParm(result, thissop, "vex_geometrygenerator", cookparms.getCookTime(), 0);
774  return result;
775  }
776  bool getVdb_signedflood() const { return myVdb_signedflood; }
777  void setVdb_signedflood(bool val) { myVdb_signedflood = val; }
778  bool opVdb_signedflood(const SOP_NodeVerb::CookParms &cookparms) const
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getVdb_signedflood();
782  bool result;
783  OP_Utils::evalOpParm(result, thissop, "vdb_signedflood", cookparms.getCookTime(), 0);
784  return result;
785  }
786  bool getAutobind() const { return myAutobind; }
787  void setAutobind(bool val) { myAutobind = val; }
788  bool opAutobind(const SOP_NodeVerb::CookParms &cookparms) const
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getAutobind();
792  bool result;
793  OP_Utils::evalOpParm(result, thissop, "autobind", cookparms.getCookTime(), 0);
794  return result;
795  }
796  bool getBindeach() const { return myBindeach; }
797  void setBindeach(bool val) { myBindeach = val; }
798  bool opBindeach(const SOP_NodeVerb::CookParms &cookparms) const
799  {
800  SOP_Node *thissop = cookparms.getNode();
801  if (!thissop) return getBindeach();
802  bool result;
803  OP_Utils::evalOpParm(result, thissop, "bindeach", cookparms.getCookTime(), 0);
804  return result;
805  }
806  const UT_Array<Bindings> &getBindings() const { return myBindings; }
807  void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
808  exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return getBindings().entries();
812  exint result;
813  OP_Utils::evalOpParm(result, thissop, "bindings", cookparms.getCookTime(), 0);
814  return result;
815  }
817  {
818  SOP_Node *thissop = cookparms.getNode();
819  if (!thissop) return (myBindings(_idx).bindprimname);
820  int _parmidx = _idx + 1;
822  OP_Utils::evalOpParmInst(result, thissop, "bindprimname#", &_parmidx, cookparms.getCookTime(), 0);
823  return (result);
824  }
826  {
827  SOP_Node *thissop = cookparms.getNode();
828  if (!thissop) return (myBindings(_idx).bindprim);
829  int _parmidx = _idx + 1;
830  int64 result;
831  OP_Utils::evalOpParmInst(result, thissop, "bindprim#", &_parmidx, cookparms.getCookTime(), 0);
832  return (result);
833  }
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return (myBindings(_idx).bindname);
838  int _parmidx = _idx + 1;
840  OP_Utils::evalOpParmInst(result, thissop, "bindname#", &_parmidx, cookparms.getCookTime(), 0);
841  return (result);
842  }
843 
844  const UT_StringHolder & getVexPrecision() const { return myVexPrecision; }
845  void setVexPrecision(const UT_StringHolder & val) { myVexPrecision = val; }
847  {
848  SOP_Node *thissop = cookparms.getNode();
849  if (!thissop) return getVexPrecision();
851  OP_Utils::evalOpParm(result, thissop, "vex_precision", cookparms.getCookTime(), 0);
852  return result;
853  }
854 
855 private:
856  int64 myVexsrc;
857  UT_StringHolder myShoppath;
858  UT_StringHolder myScript;
859  UT_StringHolder myVop_compiler;
860  UT_StringHolder myVex_cwdpath;
861  UT_StringHolder myVex_outputmask;
862  bool myVex_multithread;
863  bool myVex_geometrygenerator;
864  bool myVdb_signedflood;
865  bool myAutobind;
866  bool myBindeach;
867  UT_Array<Bindings> myBindings;
868  UT_StringHolder myVexPrecision;
869 
870 };
GLdouble s
Definition: glew.h:1390
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)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void saveData(std::ostream &os, UT_Vector4D v)
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)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
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
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
fpreal getTime() const
Definition: OP_Context.h:60
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opVdb_signedflood(const SOP_NodeVerb::CookParms &cookparms) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const char * getNestParmName(TempIndex fieldnum) const override
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void setVex_geometrygenerator(bool val)
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
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.
const GLdouble * v
Definition: glew.h:1391
void setVexPrecision(const UT_StringHolder &val)
void setVex_cwdpath(const UT_StringHolder &val)
void setBindings(const UT_Array< Bindings > &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
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)
const UT_StringHolder & getVexPrecision() const
double fpreal64
Definition: SYS_Types.h:201
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getScript() const
UT_StringHolder opVop_compiler(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Vexsrc opVexsrc(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator!=(const Bindings &src) const
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setAutobind(bool val)
void
Definition: png.h:1083
static void loadData(UT_IStream &is, bool &v)
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
const UT_StringHolder & getVex_cwdpath() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opVexPrecision(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opBindeach(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Bindings &src) const
void setVop_compiler(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Vexsrc getVexsrc() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
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:121
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
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)
UT_StringHolder opScript(const SOP_NodeVerb::CookParms &cookparms) const
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)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
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)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void setVex_outputmask(const UT_StringHolder &val)
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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
static void saveData(std::ostream &os, UT_Matrix3D v)
GLuint64EXT * result
Definition: glew.h:14007
const UT_Array< Bindings > & getBindings() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setVex_multithread(bool val)
bool getVdb_signedflood() const
bool getVex_geometrygenerator() const
UT_StringHolder createString(const UT_Array< Bindings > &list) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
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)
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
ParmType getNestParmType(TempIndex fieldnum) const override
GLsizei const GLfloat * value
Definition: glew.h:1849
bool opVex_multithread(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
void setScript(const UT_StringHolder &val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setShoppath(const UT_StringHolder &val)
SYS_FORCE_INLINE bool isstring() const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
static void saveData(std::ostream &os, UT_StringHolder s)
void copyFrom(const SOP_NodeParms *src) override
exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override