HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_OpenCL.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_OpenCLEnums
24 {
25  enum class RunOver
26  {
27  ATTRIBUTE = 0,
28  VOLUME,
29  WORKSETS,
30  VDB
31  };
32 
34  getToken(RunOver enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case RunOver::ATTRIBUTE: return "attribute"_sh;
39  case RunOver::VOLUME: return "volume"_sh;
40  case RunOver::WORKSETS: return "worksets"_sh;
41  case RunOver::VDB: return "vdb"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Timemethod
47  {
48  INVERT = 0,
49  POW
50  };
51 
53  getToken(Timemethod enum_value)
54  {
55  using namespace UT::Literal;
56  switch (enum_value) {
57  case Timemethod::INVERT: return "invert"_sh;
58  case Timemethod::POW: return "pow"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class Precision
64  {
65  AUTO = 0,
66  _16,
67  _32,
68  _64
69  };
70 
72  getToken(Precision enum_value)
73  {
74  using namespace UT::Literal;
75  switch (enum_value) {
76  case Precision::AUTO: return "auto"_sh;
77  case Precision::_16: return "16"_sh;
78  case Precision::_32: return "32"_sh;
79  case Precision::_64: return "64"_sh;
80  default: UT_ASSERT(false); return ""_sh;
81  }
82  }
83 
84  enum class Bindings_type
85  {
86  INT = 0,
87  FLOAT,
88  FLOAT3,
89  FLOAT4,
90  RAMP,
91  ATTRIBUTE,
92  VOLUME,
93  VDB
94  };
95 
97  getToken(Bindings_type enum_value)
98  {
99  using namespace UT::Literal;
100  switch (enum_value) {
101  case Bindings_type::INT: return "int"_sh;
102  case Bindings_type::FLOAT: return "float"_sh;
103  case Bindings_type::FLOAT3: return "float3"_sh;
104  case Bindings_type::FLOAT4: return "float4"_sh;
105  case Bindings_type::RAMP: return "ramp"_sh;
106  case Bindings_type::ATTRIBUTE: return "attribute"_sh;
107  case Bindings_type::VOLUME: return "volume"_sh;
108  case Bindings_type::VDB: return "vdb"_sh;
109  default: UT_ASSERT(false); return ""_sh;
110  }
111  }
112 
113  enum class Bindings_vdbtype
114  {
115  ANY = 0,
116  FLOAT,
117  VECTOR,
118  INT,
119  FLOATN
120  };
121 
124  {
125  using namespace UT::Literal;
126  switch (enum_value) {
127  case Bindings_vdbtype::ANY: return "any"_sh;
128  case Bindings_vdbtype::FLOAT: return "float"_sh;
129  case Bindings_vdbtype::VECTOR: return "vector"_sh;
130  case Bindings_vdbtype::INT: return "int"_sh;
131  case Bindings_vdbtype::FLOATN: return "floatn"_sh;
132  default: UT_ASSERT(false); return ""_sh;
133  }
134  }
135 
137  {
138  DETAIL = 0,
139  PRIMITIVE,
140  POINT,
141  VERTEX
142  };
143 
146  {
147  using namespace UT::Literal;
148  switch (enum_value) {
149  case Bindings_attribclass::DETAIL: return "detail"_sh;
150  case Bindings_attribclass::PRIMITIVE: return "primitive"_sh;
151  case Bindings_attribclass::POINT: return "point"_sh;
152  case Bindings_attribclass::VERTEX: return "vertex"_sh;
153  default: UT_ASSERT(false); return ""_sh;
154  }
155  }
156 
158  {
159  FLOAT = 0,
160  INT,
161  FLOATARRAY,
162  INTARRAY
163  };
164 
167  {
168  using namespace UT::Literal;
169  switch (enum_value) {
170  case Bindings_attribtype::FLOAT: return "float"_sh;
171  case Bindings_attribtype::INT: return "int"_sh;
172  case Bindings_attribtype::FLOATARRAY: return "floatarray"_sh;
173  case Bindings_attribtype::INTARRAY: return "intarray"_sh;
174  default: UT_ASSERT(false); return ""_sh;
175  }
176  }
177 
179  {
180  NODE = 0,
181  _16,
182  _32,
183  _64
184  };
185 
188  {
189  using namespace UT::Literal;
190  switch (enum_value) {
191  case Bindings_precision::NODE: return "node"_sh;
192  case Bindings_precision::_16: return "16"_sh;
193  case Bindings_precision::_32: return "32"_sh;
194  case Bindings_precision::_64: return "64"_sh;
195  default: UT_ASSERT(false); return ""_sh;
196  }
197  }
198 
200  {
201  NONE = 0,
202  MULT,
203  INVERT,
204  POW
205  };
206 
209  {
210  using namespace UT::Literal;
211  switch (enum_value) {
212  case Bindings_timescale::NONE: return "none"_sh;
213  case Bindings_timescale::MULT: return "mult"_sh;
214  case Bindings_timescale::INVERT: return "invert"_sh;
215  case Bindings_timescale::POW: return "pow"_sh;
216  default: UT_ASSERT(false); return ""_sh;
217  }
218  }
219 
220 }
221 
222 
224 {
225 public:
226  static int version() { return 1; }
227  struct Bindings
228  {
256 
257 
259  {
260  bindings_name = ""_UTsh;
261  bindings_type = 0;
262  bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
263  bindings_rampsize = 1024;
264  bindings_input = 0;
265  bindings_volume = ""_UTsh;
266  bindings_vdbtype = 0;
267  bindings_forcealign = true;
268  bindings_resolution = false;
269  bindings_voxelsize = false;
270  bindings_xformtoworld = false;
271  bindings_xformtovoxel = false;
272  bindings_attribute = ""_UTsh;
273  bindings_attribclass = 2;
274  bindings_attribtype = 0;
275  bindings_attribsize = 1;
276  bindings_precision = 2;
277  bindings_readable = true;
278  bindings_writeable = false;
279  bindings_optional = false;
280  bindings_defval = false;
281  bindings_intval = 0;
282  bindings_fval = 0;
283  bindings_v2val = UT_Vector2D(0,0);
284  bindings_v3val = UT_Vector3D(0,0,0);
285  bindings_v4val = UT_Vector4D(0,0,0,0);
286  bindings_timescale = 0;
287 
288  }
289 
290  bool operator==(const Bindings &src) const
291  {
292  if (bindings_name != src.bindings_name) return false;
293  if (bindings_type != src.bindings_type) return false;
294  if (bindings_ramp != src.bindings_ramp) return false;
295  if (bindings_rampsize != src.bindings_rampsize) return false;
296  if (bindings_input != src.bindings_input) return false;
297  if (bindings_volume != src.bindings_volume) return false;
298  if (bindings_vdbtype != src.bindings_vdbtype) return false;
299  if (bindings_forcealign != src.bindings_forcealign) return false;
300  if (bindings_resolution != src.bindings_resolution) return false;
301  if (bindings_voxelsize != src.bindings_voxelsize) return false;
302  if (bindings_xformtoworld != src.bindings_xformtoworld) return false;
303  if (bindings_xformtovoxel != src.bindings_xformtovoxel) return false;
304  if (bindings_attribute != src.bindings_attribute) return false;
305  if (bindings_attribclass != src.bindings_attribclass) return false;
306  if (bindings_attribtype != src.bindings_attribtype) return false;
307  if (bindings_attribsize != src.bindings_attribsize) return false;
308  if (bindings_precision != src.bindings_precision) return false;
309  if (bindings_readable != src.bindings_readable) return false;
310  if (bindings_writeable != src.bindings_writeable) return false;
311  if (bindings_optional != src.bindings_optional) return false;
312  if (bindings_defval != src.bindings_defval) return false;
313  if (bindings_intval != src.bindings_intval) return false;
314  if (bindings_fval != src.bindings_fval) return false;
315  if (bindings_v2val != src.bindings_v2val) return false;
316  if (bindings_v3val != src.bindings_v3val) return false;
317  if (bindings_v4val != src.bindings_v4val) return false;
318  if (bindings_timescale != src.bindings_timescale) return false;
319 
320  return true;
321  }
322  bool operator!=(const Bindings &src) const
323  {
324  return !operator==(src);
325  }
326 
327  };
328 
330  {
332 
333  buf.strcat("[ ");
334  for (int i = 0; i < list.entries(); i++)
335  {
336  if (i)
337  buf.strcat(", ");
338  buf.strcat("( ");
339  buf.append("");
340  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_name).makeQuotedString('"'); buf.strcat(tmp); }
341  buf.append(", ");
342  buf.appendSprintf("%d", (int) list(i).bindings_type);
343  buf.append(", ");
344  if (list(i).bindings_ramp)
345  {
346  UT_OStringStream os;
347  UT_String tmp;
348  list(i).bindings_ramp->save(os);
349  tmp = UT_StringWrap(os.str().buffer()).makeQuotedString('"');
350  buf.strcat(tmp);
351  }
352  else buf.strcat("""");
353  buf.append(", ");
354  buf.appendSprintf("%d", (int) list(i).bindings_rampsize);
355  buf.append(", ");
356  buf.appendSprintf("%d", (int) list(i).bindings_input);
357  buf.append(", ");
358  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_volume).makeQuotedString('"'); buf.strcat(tmp); }
359  buf.append(", ");
360  buf.appendSprintf("%d", (int) list(i).bindings_vdbtype);
361  buf.append(", ");
362  buf.appendSprintf("%s", (list(i).bindings_forcealign) ? "true" : "false");
363  buf.append(", ");
364  buf.appendSprintf("%s", (list(i).bindings_resolution) ? "true" : "false");
365  buf.append(", ");
366  buf.appendSprintf("%s", (list(i).bindings_voxelsize) ? "true" : "false");
367  buf.append(", ");
368  buf.appendSprintf("%s", (list(i).bindings_xformtoworld) ? "true" : "false");
369  buf.append(", ");
370  buf.appendSprintf("%s", (list(i).bindings_xformtovoxel) ? "true" : "false");
371  buf.append(", ");
372  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_attribute).makeQuotedString('"'); buf.strcat(tmp); }
373  buf.append(", ");
374  buf.appendSprintf("%d", (int) list(i).bindings_attribclass);
375  buf.append(", ");
376  buf.appendSprintf("%d", (int) list(i).bindings_attribtype);
377  buf.append(", ");
378  buf.appendSprintf("%d", (int) list(i).bindings_attribsize);
379  buf.append(", ");
380  buf.appendSprintf("%d", (int) list(i).bindings_precision);
381  buf.append(", ");
382  buf.appendSprintf("%s", (list(i).bindings_readable) ? "true" : "false");
383  buf.append(", ");
384  buf.appendSprintf("%s", (list(i).bindings_writeable) ? "true" : "false");
385  buf.append(", ");
386  buf.appendSprintf("%s", (list(i).bindings_optional) ? "true" : "false");
387  buf.append(", ");
388  buf.appendSprintf("%s", (list(i).bindings_defval) ? "true" : "false");
389  buf.append(", ");
390  buf.appendSprintf("%d", (int) list(i).bindings_intval);
391  buf.append(", ");
392  buf.appendSprintf("%f", (list(i).bindings_fval));
393  buf.append(", ");
394  buf.appendSprintf("(%f, %f)", list(i).bindings_v2val.x(), list(i).bindings_v2val.y());
395  buf.append(", ");
396  buf.appendSprintf("(%f, %f, %f)", list(i).bindings_v3val.x(), list(i).bindings_v3val.y(), list(i).bindings_v3val.z());
397  buf.append(", ");
398  buf.appendSprintf("(%f, %f, %f, %f)", list(i).bindings_v4val.x(), list(i).bindings_v4val.y(), list(i).bindings_v4val.z(), list(i).bindings_v4val.w());
399  buf.append(", ");
400  buf.appendSprintf("%d", (int) list(i).bindings_timescale);
401 
402  buf.strcat(" )");
403  }
404  buf.strcat(" ]");
405 
407  return result;
408  }
409 
411  {
412  myKernelName = "kernelName"_UTsh;
413  myUseCode = false;
414  myKernelFile = ""_UTsh;
415  myKernelCode = ""_UTsh;
416  myAtBinding = false;
417  myKernelOptions = ""_UTsh;
418  myKernelOptionAttrib = ""_UTsh;
419  myUseWriteBackKernel = false;
420  myWriteBackKernelName = "writeBack"_UTsh;
421  myRecompile = false;
422  myRunOver = 0;
423  myIterations = 1;
424  myIteration = false;
425  myWorksets_begin = ""_UTsh;
426  myWorksets_length = ""_UTsh;
427  mySingleworkgroup = false;
428  myFinish = true;
429  myTime = false;
430  myTimeInc = false;
431  myTimescale = 1;
432  myTimemethod = 0;
433  myXnoise = false;
434  myPrecision = 2;
435  myImportPrequel = true;
436  myBindings.setSize(1);
437  myGeneratedCode = ""_UTsh;
438 
439  }
440 
441  explicit SOP_OpenCLParms(const SOP_OpenCLParms &) = default;
442  SOP_OpenCLParms &operator=(const SOP_OpenCLParms &) = default;
443  SOP_OpenCLParms(SOP_OpenCLParms &&) noexcept = default;
444  SOP_OpenCLParms &operator=(SOP_OpenCLParms &&) noexcept = default;
445 
446  ~SOP_OpenCLParms() override {}
447 
448  bool operator==(const SOP_OpenCLParms &src) const
449  {
450  if (myKernelName != src.myKernelName) return false;
451  if (myUseCode != src.myUseCode) return false;
452  if (myKernelFile != src.myKernelFile) return false;
453  if (myKernelCode != src.myKernelCode) return false;
454  if (myAtBinding != src.myAtBinding) return false;
455  if (myKernelOptions != src.myKernelOptions) return false;
456  if (myKernelOptionAttrib != src.myKernelOptionAttrib) return false;
457  if (myUseWriteBackKernel != src.myUseWriteBackKernel) return false;
458  if (myWriteBackKernelName != src.myWriteBackKernelName) return false;
459  if (myRecompile != src.myRecompile) return false;
460  if (myRunOver != src.myRunOver) return false;
461  if (myIterations != src.myIterations) return false;
462  if (myIteration != src.myIteration) return false;
463  if (myWorksets_begin != src.myWorksets_begin) return false;
464  if (myWorksets_length != src.myWorksets_length) return false;
465  if (mySingleworkgroup != src.mySingleworkgroup) return false;
466  if (myFinish != src.myFinish) return false;
467  if (myTime != src.myTime) return false;
468  if (myTimeInc != src.myTimeInc) return false;
469  if (myTimescale != src.myTimescale) return false;
470  if (myTimemethod != src.myTimemethod) return false;
471  if (myXnoise != src.myXnoise) return false;
472  if (myPrecision != src.myPrecision) return false;
473  if (myImportPrequel != src.myImportPrequel) return false;
474  if (myBindings != src.myBindings) return false;
475  if (myGeneratedCode != src.myGeneratedCode) return false;
476 
477 
478  if (baseGetSignature() != src.baseGetSignature()) return false;
479 
480  return true;
481  }
482  bool operator!=(const SOP_OpenCLParms &src) const
483  {
484  return !operator==(src);
485  }
495 
496 
497 
498  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
499  {
500  myKernelName = "kernelName"_UTsh;
501  if (true)
502  graph->evalOpParm(myKernelName, nodeidx, "kernelname", time, graph->isDirect()?nullptr:depnode);
503  myUseCode = false;
504  if (true)
505  graph->evalOpParm(myUseCode, nodeidx, "usecode", time, graph->isDirect()?nullptr:depnode);
506  myKernelFile = ""_UTsh;
507  if (true && ( (true&&!(((getUseCode()!=0)))) ) )
508  graph->evalOpParm(myKernelFile, nodeidx, "kernelfile", time, graph->isDirect()?nullptr:depnode);
509  myKernelCode = ""_UTsh;
510  if (true && ( (true&&!(((getUseCode()==0)))) ) )
511  graph->evalOpParm(myKernelCode, nodeidx, "kernelcode", time, graph->isDirect()?nullptr:depnode);
512  myAtBinding = false;
513  if (true && ( (true&&!(((getUseCode()==0)))) ) )
514  graph->evalOpParm(myAtBinding, nodeidx, "atbinding", time, graph->isDirect()?nullptr:depnode);
515  myKernelOptions = ""_UTsh;
516  if (true)
517  graph->evalOpParm(myKernelOptions, nodeidx, "kerneloptions", time, graph->isDirect()?nullptr:depnode);
518  myKernelOptionAttrib = ""_UTsh;
519  if (true)
520  graph->evalOpParm(myKernelOptionAttrib, nodeidx, "kerneloptionattrib", time, graph->isDirect()?nullptr:depnode);
521  myUseWriteBackKernel = false;
522  if (true)
523  graph->evalOpParm(myUseWriteBackKernel, nodeidx, "usewritebackkernel", time, graph->isDirect()?nullptr:depnode);
524  myWriteBackKernelName = "writeBack"_UTsh;
525  if (true && ( (true&&!(((getUseWriteBackKernel()==0)))) ) )
526  graph->evalOpParm(myWriteBackKernelName, nodeidx, "writebackkernelname", time, graph->isDirect()?nullptr:depnode);
527  myRecompile = false;
528  if (true)
529  graph->evalOpParm(myRecompile, nodeidx, "recompile", time, graph->isDirect()?nullptr:depnode);
530  myRunOver = 0;
531  if (true)
532  graph->evalOpParm(myRunOver, nodeidx, "runover", time, graph->isDirect()?nullptr:depnode);
533  myIterations = 1;
534  if (true)
535  graph->evalOpParm(myIterations, nodeidx, "iterations", time, graph->isDirect()?nullptr:depnode);
536  myIteration = false;
537  if (true)
538  graph->evalOpParm(myIteration, nodeidx, "iteration", time, graph->isDirect()?nullptr:depnode);
539  myWorksets_begin = ""_UTsh;
540  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
541  graph->evalOpParm(myWorksets_begin, nodeidx, "worksets_begin", time, graph->isDirect()?nullptr:depnode);
542  myWorksets_length = ""_UTsh;
543  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
544  graph->evalOpParm(myWorksets_length, nodeidx, "worksets_length", time, graph->isDirect()?nullptr:depnode);
545  mySingleworkgroup = false;
546  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
547  graph->evalOpParm(mySingleworkgroup, nodeidx, "singleworkgroup", time, graph->isDirect()?nullptr:depnode);
548  myFinish = true;
549  if (true)
550  graph->evalOpParm(myFinish, nodeidx, "finish", time, graph->isDirect()?nullptr:depnode);
551  myTime = false;
552  if (true)
553  graph->evalOpParm(myTime, nodeidx, "time", time, graph->isDirect()?nullptr:depnode);
554  myTimeInc = false;
555  if (true)
556  graph->evalOpParm(myTimeInc, nodeidx, "timeinc", time, graph->isDirect()?nullptr:depnode);
557  myTimescale = 1;
558  if (true && ( (true&&!(((getTimeInc()==0)))) ) )
559  graph->evalOpParm(myTimescale, nodeidx, "timescale", time, graph->isDirect()?nullptr:depnode);
560  myTimemethod = 0;
561  if (true && ( (true&&!(((getTimeInc()==0)))) ) )
562  graph->evalOpParm(myTimemethod, nodeidx, "timemethod", time, graph->isDirect()?nullptr:depnode);
563  myXnoise = false;
564  if (true)
565  graph->evalOpParm(myXnoise, nodeidx, "xnoise", time, graph->isDirect()?nullptr:depnode);
566  myPrecision = 2;
567  if (true)
568  graph->evalOpParm(myPrecision, nodeidx, "precision", time, graph->isDirect()?nullptr:depnode);
569  myImportPrequel = true;
570  if (true)
571  graph->evalOpParm(myImportPrequel, nodeidx, "importprequel", time, graph->isDirect()?nullptr:depnode);
572  if (true)
573  {
574  int64 length = 0;
575  graph->evalOpParm(length, nodeidx, "bindings", time, graph->isDirect()?nullptr:depnode);
576  if (length < 0) length = 0;
577  myBindings.setSize(length);
578  for (exint i = 0; i < length; i++)
579  {
580  int parmidx[1];
581  int offsets[1];
582  parmidx[0] = i+1;
583  offsets[0] = 1;
584  auto && _curentry = myBindings(i);
585  (void) _curentry;
586  _curentry.bindings_name = ""_UTsh;
587  if (true)
588  graph->evalOpParmInst(_curentry.bindings_name, nodeidx, "bindings#_name", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
589  _curentry.bindings_type = 0;
590  if (true)
591  graph->evalOpParmInst(_curentry.bindings_type, nodeidx, "bindings#_type", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
592  _curentry.bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
593  if (true && ( (true&&!(((_curentry.bindings_type!=4)))) ) )
594  graph->evalOpParmInst(_curentry.bindings_ramp, nodeidx, "bindings#_ramp", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
595  _curentry.bindings_rampsize = 1024;
596  if (true && ( (true&&!(((_curentry.bindings_type!=4)))) ) )
597  graph->evalOpParmInst(_curentry.bindings_rampsize, nodeidx, "bindings#_rampsize", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
598  _curentry.bindings_input = 0;
599  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)&&(_curentry.bindings_type!=5)))) ) )
600  graph->evalOpParmInst(_curentry.bindings_input, nodeidx, "bindings#_input", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
601  _curentry.bindings_volume = ""_UTsh;
602  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
603  graph->evalOpParmInst(_curentry.bindings_volume, nodeidx, "bindings#_volume", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
604  _curentry.bindings_vdbtype = 0;
605  if (true && ( (true&&!(((_curentry.bindings_type!=7)))) ) )
606  graph->evalOpParmInst(_curentry.bindings_vdbtype, nodeidx, "bindings#_vdbtype", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
607  _curentry.bindings_forcealign = true;
608  if (true && ( (true&&!(((_curentry.bindings_type!=6)))) ) )
609  graph->evalOpParmInst(_curentry.bindings_forcealign, nodeidx, "bindings#_forcealign", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
610  _curentry.bindings_resolution = false;
611  if (true && ( (true&&!(((_curentry.bindings_type!=6))||((_curentry.bindings_forcealign==1)))) ) )
612  graph->evalOpParmInst(_curentry.bindings_resolution, nodeidx, "bindings#_resolution", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
613  _curentry.bindings_voxelsize = false;
614  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
615  graph->evalOpParmInst(_curentry.bindings_voxelsize, nodeidx, "bindings#_voxelsize", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
616  _curentry.bindings_xformtoworld = false;
617  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
618  graph->evalOpParmInst(_curentry.bindings_xformtoworld, nodeidx, "bindings#_xformtoworld", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
619  _curentry.bindings_xformtovoxel = false;
620  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
621  graph->evalOpParmInst(_curentry.bindings_xformtovoxel, nodeidx, "bindings#_xformtovoxel", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
622  _curentry.bindings_attribute = ""_UTsh;
623  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
624  graph->evalOpParmInst(_curentry.bindings_attribute, nodeidx, "bindings#_attribute", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
625  _curentry.bindings_attribclass = 2;
626  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
627  graph->evalOpParmInst(_curentry.bindings_attribclass, nodeidx, "bindings#_attribclass", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
628  _curentry.bindings_attribtype = 0;
629  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
630  graph->evalOpParmInst(_curentry.bindings_attribtype, nodeidx, "bindings#_attribtype", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
631  _curentry.bindings_attribsize = 1;
632  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
633  graph->evalOpParmInst(_curentry.bindings_attribsize, nodeidx, "bindings#_attribsize", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
634  _curentry.bindings_precision = 2;
635  if (true)
636  graph->evalOpParmInst(_curentry.bindings_precision, nodeidx, "bindings#_precision", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
637  _curentry.bindings_readable = true;
638  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)))) ) )
639  graph->evalOpParmInst(_curentry.bindings_readable, nodeidx, "bindings#_readable", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
640  _curentry.bindings_writeable = false;
641  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
642  graph->evalOpParmInst(_curentry.bindings_writeable, nodeidx, "bindings#_writeable", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
643  _curentry.bindings_optional = false;
644  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
645  graph->evalOpParmInst(_curentry.bindings_optional, nodeidx, "bindings#_optional", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
646  _curentry.bindings_defval = false;
647  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_optional==0))||((_curentry.bindings_attribtype!=1)&&(_curentry.bindings_attribtype!=0)))) ) )
648  graph->evalOpParmInst(_curentry.bindings_defval, nodeidx, "bindings#_defval", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
649  _curentry.bindings_intval = 0;
650  if (true && ( (true&&!(((_curentry.bindings_type!=0)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=1)))) ) )
651  graph->evalOpParmInst(_curentry.bindings_intval, nodeidx, "bindings#_intval", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
652  _curentry.bindings_fval = 0;
653  if (true && ( (true&&!(((_curentry.bindings_type!=1)&&(_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==2))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==3))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==4))||((_curentry.bindings_type==6)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==6)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==7)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==7)&&(_curentry.bindings_defval==0)))) ) )
654  graph->evalOpParmInst(_curentry.bindings_fval, nodeidx, "bindings#_fval", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
655  _curentry.bindings_v2val = UT_Vector2D(0,0);
656  if (true && ( (true&&!(((_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=2)))) ) )
657  graph->evalOpParmInst(_curentry.bindings_v2val, nodeidx, "bindings#_v2val", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
658  _curentry.bindings_v3val = UT_Vector3D(0,0,0);
659  if (true && ( (true&&!(((_curentry.bindings_type!=2)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=3)))) ) )
660  graph->evalOpParmInst(_curentry.bindings_v3val, nodeidx, "bindings#_v3val", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
661  _curentry.bindings_v4val = UT_Vector4D(0,0,0,0);
662  if (true && ( (true&&!(((_curentry.bindings_type!=3)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=4)))) ) )
663  graph->evalOpParmInst(_curentry.bindings_v4val, nodeidx, "bindings#_v4val", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
664  _curentry.bindings_timescale = 0;
665  if (true && ( (true&&!(((_curentry.bindings_type!=1)))) ) )
666  graph->evalOpParmInst(_curentry.bindings_timescale, nodeidx, "bindings#_timescale", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
667 
668  }
669  }
670  else
671  myBindings.clear();
672  myGeneratedCode = ""_UTsh;
673  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||(((graph->getInput(nodeidx,0)>=0)==1)))) ) )
674  graph->evalOpParm(myGeneratedCode, nodeidx, "generatedcode", time, graph->isDirect()?nullptr:depnode);
675 
676  }
677 
678 
679  void loadFromOpSubclass(const LoadParms &loadparms) override
680  {
681  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
682  }
683 
684 
685  void copyFrom(const OP_NodeParms *src) override
686  {
687  *this = *((const SOP_OpenCLParms *)src);
688  }
689 
690  template <typename T>
691  void
692  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
693  {
694  if (idx.size() < 1)
695  return;
696  UT_ASSERT(idx.size() == instance.size()+1);
697  if (idx.size() != instance.size()+1)
698  return;
699  switch (idx[0])
700  {
701  case 0:
702  coerceValue(value, myKernelName);
703  break;
704  case 1:
705  coerceValue(value, myUseCode);
706  break;
707  case 2:
708  coerceValue(value, myKernelFile);
709  break;
710  case 3:
711  coerceValue(value, myKernelCode);
712  break;
713  case 4:
714  coerceValue(value, myAtBinding);
715  break;
716  case 5:
717  coerceValue(value, myKernelOptions);
718  break;
719  case 6:
720  coerceValue(value, myKernelOptionAttrib);
721  break;
722  case 7:
723  coerceValue(value, myUseWriteBackKernel);
724  break;
725  case 8:
726  coerceValue(value, myWriteBackKernelName);
727  break;
728  case 9:
729  coerceValue(value, myRecompile);
730  break;
731  case 10:
732  coerceValue(value, myRunOver);
733  break;
734  case 11:
735  coerceValue(value, myIterations);
736  break;
737  case 12:
738  coerceValue(value, myIteration);
739  break;
740  case 13:
741  coerceValue(value, myWorksets_begin);
742  break;
743  case 14:
744  coerceValue(value, myWorksets_length);
745  break;
746  case 15:
747  coerceValue(value, mySingleworkgroup);
748  break;
749  case 16:
750  coerceValue(value, myFinish);
751  break;
752  case 17:
753  coerceValue(value, myTime);
754  break;
755  case 18:
756  coerceValue(value, myTimeInc);
757  break;
758  case 19:
759  coerceValue(value, myTimescale);
760  break;
761  case 20:
762  coerceValue(value, myTimemethod);
763  break;
764  case 21:
765  coerceValue(value, myXnoise);
766  break;
767  case 22:
768  coerceValue(value, myPrecision);
769  break;
770  case 23:
771  coerceValue(value, myImportPrequel);
772  break;
773  case 24:
774  if (idx.size() == 1)
775  coerceValue(value, myBindings.entries());
776  else if (instance[0] < myBindings.entries())
777  {
778  auto && _data = myBindings(instance[0]);
779  switch (idx[1])
780  {
781  case 0:
782  coerceValue(value, _data.bindings_name);
783  break;
784  case 1:
785  coerceValue(value, _data.bindings_type);
786  break;
787  case 2:
788  coerceValue(value, _data.bindings_ramp);
789  break;
790  case 3:
791  coerceValue(value, _data.bindings_rampsize);
792  break;
793  case 4:
794  coerceValue(value, _data.bindings_input);
795  break;
796  case 5:
797  coerceValue(value, _data.bindings_volume);
798  break;
799  case 6:
800  coerceValue(value, _data.bindings_vdbtype);
801  break;
802  case 7:
803  coerceValue(value, _data.bindings_forcealign);
804  break;
805  case 8:
806  coerceValue(value, _data.bindings_resolution);
807  break;
808  case 9:
809  coerceValue(value, _data.bindings_voxelsize);
810  break;
811  case 10:
812  coerceValue(value, _data.bindings_xformtoworld);
813  break;
814  case 11:
815  coerceValue(value, _data.bindings_xformtovoxel);
816  break;
817  case 12:
818  coerceValue(value, _data.bindings_attribute);
819  break;
820  case 13:
821  coerceValue(value, _data.bindings_attribclass);
822  break;
823  case 14:
824  coerceValue(value, _data.bindings_attribtype);
825  break;
826  case 15:
827  coerceValue(value, _data.bindings_attribsize);
828  break;
829  case 16:
830  coerceValue(value, _data.bindings_precision);
831  break;
832  case 17:
833  coerceValue(value, _data.bindings_readable);
834  break;
835  case 18:
836  coerceValue(value, _data.bindings_writeable);
837  break;
838  case 19:
839  coerceValue(value, _data.bindings_optional);
840  break;
841  case 20:
842  coerceValue(value, _data.bindings_defval);
843  break;
844  case 21:
845  coerceValue(value, _data.bindings_intval);
846  break;
847  case 22:
848  coerceValue(value, _data.bindings_fval);
849  break;
850  case 23:
851  coerceValue(value, _data.bindings_v2val);
852  break;
853  case 24:
854  coerceValue(value, _data.bindings_v3val);
855  break;
856  case 25:
857  coerceValue(value, _data.bindings_v4val);
858  break;
859  case 26:
860  coerceValue(value, _data.bindings_timescale);
861  break;
862 
863  }
864  }
865  break;
866  case 25:
867  coerceValue(value, myGeneratedCode);
868  break;
869 
870  }
871  }
872 
873  bool isParmColorRamp(exint idx) const override
874  {
875  switch (idx)
876  {
877 
878  }
879  return false;
880  }
881 
882  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
883  { doGetParmValue(idx, instance, value); }
884  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
885  { doGetParmValue(idx, instance, value); }
886  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
887  { doGetParmValue(idx, instance, value); }
888  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
889  { doGetParmValue(idx, instance, value); }
890  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
891  { doGetParmValue(idx, instance, value); }
892  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
893  { doGetParmValue(idx, instance, value); }
894  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
895  { doGetParmValue(idx, instance, value); }
896  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
897  { doGetParmValue(idx, instance, value); }
898  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
899  { doGetParmValue(idx, instance, value); }
900  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
901  { doGetParmValue(idx, instance, value); }
902  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
903  { doGetParmValue(idx, instance, value); }
904 
905  template <typename T>
906  void
907  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
908  {
909  if (idx.size() < 1)
910  return;
911  UT_ASSERT(idx.size() == instance.size()+1);
912  if (idx.size() != instance.size()+1)
913  return;
914  switch (idx[0])
915  {
916  case 0:
917  coerceValue(myKernelName, ( ( value ) ));
918  break;
919  case 1:
920  coerceValue(myUseCode, ( ( value ) ));
921  break;
922  case 2:
923  coerceValue(myKernelFile, ( ( value ) ));
924  break;
925  case 3:
926  coerceValue(myKernelCode, ( ( value ) ));
927  break;
928  case 4:
929  coerceValue(myAtBinding, ( ( value ) ));
930  break;
931  case 5:
932  coerceValue(myKernelOptions, ( ( value ) ));
933  break;
934  case 6:
935  coerceValue(myKernelOptionAttrib, ( ( value ) ));
936  break;
937  case 7:
938  coerceValue(myUseWriteBackKernel, ( ( value ) ));
939  break;
940  case 8:
941  coerceValue(myWriteBackKernelName, ( ( value ) ));
942  break;
943  case 9:
944  coerceValue(myRecompile, ( ( value ) ));
945  break;
946  case 10:
947  coerceValue(myRunOver, clampMinValue(0, clampMaxValue(3, value ) ));
948  break;
949  case 11:
950  coerceValue(myIterations, ( ( value ) ));
951  break;
952  case 12:
953  coerceValue(myIteration, ( ( value ) ));
954  break;
955  case 13:
956  coerceValue(myWorksets_begin, ( ( value ) ));
957  break;
958  case 14:
959  coerceValue(myWorksets_length, ( ( value ) ));
960  break;
961  case 15:
962  coerceValue(mySingleworkgroup, ( ( value ) ));
963  break;
964  case 16:
965  coerceValue(myFinish, ( ( value ) ));
966  break;
967  case 17:
968  coerceValue(myTime, ( ( value ) ));
969  break;
970  case 18:
971  coerceValue(myTimeInc, ( ( value ) ));
972  break;
973  case 19:
974  coerceValue(myTimescale, ( ( value ) ));
975  break;
976  case 20:
977  coerceValue(myTimemethod, clampMinValue(0, clampMaxValue(1, value ) ));
978  break;
979  case 21:
980  coerceValue(myXnoise, ( ( value ) ));
981  break;
982  case 22:
983  coerceValue(myPrecision, clampMinValue(0, clampMaxValue(3, value ) ));
984  break;
985  case 23:
986  coerceValue(myImportPrequel, ( ( value ) ));
987  break;
988  case 24:
989  if (idx.size() == 1)
990  {
991  exint newsize;
992  coerceValue(newsize, value);
993  if (newsize < 0) newsize = 0;
994  myBindings.setSize(newsize);
995  }
996  else
997  {
998  if (instance[0] < 0)
999  return;
1000  myBindings.setSizeIfNeeded(instance[0]+1);
1001  auto && _data = myBindings(instance[0]);
1002  switch (idx[1])
1003  {
1004  case 0:
1005  coerceValue(_data.bindings_name, value);
1006  break;
1007  case 1:
1008  coerceValue(_data.bindings_type, value);
1009  break;
1010  case 2:
1011  coerceValue(_data.bindings_ramp, value);
1012  break;
1013  case 3:
1014  coerceValue(_data.bindings_rampsize, value);
1015  break;
1016  case 4:
1017  coerceValue(_data.bindings_input, value);
1018  break;
1019  case 5:
1020  coerceValue(_data.bindings_volume, value);
1021  break;
1022  case 6:
1023  coerceValue(_data.bindings_vdbtype, value);
1024  break;
1025  case 7:
1026  coerceValue(_data.bindings_forcealign, value);
1027  break;
1028  case 8:
1029  coerceValue(_data.bindings_resolution, value);
1030  break;
1031  case 9:
1032  coerceValue(_data.bindings_voxelsize, value);
1033  break;
1034  case 10:
1035  coerceValue(_data.bindings_xformtoworld, value);
1036  break;
1037  case 11:
1038  coerceValue(_data.bindings_xformtovoxel, value);
1039  break;
1040  case 12:
1041  coerceValue(_data.bindings_attribute, value);
1042  break;
1043  case 13:
1044  coerceValue(_data.bindings_attribclass, value);
1045  break;
1046  case 14:
1047  coerceValue(_data.bindings_attribtype, value);
1048  break;
1049  case 15:
1050  coerceValue(_data.bindings_attribsize, value);
1051  break;
1052  case 16:
1053  coerceValue(_data.bindings_precision, value);
1054  break;
1055  case 17:
1056  coerceValue(_data.bindings_readable, value);
1057  break;
1058  case 18:
1059  coerceValue(_data.bindings_writeable, value);
1060  break;
1061  case 19:
1062  coerceValue(_data.bindings_optional, value);
1063  break;
1064  case 20:
1065  coerceValue(_data.bindings_defval, value);
1066  break;
1067  case 21:
1068  coerceValue(_data.bindings_intval, value);
1069  break;
1070  case 22:
1071  coerceValue(_data.bindings_fval, value);
1072  break;
1073  case 23:
1074  coerceValue(_data.bindings_v2val, value);
1075  break;
1076  case 24:
1077  coerceValue(_data.bindings_v3val, value);
1078  break;
1079  case 25:
1080  coerceValue(_data.bindings_v4val, value);
1081  break;
1082  case 26:
1083  coerceValue(_data.bindings_timescale, value);
1084  break;
1085 
1086  }
1087  }
1088  break;
1089  case 25:
1090  coerceValue(myGeneratedCode, ( ( value ) ));
1091  break;
1092 
1093  }
1094  }
1095 
1096  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
1097  { doSetParmValue(idx, instance, value); }
1098  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
1099  { doSetParmValue(idx, instance, value); }
1100  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
1101  { doSetParmValue(idx, instance, value); }
1102  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
1103  { doSetParmValue(idx, instance, value); }
1104  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
1105  { doSetParmValue(idx, instance, value); }
1106  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
1107  { doSetParmValue(idx, instance, value); }
1108  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
1109  { doSetParmValue(idx, instance, value); }
1110  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
1111  { doSetParmValue(idx, instance, value); }
1112  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
1113  { doSetParmValue(idx, instance, value); }
1114  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
1115  { doSetParmValue(idx, instance, value); }
1116  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
1117  { doSetParmValue(idx, instance, value); }
1118 
1119  exint getNestNumParms(TempIndex idx) const override
1120  {
1121  if (idx.size() == 0)
1122  return 26;
1123  switch (idx[0])
1124  {
1125  case 24:
1126  return 27;
1127 
1128  }
1129  // Invalid
1130  return 0;
1131  }
1132 
1133  const char *getNestParmName(TempIndex fieldnum) const override
1134  {
1135  if (fieldnum.size() < 1)
1136  return 0;
1137  switch (fieldnum[0])
1138  {
1139  case 0:
1140  return "kernelname";
1141  case 1:
1142  return "usecode";
1143  case 2:
1144  return "kernelfile";
1145  case 3:
1146  return "kernelcode";
1147  case 4:
1148  return "atbinding";
1149  case 5:
1150  return "kerneloptions";
1151  case 6:
1152  return "kerneloptionattrib";
1153  case 7:
1154  return "usewritebackkernel";
1155  case 8:
1156  return "writebackkernelname";
1157  case 9:
1158  return "recompile";
1159  case 10:
1160  return "runover";
1161  case 11:
1162  return "iterations";
1163  case 12:
1164  return "iteration";
1165  case 13:
1166  return "worksets_begin";
1167  case 14:
1168  return "worksets_length";
1169  case 15:
1170  return "singleworkgroup";
1171  case 16:
1172  return "finish";
1173  case 17:
1174  return "time";
1175  case 18:
1176  return "timeinc";
1177  case 19:
1178  return "timescale";
1179  case 20:
1180  return "timemethod";
1181  case 21:
1182  return "xnoise";
1183  case 22:
1184  return "precision";
1185  case 23:
1186  return "importprequel";
1187  case 24:
1188  if (fieldnum.size() == 1)
1189  return "bindings";
1190  switch (fieldnum[1])
1191  {
1192  case 0:
1193  return "bindings#_name";
1194  case 1:
1195  return "bindings#_type";
1196  case 2:
1197  return "bindings#_ramp";
1198  case 3:
1199  return "bindings#_rampsize";
1200  case 4:
1201  return "bindings#_input";
1202  case 5:
1203  return "bindings#_volume";
1204  case 6:
1205  return "bindings#_vdbtype";
1206  case 7:
1207  return "bindings#_forcealign";
1208  case 8:
1209  return "bindings#_resolution";
1210  case 9:
1211  return "bindings#_voxelsize";
1212  case 10:
1213  return "bindings#_xformtoworld";
1214  case 11:
1215  return "bindings#_xformtovoxel";
1216  case 12:
1217  return "bindings#_attribute";
1218  case 13:
1219  return "bindings#_attribclass";
1220  case 14:
1221  return "bindings#_attribtype";
1222  case 15:
1223  return "bindings#_attribsize";
1224  case 16:
1225  return "bindings#_precision";
1226  case 17:
1227  return "bindings#_readable";
1228  case 18:
1229  return "bindings#_writeable";
1230  case 19:
1231  return "bindings#_optional";
1232  case 20:
1233  return "bindings#_defval";
1234  case 21:
1235  return "bindings#_intval";
1236  case 22:
1237  return "bindings#_fval";
1238  case 23:
1239  return "bindings#_v2val";
1240  case 24:
1241  return "bindings#_v3val";
1242  case 25:
1243  return "bindings#_v4val";
1244  case 26:
1245  return "bindings#_timescale";
1246 
1247  }
1248  return 0;
1249  case 25:
1250  return "generatedcode";
1251 
1252  }
1253  return 0;
1254  }
1255 
1256  ParmType getNestParmType(TempIndex fieldnum) const override
1257  {
1258  if (fieldnum.size() < 1)
1259  return PARM_UNSUPPORTED;
1260  switch (fieldnum[0])
1261  {
1262  case 0:
1263  return PARM_STRING;
1264  case 1:
1265  return PARM_INTEGER;
1266  case 2:
1267  return PARM_STRING;
1268  case 3:
1269  return PARM_STRING;
1270  case 4:
1271  return PARM_INTEGER;
1272  case 5:
1273  return PARM_STRING;
1274  case 6:
1275  return PARM_STRING;
1276  case 7:
1277  return PARM_INTEGER;
1278  case 8:
1279  return PARM_STRING;
1280  case 9:
1281  return PARM_INTEGER;
1282  case 10:
1283  return PARM_INTEGER;
1284  case 11:
1285  return PARM_INTEGER;
1286  case 12:
1287  return PARM_INTEGER;
1288  case 13:
1289  return PARM_STRING;
1290  case 14:
1291  return PARM_STRING;
1292  case 15:
1293  return PARM_INTEGER;
1294  case 16:
1295  return PARM_INTEGER;
1296  case 17:
1297  return PARM_INTEGER;
1298  case 18:
1299  return PARM_INTEGER;
1300  case 19:
1301  return PARM_FLOAT;
1302  case 20:
1303  return PARM_INTEGER;
1304  case 21:
1305  return PARM_INTEGER;
1306  case 22:
1307  return PARM_INTEGER;
1308  case 23:
1309  return PARM_INTEGER;
1310  case 24:
1311  if (fieldnum.size() == 1)
1312  return PARM_MULTIPARM;
1313  switch (fieldnum[1])
1314  {
1315  case 0:
1316  return PARM_STRING;
1317  case 1:
1318  return PARM_INTEGER;
1319  case 2:
1320  return PARM_RAMP;
1321  case 3:
1322  return PARM_INTEGER;
1323  case 4:
1324  return PARM_INTEGER;
1325  case 5:
1326  return PARM_STRING;
1327  case 6:
1328  return PARM_INTEGER;
1329  case 7:
1330  return PARM_INTEGER;
1331  case 8:
1332  return PARM_INTEGER;
1333  case 9:
1334  return PARM_INTEGER;
1335  case 10:
1336  return PARM_INTEGER;
1337  case 11:
1338  return PARM_INTEGER;
1339  case 12:
1340  return PARM_STRING;
1341  case 13:
1342  return PARM_INTEGER;
1343  case 14:
1344  return PARM_INTEGER;
1345  case 15:
1346  return PARM_INTEGER;
1347  case 16:
1348  return PARM_INTEGER;
1349  case 17:
1350  return PARM_INTEGER;
1351  case 18:
1352  return PARM_INTEGER;
1353  case 19:
1354  return PARM_INTEGER;
1355  case 20:
1356  return PARM_INTEGER;
1357  case 21:
1358  return PARM_INTEGER;
1359  case 22:
1360  return PARM_FLOAT;
1361  case 23:
1362  return PARM_VECTOR2;
1363  case 24:
1364  return PARM_VECTOR3;
1365  case 25:
1366  return PARM_VECTOR4;
1367  case 26:
1368  return PARM_INTEGER;
1369 
1370  }
1371  return PARM_UNSUPPORTED;
1372  case 25:
1373  return PARM_STRING;
1374 
1375  }
1376  return PARM_UNSUPPORTED;
1377  }
1378 
1379  // Boiler plate to load individual types.
1380  static void loadData(UT_IStream &is, int64 &v)
1381  { is.bread(&v, 1); }
1382  static void loadData(UT_IStream &is, bool &v)
1383  { int64 iv; is.bread(&iv, 1); v = iv; }
1384  static void loadData(UT_IStream &is, fpreal64 &v)
1385  { is.bread<fpreal64>(&v, 1); }
1386  static void loadData(UT_IStream &is, UT_Vector2D &v)
1387  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1388  static void loadData(UT_IStream &is, UT_Vector3D &v)
1389  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1390  is.bread<fpreal64>(&v.z(), 1); }
1391  static void loadData(UT_IStream &is, UT_Vector4D &v)
1392  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1393  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1394  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1395  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1396  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1397  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1398  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1399  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1400  static void loadData(UT_IStream &is, UT_Vector2I &v)
1401  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1402  static void loadData(UT_IStream &is, UT_Vector3I &v)
1403  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1404  is.bread<int64>(&v.z(), 1); }
1405  static void loadData(UT_IStream &is, UT_Vector4I &v)
1406  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1407  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1409  { is.bread(v); }
1411  { UT_StringHolder rampdata;
1412  loadData(is, rampdata);
1413  if (rampdata.isstring())
1414  {
1415  v.reset(new UT_Ramp());
1416  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1417  v->load(istr);
1418  }
1419  else v.reset();
1420  }
1423  loadData(is, data);
1424  if (data.isstring())
1425  {
1426  // Find the data type.
1427  const char *colon = UT_StringWrap(data).findChar(':');
1428  if (colon)
1429  {
1430  int typelen = colon - data.buffer();
1432  type.strncpy(data.buffer(), typelen);
1433  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1434 
1435  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1436  }
1437  }
1438  else v.reset();
1439  }
1440 
1441  static void saveData(std::ostream &os, int64 v)
1442  { UTwrite(os, &v); }
1443  static void saveData(std::ostream &os, bool v)
1444  { int64 iv = v; UTwrite(os, &iv); }
1445  static void saveData(std::ostream &os, fpreal64 v)
1446  { UTwrite<fpreal64>(os, &v); }
1447  static void saveData(std::ostream &os, UT_Vector2D v)
1448  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1449  static void saveData(std::ostream &os, UT_Vector3D v)
1450  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1451  UTwrite<fpreal64>(os, &v.z()); }
1452  static void saveData(std::ostream &os, UT_Vector4D v)
1453  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1454  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1455  static void saveData(std::ostream &os, UT_Matrix2D v)
1457  static void saveData(std::ostream &os, UT_Matrix3D v)
1459  static void saveData(std::ostream &os, UT_Matrix4D v)
1461  static void saveData(std::ostream &os, UT_StringHolder s)
1462  { UT_StringWrap(s).saveBinary(os); }
1463  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1465  UT_OStringStream ostr;
1466  if (s) s->save(ostr);
1467  result = ostr.str();
1468  saveData(os, result);
1469  }
1470  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1472  UT_OStringStream ostr;
1473  if (s)
1474  {
1475  ostr << s->getDataTypeToken();
1476  ostr << ":";
1477  s->saveBinary(ostr);
1478  }
1479  result = ostr.str();
1480  saveData(os, result);
1481  }
1482 
1483 
1484  void save(std::ostream &os) const
1485  {
1486  int32 v = version();
1487  UTwrite(os, &v);
1488  saveData(os, myKernelName);
1489  saveData(os, myUseCode);
1490  saveData(os, myKernelFile);
1491  saveData(os, myKernelCode);
1492  saveData(os, myAtBinding);
1493  saveData(os, myKernelOptions);
1494  saveData(os, myKernelOptionAttrib);
1495  saveData(os, myUseWriteBackKernel);
1496  saveData(os, myWriteBackKernelName);
1497  saveData(os, myRecompile);
1498  saveData(os, myRunOver);
1499  saveData(os, myIterations);
1500  saveData(os, myIteration);
1501  saveData(os, myWorksets_begin);
1502  saveData(os, myWorksets_length);
1503  saveData(os, mySingleworkgroup);
1504  saveData(os, myFinish);
1505  saveData(os, myTime);
1506  saveData(os, myTimeInc);
1507  saveData(os, myTimescale);
1508  saveData(os, myTimemethod);
1509  saveData(os, myXnoise);
1510  saveData(os, myPrecision);
1511  saveData(os, myImportPrequel);
1512  {
1513  int64 length = myBindings.entries();
1514  UTwrite(os, &length);
1515  for (exint i = 0; i < length; i++)
1516  {
1517  auto && _curentry = myBindings(i);
1518  (void) _curentry;
1519  saveData(os, _curentry.bindings_name);
1520  saveData(os, _curentry.bindings_type);
1521  saveData(os, _curentry.bindings_ramp);
1522  saveData(os, _curentry.bindings_rampsize);
1523  saveData(os, _curentry.bindings_input);
1524  saveData(os, _curentry.bindings_volume);
1525  saveData(os, _curentry.bindings_vdbtype);
1526  saveData(os, _curentry.bindings_forcealign);
1527  saveData(os, _curentry.bindings_resolution);
1528  saveData(os, _curentry.bindings_voxelsize);
1529  saveData(os, _curentry.bindings_xformtoworld);
1530  saveData(os, _curentry.bindings_xformtovoxel);
1531  saveData(os, _curentry.bindings_attribute);
1532  saveData(os, _curentry.bindings_attribclass);
1533  saveData(os, _curentry.bindings_attribtype);
1534  saveData(os, _curentry.bindings_attribsize);
1535  saveData(os, _curentry.bindings_precision);
1536  saveData(os, _curentry.bindings_readable);
1537  saveData(os, _curentry.bindings_writeable);
1538  saveData(os, _curentry.bindings_optional);
1539  saveData(os, _curentry.bindings_defval);
1540  saveData(os, _curentry.bindings_intval);
1541  saveData(os, _curentry.bindings_fval);
1542  saveData(os, _curentry.bindings_v2val);
1543  saveData(os, _curentry.bindings_v3val);
1544  saveData(os, _curentry.bindings_v4val);
1545  saveData(os, _curentry.bindings_timescale);
1546 
1547  }
1548  }
1549  saveData(os, myGeneratedCode);
1550 
1551  }
1552 
1553  bool load(UT_IStream &is)
1554  {
1555  int32 v;
1556  is.bread(&v, 1);
1557  if (version() != v)
1558  {
1559  // Fail incompatible versions
1560  return false;
1561  }
1562  loadData(is, myKernelName);
1563  loadData(is, myUseCode);
1564  loadData(is, myKernelFile);
1565  loadData(is, myKernelCode);
1566  loadData(is, myAtBinding);
1567  loadData(is, myKernelOptions);
1568  loadData(is, myKernelOptionAttrib);
1569  loadData(is, myUseWriteBackKernel);
1570  loadData(is, myWriteBackKernelName);
1571  loadData(is, myRecompile);
1572  loadData(is, myRunOver);
1573  loadData(is, myIterations);
1574  loadData(is, myIteration);
1575  loadData(is, myWorksets_begin);
1576  loadData(is, myWorksets_length);
1577  loadData(is, mySingleworkgroup);
1578  loadData(is, myFinish);
1579  loadData(is, myTime);
1580  loadData(is, myTimeInc);
1581  loadData(is, myTimescale);
1582  loadData(is, myTimemethod);
1583  loadData(is, myXnoise);
1584  loadData(is, myPrecision);
1585  loadData(is, myImportPrequel);
1586  {
1587  int64 length;
1588  is.read(&length, 1);
1589  myBindings.setSize(length);
1590  for (exint i = 0; i < length; i++)
1591  {
1592  auto && _curentry = myBindings(i);
1593  (void) _curentry;
1594  loadData(is, _curentry.bindings_name);
1595  loadData(is, _curentry.bindings_type);
1596  loadData(is, _curentry.bindings_ramp);
1597  loadData(is, _curentry.bindings_rampsize);
1598  loadData(is, _curentry.bindings_input);
1599  loadData(is, _curentry.bindings_volume);
1600  loadData(is, _curentry.bindings_vdbtype);
1601  loadData(is, _curentry.bindings_forcealign);
1602  loadData(is, _curentry.bindings_resolution);
1603  loadData(is, _curentry.bindings_voxelsize);
1604  loadData(is, _curentry.bindings_xformtoworld);
1605  loadData(is, _curentry.bindings_xformtovoxel);
1606  loadData(is, _curentry.bindings_attribute);
1607  loadData(is, _curentry.bindings_attribclass);
1608  loadData(is, _curentry.bindings_attribtype);
1609  loadData(is, _curentry.bindings_attribsize);
1610  loadData(is, _curentry.bindings_precision);
1611  loadData(is, _curentry.bindings_readable);
1612  loadData(is, _curentry.bindings_writeable);
1613  loadData(is, _curentry.bindings_optional);
1614  loadData(is, _curentry.bindings_defval);
1615  loadData(is, _curentry.bindings_intval);
1616  loadData(is, _curentry.bindings_fval);
1617  loadData(is, _curentry.bindings_v2val);
1618  loadData(is, _curentry.bindings_v3val);
1619  loadData(is, _curentry.bindings_v4val);
1620  loadData(is, _curentry.bindings_timescale);
1621 
1622  }
1623  }
1624  loadData(is, myGeneratedCode);
1625 
1626  return true;
1627  }
1628 
1629  const UT_StringHolder & getKernelName() const { return myKernelName; }
1630  void setKernelName(const UT_StringHolder & val) { myKernelName = val; }
1632  {
1633  SOP_Node *thissop = cookparms.getNode();
1634  if (!thissop) return getKernelName();
1636  OP_Utils::evalOpParm(result, thissop, "kernelname", cookparms.getCookTime(), 0);
1637  return result;
1638  }
1639  bool getUseCode() const { return myUseCode; }
1640  void setUseCode(bool val) { myUseCode = val; }
1641  bool opUseCode(const SOP_NodeVerb::CookParms &cookparms) const
1642  {
1643  SOP_Node *thissop = cookparms.getNode();
1644  if (!thissop) return getUseCode();
1645  bool result;
1646  OP_Utils::evalOpParm(result, thissop, "usecode", cookparms.getCookTime(), 0);
1647  return result;
1648  }
1649  const UT_StringHolder & getKernelFile() const { return myKernelFile; }
1650  void setKernelFile(const UT_StringHolder & val) { myKernelFile = val; }
1652  {
1653  SOP_Node *thissop = cookparms.getNode();
1654  if (!thissop) return getKernelFile();
1656  OP_Utils::evalOpParm(result, thissop, "kernelfile", cookparms.getCookTime(), 0);
1657  return result;
1658  }
1659  const UT_StringHolder & getKernelCode() const { return myKernelCode; }
1660  void setKernelCode(const UT_StringHolder & val) { myKernelCode = val; }
1662  {
1663  SOP_Node *thissop = cookparms.getNode();
1664  if (!thissop) return getKernelCode();
1666  OP_Utils::evalOpParm(result, thissop, "kernelcode", cookparms.getCookTime(), 0);
1667  return result;
1668  }
1669  bool getAtBinding() const { return myAtBinding; }
1670  void setAtBinding(bool val) { myAtBinding = val; }
1671  bool opAtBinding(const SOP_NodeVerb::CookParms &cookparms) const
1672  {
1673  SOP_Node *thissop = cookparms.getNode();
1674  if (!thissop) return getAtBinding();
1675  bool result;
1676  OP_Utils::evalOpParm(result, thissop, "atbinding", cookparms.getCookTime(), 0);
1677  return result;
1678  }
1679  const UT_StringHolder & getKernelOptions() const { return myKernelOptions; }
1680  void setKernelOptions(const UT_StringHolder & val) { myKernelOptions = val; }
1682  {
1683  SOP_Node *thissop = cookparms.getNode();
1684  if (!thissop) return getKernelOptions();
1686  OP_Utils::evalOpParm(result, thissop, "kerneloptions", cookparms.getCookTime(), 0);
1687  return result;
1688  }
1689  const UT_StringHolder & getKernelOptionAttrib() const { return myKernelOptionAttrib; }
1690  void setKernelOptionAttrib(const UT_StringHolder & val) { myKernelOptionAttrib = val; }
1692  {
1693  SOP_Node *thissop = cookparms.getNode();
1694  if (!thissop) return getKernelOptionAttrib();
1696  OP_Utils::evalOpParm(result, thissop, "kerneloptionattrib", cookparms.getCookTime(), 0);
1697  return result;
1698  }
1699  bool getUseWriteBackKernel() const { return myUseWriteBackKernel; }
1700  void setUseWriteBackKernel(bool val) { myUseWriteBackKernel = val; }
1701  bool opUseWriteBackKernel(const SOP_NodeVerb::CookParms &cookparms) const
1702  {
1703  SOP_Node *thissop = cookparms.getNode();
1704  if (!thissop) return getUseWriteBackKernel();
1705  bool result;
1706  OP_Utils::evalOpParm(result, thissop, "usewritebackkernel", cookparms.getCookTime(), 0);
1707  return result;
1708  }
1709  const UT_StringHolder & getWriteBackKernelName() const { return myWriteBackKernelName; }
1710  void setWriteBackKernelName(const UT_StringHolder & val) { myWriteBackKernelName = val; }
1712  {
1713  SOP_Node *thissop = cookparms.getNode();
1714  if (!thissop) return getWriteBackKernelName();
1716  OP_Utils::evalOpParm(result, thissop, "writebackkernelname", cookparms.getCookTime(), 0);
1717  return result;
1718  }
1719  bool getRecompile() const { return myRecompile; }
1720  void setRecompile(bool val) { myRecompile = val; }
1721  bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
1722  {
1723  SOP_Node *thissop = cookparms.getNode();
1724  if (!thissop) return getRecompile();
1725  bool result;
1726  OP_Utils::evalOpParm(result, thissop, "recompile", cookparms.getCookTime(), 0);
1727  return result;
1728  }
1729  RunOver getRunOver() const { return RunOver(myRunOver); }
1730  void setRunOver(RunOver val) { myRunOver = int64(val); }
1732  {
1733  SOP_Node *thissop = cookparms.getNode();
1734  if (!thissop) return getRunOver();
1735  int64 result;
1736  OP_Utils::evalOpParm(result, thissop, "runover", cookparms.getCookTime(), 0);
1737  return RunOver(result);
1738  }
1739  int64 getIterations() const { return myIterations; }
1740  void setIterations(int64 val) { myIterations = val; }
1742  {
1743  SOP_Node *thissop = cookparms.getNode();
1744  if (!thissop) return getIterations();
1745  int64 result;
1746  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
1747  return result;
1748  }
1749  bool getIteration() const { return myIteration; }
1750  void setIteration(bool val) { myIteration = val; }
1751  bool opIteration(const SOP_NodeVerb::CookParms &cookparms) const
1752  {
1753  SOP_Node *thissop = cookparms.getNode();
1754  if (!thissop) return getIteration();
1755  bool result;
1756  OP_Utils::evalOpParm(result, thissop, "iteration", cookparms.getCookTime(), 0);
1757  return result;
1758  }
1759  const UT_StringHolder & getWorksets_begin() const { return myWorksets_begin; }
1760  void setWorksets_begin(const UT_StringHolder & val) { myWorksets_begin = val; }
1762  {
1763  SOP_Node *thissop = cookparms.getNode();
1764  if (!thissop) return getWorksets_begin();
1766  OP_Utils::evalOpParm(result, thissop, "worksets_begin", cookparms.getCookTime(), 0);
1767  return result;
1768  }
1769  const UT_StringHolder & getWorksets_length() const { return myWorksets_length; }
1770  void setWorksets_length(const UT_StringHolder & val) { myWorksets_length = val; }
1772  {
1773  SOP_Node *thissop = cookparms.getNode();
1774  if (!thissop) return getWorksets_length();
1776  OP_Utils::evalOpParm(result, thissop, "worksets_length", cookparms.getCookTime(), 0);
1777  return result;
1778  }
1779  bool getSingleworkgroup() const { return mySingleworkgroup; }
1780  void setSingleworkgroup(bool val) { mySingleworkgroup = val; }
1781  bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
1782  {
1783  SOP_Node *thissop = cookparms.getNode();
1784  if (!thissop) return getSingleworkgroup();
1785  bool result;
1786  OP_Utils::evalOpParm(result, thissop, "singleworkgroup", cookparms.getCookTime(), 0);
1787  return result;
1788  }
1789  bool getFinish() const { return myFinish; }
1790  void setFinish(bool val) { myFinish = val; }
1791  bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
1792  {
1793  SOP_Node *thissop = cookparms.getNode();
1794  if (!thissop) return getFinish();
1795  bool result;
1796  OP_Utils::evalOpParm(result, thissop, "finish", cookparms.getCookTime(), 0);
1797  return result;
1798  }
1799  bool getTime() const { return myTime; }
1800  void setTime(bool val) { myTime = val; }
1801  bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
1802  {
1803  SOP_Node *thissop = cookparms.getNode();
1804  if (!thissop) return getTime();
1805  bool result;
1806  OP_Utils::evalOpParm(result, thissop, "time", cookparms.getCookTime(), 0);
1807  return result;
1808  }
1809  bool getTimeInc() const { return myTimeInc; }
1810  void setTimeInc(bool val) { myTimeInc = val; }
1811  bool opTimeInc(const SOP_NodeVerb::CookParms &cookparms) const
1812  {
1813  SOP_Node *thissop = cookparms.getNode();
1814  if (!thissop) return getTimeInc();
1815  bool result;
1816  OP_Utils::evalOpParm(result, thissop, "timeinc", cookparms.getCookTime(), 0);
1817  return result;
1818  }
1819  fpreal64 getTimescale() const { return myTimescale; }
1820  void setTimescale(fpreal64 val) { myTimescale = val; }
1822  {
1823  SOP_Node *thissop = cookparms.getNode();
1824  if (!thissop) return getTimescale();
1825  fpreal64 result;
1826  OP_Utils::evalOpParm(result, thissop, "timescale", cookparms.getCookTime(), 0);
1827  return result;
1828  }
1829  Timemethod getTimemethod() const { return Timemethod(myTimemethod); }
1830  void setTimemethod(Timemethod val) { myTimemethod = int64(val); }
1832  {
1833  SOP_Node *thissop = cookparms.getNode();
1834  if (!thissop) return getTimemethod();
1835  int64 result;
1836  OP_Utils::evalOpParm(result, thissop, "timemethod", cookparms.getCookTime(), 0);
1837  return Timemethod(result);
1838  }
1839  bool getXnoise() const { return myXnoise; }
1840  void setXnoise(bool val) { myXnoise = val; }
1841  bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
1842  {
1843  SOP_Node *thissop = cookparms.getNode();
1844  if (!thissop) return getXnoise();
1845  bool result;
1846  OP_Utils::evalOpParm(result, thissop, "xnoise", cookparms.getCookTime(), 0);
1847  return result;
1848  }
1849  Precision getPrecision() const { return Precision(myPrecision); }
1850  void setPrecision(Precision val) { myPrecision = int64(val); }
1852  {
1853  SOP_Node *thissop = cookparms.getNode();
1854  if (!thissop) return getPrecision();
1855  int64 result;
1856  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
1857  return Precision(result);
1858  }
1859  bool getImportPrequel() const { return myImportPrequel; }
1860  void setImportPrequel(bool val) { myImportPrequel = val; }
1861  bool opImportPrequel(const SOP_NodeVerb::CookParms &cookparms) const
1862  {
1863  SOP_Node *thissop = cookparms.getNode();
1864  if (!thissop) return getImportPrequel();
1865  bool result;
1866  OP_Utils::evalOpParm(result, thissop, "importprequel", cookparms.getCookTime(), 0);
1867  return result;
1868  }
1869  const UT_Array<Bindings> &getBindings() const { return myBindings; }
1870 void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
1871  exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
1872  {
1873  SOP_Node *thissop = cookparms.getNode();
1874  if (!thissop) return getBindings().entries();
1875  exint result;
1876  OP_Utils::evalOpParm(result, thissop, "bindings", cookparms.getCookTime(), 0);
1877  return result;
1878  }
1880  { return opinstBindings_bindings_name(cookparms, &_idx); }
1882  {
1883  SOP_Node *thissop = cookparms.getNode();
1884  if (!thissop) return (myBindings(_idx[0]).bindings_name);
1885  int _parmidx[2-1];
1886  _parmidx[1-1] = _idx[1-1] + 1;
1887 
1889  OP_Utils::evalOpParmInst(result, thissop, "bindings#_name", _parmidx, cookparms.getCookTime(), 0, 2-1);
1890  return (result);
1891  }
1892  int64 opBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1893  { return opinstBindings_bindings_type(cookparms, &_idx); }
1894  int64 opinstBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1895  {
1896  SOP_Node *thissop = cookparms.getNode();
1897  if (!thissop) return (myBindings(_idx[0]).bindings_type);
1898  int _parmidx[2-1];
1899  _parmidx[1-1] = _idx[1-1] + 1;
1900 
1901  int64 result;
1902  OP_Utils::evalOpParmInst(result, thissop, "bindings#_type", _parmidx, cookparms.getCookTime(), 0, 2-1);
1903  return (result);
1904  }
1906  { return opinstBindings_bindings_ramp(cookparms, &_idx); }
1908  {
1909  SOP_Node *thissop = cookparms.getNode();
1910  if (!thissop) return (myBindings(_idx[0]).bindings_ramp);
1911  int _parmidx[2-1];
1912  _parmidx[1-1] = _idx[1-1] + 1;
1913 
1915  OP_Utils::evalOpParmInst(result, thissop, "bindings#_ramp", _parmidx, cookparms.getCookTime(), 0, 2-1);
1916  return (result);
1917  }
1919  { return opinstBindings_bindings_rampsize(cookparms, &_idx); }
1920  int64 opinstBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1921  {
1922  SOP_Node *thissop = cookparms.getNode();
1923  if (!thissop) return (myBindings(_idx[0]).bindings_rampsize);
1924  int _parmidx[2-1];
1925  _parmidx[1-1] = _idx[1-1] + 1;
1926 
1927  int64 result;
1928  OP_Utils::evalOpParmInst(result, thissop, "bindings#_rampsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
1929  return (result);
1930  }
1931  int64 opBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1932  { return opinstBindings_bindings_input(cookparms, &_idx); }
1933  int64 opinstBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1934  {
1935  SOP_Node *thissop = cookparms.getNode();
1936  if (!thissop) return (myBindings(_idx[0]).bindings_input);
1937  int _parmidx[2-1];
1938  _parmidx[1-1] = _idx[1-1] + 1;
1939 
1940  int64 result;
1941  OP_Utils::evalOpParmInst(result, thissop, "bindings#_input", _parmidx, cookparms.getCookTime(), 0, 2-1);
1942  return (result);
1943  }
1945  { return opinstBindings_bindings_volume(cookparms, &_idx); }
1947  {
1948  SOP_Node *thissop = cookparms.getNode();
1949  if (!thissop) return (myBindings(_idx[0]).bindings_volume);
1950  int _parmidx[2-1];
1951  _parmidx[1-1] = _idx[1-1] + 1;
1952 
1954  OP_Utils::evalOpParmInst(result, thissop, "bindings#_volume", _parmidx, cookparms.getCookTime(), 0, 2-1);
1955  return (result);
1956  }
1958  { return opinstBindings_bindings_vdbtype(cookparms, &_idx); }
1959  int64 opinstBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1960  {
1961  SOP_Node *thissop = cookparms.getNode();
1962  if (!thissop) return (myBindings(_idx[0]).bindings_vdbtype);
1963  int _parmidx[2-1];
1964  _parmidx[1-1] = _idx[1-1] + 1;
1965 
1966  int64 result;
1967  OP_Utils::evalOpParmInst(result, thissop, "bindings#_vdbtype", _parmidx, cookparms.getCookTime(), 0, 2-1);
1968  return (result);
1969  }
1970  bool opBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1971  { return opinstBindings_bindings_forcealign(cookparms, &_idx); }
1972  bool opinstBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1973  {
1974  SOP_Node *thissop = cookparms.getNode();
1975  if (!thissop) return (myBindings(_idx[0]).bindings_forcealign);
1976  int _parmidx[2-1];
1977  _parmidx[1-1] = _idx[1-1] + 1;
1978 
1979  bool result;
1980  OP_Utils::evalOpParmInst(result, thissop, "bindings#_forcealign", _parmidx, cookparms.getCookTime(), 0, 2-1);
1981  return (result);
1982  }
1983  bool opBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1984  { return opinstBindings_bindings_resolution(cookparms, &_idx); }
1985  bool opinstBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1986  {
1987  SOP_Node *thissop = cookparms.getNode();
1988  if (!thissop) return (myBindings(_idx[0]).bindings_resolution);
1989  int _parmidx[2-1];
1990  _parmidx[1-1] = _idx[1-1] + 1;
1991 
1992  bool result;
1993  OP_Utils::evalOpParmInst(result, thissop, "bindings#_resolution", _parmidx, cookparms.getCookTime(), 0, 2-1);
1994  return (result);
1995  }
1996  bool opBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1997  { return opinstBindings_bindings_voxelsize(cookparms, &_idx); }
1998  bool opinstBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1999  {
2000  SOP_Node *thissop = cookparms.getNode();
2001  if (!thissop) return (myBindings(_idx[0]).bindings_voxelsize);
2002  int _parmidx[2-1];
2003  _parmidx[1-1] = _idx[1-1] + 1;
2004 
2005  bool result;
2006  OP_Utils::evalOpParmInst(result, thissop, "bindings#_voxelsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
2007  return (result);
2008  }
2009  bool opBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2010  { return opinstBindings_bindings_xformtoworld(cookparms, &_idx); }
2011  bool opinstBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2012  {
2013  SOP_Node *thissop = cookparms.getNode();
2014  if (!thissop) return (myBindings(_idx[0]).bindings_xformtoworld);
2015  int _parmidx[2-1];
2016  _parmidx[1-1] = _idx[1-1] + 1;
2017 
2018  bool result;
2019  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtoworld", _parmidx, cookparms.getCookTime(), 0, 2-1);
2020  return (result);
2021  }
2022  bool opBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2023  { return opinstBindings_bindings_xformtovoxel(cookparms, &_idx); }
2024  bool opinstBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2025  {
2026  SOP_Node *thissop = cookparms.getNode();
2027  if (!thissop) return (myBindings(_idx[0]).bindings_xformtovoxel);
2028  int _parmidx[2-1];
2029  _parmidx[1-1] = _idx[1-1] + 1;
2030 
2031  bool result;
2032  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtovoxel", _parmidx, cookparms.getCookTime(), 0, 2-1);
2033  return (result);
2034  }
2036  { return opinstBindings_bindings_attribute(cookparms, &_idx); }
2038  {
2039  SOP_Node *thissop = cookparms.getNode();
2040  if (!thissop) return (myBindings(_idx[0]).bindings_attribute);
2041  int _parmidx[2-1];
2042  _parmidx[1-1] = _idx[1-1] + 1;
2043 
2045  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribute", _parmidx, cookparms.getCookTime(), 0, 2-1);
2046  return (result);
2047  }
2049  { return opinstBindings_bindings_attribclass(cookparms, &_idx); }
2050  int64 opinstBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2051  {
2052  SOP_Node *thissop = cookparms.getNode();
2053  if (!thissop) return (myBindings(_idx[0]).bindings_attribclass);
2054  int _parmidx[2-1];
2055  _parmidx[1-1] = _idx[1-1] + 1;
2056 
2057  int64 result;
2058  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribclass", _parmidx, cookparms.getCookTime(), 0, 2-1);
2059  return (result);
2060  }
2062  { return opinstBindings_bindings_attribtype(cookparms, &_idx); }
2063  int64 opinstBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2064  {
2065  SOP_Node *thissop = cookparms.getNode();
2066  if (!thissop) return (myBindings(_idx[0]).bindings_attribtype);
2067  int _parmidx[2-1];
2068  _parmidx[1-1] = _idx[1-1] + 1;
2069 
2070  int64 result;
2071  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribtype", _parmidx, cookparms.getCookTime(), 0, 2-1);
2072  return (result);
2073  }
2075  { return opinstBindings_bindings_attribsize(cookparms, &_idx); }
2076  int64 opinstBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2077  {
2078  SOP_Node *thissop = cookparms.getNode();
2079  if (!thissop) return (myBindings(_idx[0]).bindings_attribsize);
2080  int _parmidx[2-1];
2081  _parmidx[1-1] = _idx[1-1] + 1;
2082 
2083  int64 result;
2084  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
2085  return (result);
2086  }
2088  { return opinstBindings_bindings_precision(cookparms, &_idx); }
2089  int64 opinstBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2090  {
2091  SOP_Node *thissop = cookparms.getNode();
2092  if (!thissop) return (myBindings(_idx[0]).bindings_precision);
2093  int _parmidx[2-1];
2094  _parmidx[1-1] = _idx[1-1] + 1;
2095 
2096  int64 result;
2097  OP_Utils::evalOpParmInst(result, thissop, "bindings#_precision", _parmidx, cookparms.getCookTime(), 0, 2-1);
2098  return (result);
2099  }
2100  bool opBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2101  { return opinstBindings_bindings_readable(cookparms, &_idx); }
2102  bool opinstBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2103  {
2104  SOP_Node *thissop = cookparms.getNode();
2105  if (!thissop) return (myBindings(_idx[0]).bindings_readable);
2106  int _parmidx[2-1];
2107  _parmidx[1-1] = _idx[1-1] + 1;
2108 
2109  bool result;
2110  OP_Utils::evalOpParmInst(result, thissop, "bindings#_readable", _parmidx, cookparms.getCookTime(), 0, 2-1);
2111  return (result);
2112  }
2113  bool opBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2114  { return opinstBindings_bindings_writeable(cookparms, &_idx); }
2115  bool opinstBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2116  {
2117  SOP_Node *thissop = cookparms.getNode();
2118  if (!thissop) return (myBindings(_idx[0]).bindings_writeable);
2119  int _parmidx[2-1];
2120  _parmidx[1-1] = _idx[1-1] + 1;
2121 
2122  bool result;
2123  OP_Utils::evalOpParmInst(result, thissop, "bindings#_writeable", _parmidx, cookparms.getCookTime(), 0, 2-1);
2124  return (result);
2125  }
2126  bool opBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2127  { return opinstBindings_bindings_optional(cookparms, &_idx); }
2128  bool opinstBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2129  {
2130  SOP_Node *thissop = cookparms.getNode();
2131  if (!thissop) return (myBindings(_idx[0]).bindings_optional);
2132  int _parmidx[2-1];
2133  _parmidx[1-1] = _idx[1-1] + 1;
2134 
2135  bool result;
2136  OP_Utils::evalOpParmInst(result, thissop, "bindings#_optional", _parmidx, cookparms.getCookTime(), 0, 2-1);
2137  return (result);
2138  }
2139  bool opBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2140  { return opinstBindings_bindings_defval(cookparms, &_idx); }
2141  bool opinstBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2142  {
2143  SOP_Node *thissop = cookparms.getNode();
2144  if (!thissop) return (myBindings(_idx[0]).bindings_defval);
2145  int _parmidx[2-1];
2146  _parmidx[1-1] = _idx[1-1] + 1;
2147 
2148  bool result;
2149  OP_Utils::evalOpParmInst(result, thissop, "bindings#_defval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2150  return (result);
2151  }
2153  { return opinstBindings_bindings_intval(cookparms, &_idx); }
2154  int64 opinstBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2155  {
2156  SOP_Node *thissop = cookparms.getNode();
2157  if (!thissop) return (myBindings(_idx[0]).bindings_intval);
2158  int _parmidx[2-1];
2159  _parmidx[1-1] = _idx[1-1] + 1;
2160 
2161  int64 result;
2162  OP_Utils::evalOpParmInst(result, thissop, "bindings#_intval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2163  return (result);
2164  }
2166  { return opinstBindings_bindings_fval(cookparms, &_idx); }
2167  fpreal64 opinstBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2168  {
2169  SOP_Node *thissop = cookparms.getNode();
2170  if (!thissop) return (myBindings(_idx[0]).bindings_fval);
2171  int _parmidx[2-1];
2172  _parmidx[1-1] = _idx[1-1] + 1;
2173 
2174  fpreal64 result;
2175  OP_Utils::evalOpParmInst(result, thissop, "bindings#_fval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2176  return (result);
2177  }
2179  { return opinstBindings_bindings_v2val(cookparms, &_idx); }
2180  UT_Vector2D opinstBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2181  {
2182  SOP_Node *thissop = cookparms.getNode();
2183  if (!thissop) return (myBindings(_idx[0]).bindings_v2val);
2184  int _parmidx[2-1];
2185  _parmidx[1-1] = _idx[1-1] + 1;
2186 
2188  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v2val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2189  return (result);
2190  }
2192  { return opinstBindings_bindings_v3val(cookparms, &_idx); }
2193  UT_Vector3D opinstBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2194  {
2195  SOP_Node *thissop = cookparms.getNode();
2196  if (!thissop) return (myBindings(_idx[0]).bindings_v3val);
2197  int _parmidx[2-1];
2198  _parmidx[1-1] = _idx[1-1] + 1;
2199 
2201  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v3val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2202  return (result);
2203  }
2205  { return opinstBindings_bindings_v4val(cookparms, &_idx); }
2206  UT_Vector4D opinstBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2207  {
2208  SOP_Node *thissop = cookparms.getNode();
2209  if (!thissop) return (myBindings(_idx[0]).bindings_v4val);
2210  int _parmidx[2-1];
2211  _parmidx[1-1] = _idx[1-1] + 1;
2212 
2214  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v4val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2215  return (result);
2216  }
2218  { return opinstBindings_bindings_timescale(cookparms, &_idx); }
2219  int64 opinstBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2220  {
2221  SOP_Node *thissop = cookparms.getNode();
2222  if (!thissop) return (myBindings(_idx[0]).bindings_timescale);
2223  int _parmidx[2-1];
2224  _parmidx[1-1] = _idx[1-1] + 1;
2225 
2226  int64 result;
2227  OP_Utils::evalOpParmInst(result, thissop, "bindings#_timescale", _parmidx, cookparms.getCookTime(), 0, 2-1);
2228  return (result);
2229  }
2230 
2231  const UT_StringHolder & getGeneratedCode() const { return myGeneratedCode; }
2232  void setGeneratedCode(const UT_StringHolder & val) { myGeneratedCode = val; }
2234  {
2235  SOP_Node *thissop = cookparms.getNode();
2236  if (!thissop) return getGeneratedCode();
2238  OP_Utils::evalOpParm(result, thissop, "generatedcode", cookparms.getCookTime(), 0);
2239  return result;
2240  }
2241 
2242 private:
2243  UT_StringHolder myKernelName;
2244  bool myUseCode;
2245  UT_StringHolder myKernelFile;
2246  UT_StringHolder myKernelCode;
2247  bool myAtBinding;
2248  UT_StringHolder myKernelOptions;
2249  UT_StringHolder myKernelOptionAttrib;
2250  bool myUseWriteBackKernel;
2251  UT_StringHolder myWriteBackKernelName;
2252  bool myRecompile;
2253  int64 myRunOver;
2254  int64 myIterations;
2255  bool myIteration;
2256  UT_StringHolder myWorksets_begin;
2257  UT_StringHolder myWorksets_length;
2258  bool mySingleworkgroup;
2259  bool myFinish;
2260  bool myTime;
2261  bool myTimeInc;
2262  fpreal64 myTimescale;
2263  int64 myTimemethod;
2264  bool myXnoise;
2265  int64 myPrecision;
2266  bool myImportPrequel;
2267  UT_Array<Bindings> myBindings;
2268  UT_StringHolder myGeneratedCode;
2269 
2270 };
const UT_StringHolder & getWorksets_length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getRecompile() const
type
Definition: core.h:556
bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
bool opinstBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool getUseWriteBackKernel() const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
UT_StringHolder opGeneratedCode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAtBinding(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setIteration(bool val)
UT_Vector3D opBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE UT_StringHolder getToken(RunOver enum_value)
int int32
Definition: SYS_Types.h:39
void setKernelCode(const UT_StringHolder &val)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opinstBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setWorksets_begin(const UT_StringHolder &val)
int64 opinstBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opinstBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_Vector3D opinstBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opUseCode(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBindings_bindings_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
Timemethod opTimemethod(const SOP_NodeVerb::CookParms &cookparms) const
void
Definition: png.h:1083
UT_SharedPtr< UT_Ramp > opinstBindings_bindings_ramp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opKernelName(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
bool opIteration(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
const UT_StringHolder & getKernelOptionAttrib() const
fpreal getTime() const
Definition: OP_Context.h:63
int64 opBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, int64 v)
UT_Vector2T< fpreal64 > UT_Vector2D
void setTimemethod(Timemethod val)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
int64 opinstBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setRecompile(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
int64 opBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setKernelFile(const UT_StringHolder &val)
void setKernelName(const UT_StringHolder &val)
bool opBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, fpreal64 v)
bool operator!=(const Bindings &src) const
SYS_FORCE_INLINE const char * buffer() const
bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLdouble s
Definition: glad.h:3009
int64 opBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder opinstBindings_bindings_attribute(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
fpreal64 opTimescale(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWorksets_length(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getWriteBackKernelName() const
An output stream object that owns its own string buffer storage.
const char * getNestParmName(TempIndex fieldnum) const override
void setTime(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
UT_StringHolder bindings_volume
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getKernelOptions() const
int64 getIterations() const
**But if you need a result
Definition: thread.h:622
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 opinstBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opinstBindings_bindings_volume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setImportPrequel(bool val)
bool opImportPrequel(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opKernelOptionAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBindings_bindings_attribute(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opinstBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void save(std::ostream &os) const
void setKernelOptions(const UT_StringHolder &val)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void setTimescale(fpreal64 val)
const UT_StringHolder & getWorksets_begin() const
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
RunOver getRunOver() const
UT_StringHolder opWorksets_begin(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 getTimescale() const
const UT_StringHolder & getKernelFile() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setXnoise(bool val)
exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getAtBinding() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool getIteration() const
int64 opinstBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint length() const
static void saveData(std::ostream &os, UT_Vector4D v)
UT_SharedPtr< UT_Ramp > bindings_ramp
int64 opBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
UT_Vector2D opinstBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
Precision getPrecision() const
bool getTime() const
void setWorksets_length(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opWriteBackKernelName(const SOP_NodeVerb::CookParms &cookparms) const
bool opinstBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setUseCode(bool val)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool opBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setPrecision(Precision val)
static void saveData(std::ostream &os, UT_StringHolder s)
bool opinstBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opKernelFile(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector4D opBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Vector3D v)
void setWriteBackKernelName(const UT_StringHolder &val)
bool getSingleworkgroup() const
bool opinstBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2D opBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool opUseWriteBackKernel(const SOP_NodeVerb::CookParms &cookparms) const
bool opBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, int64 &v)
bool getImportPrequel() const
int64 opBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opBindings_bindings_volume(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint getNestNumParms(TempIndex idx) const override
bool opTimeInc(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
UT_StringHolder createString(const UT_Array< Bindings > &list) const
int64 opBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GT_API const UT_StringHolder version
int64 opinstBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:655
UT_StringHolder bindings_attribute
void setGeneratedCode(const UT_StringHolder &val)
bool getXnoise() const
bool operator==(const SOP_OpenCLParms &src) const
UT_Vector4D opinstBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator==(const Bindings &src) const
bool isParmColorRamp(exint idx) const override
int64 opinstBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setIterations(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const UT_StringHolder & getKernelCode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setFinish(bool val)
static void loadData(UT_IStream &is, fpreal64 &v)
void setRunOver(RunOver val)
static int version()
int64 opBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setSingleworkgroup(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opinstBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool getFinish() const
bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
int64 opinstBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
Timemethod getTimemethod() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
bool opAtBinding(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const UT_StringHolder & getKernelName() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
bool opinstBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setBindings(const UT_Array< Bindings > &val)
UT_StringHolder opinstBindings_bindings_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setUseWriteBackKernel(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_Array< Bindings > & getBindings() const
#define SOP_API
Definition: SOP_API.h:10
int64 opinstBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGeneratedCode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
UT_StringHolder opKernelCode(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_OpenCLParms &src) const
int64 opinstBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool opBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GLboolean r
Definition: glcorearb.h:1222
int64 opBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
fpreal64 opBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getUseCode() const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_SharedPtr< UT_Ramp > opBindings_bindings_ramp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_Vector4T< fpreal64 > UT_Vector4D
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
bool getTimeInc() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opinstBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setKernelOptionAttrib(const UT_StringHolder &val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opKernelOptions(const SOP_NodeVerb::CookParms &cookparms) const
bool opBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setTimeInc(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
RunOver opRunOver(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opinstBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663