HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribCreate-2.0.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 <SOP/SOP_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_AttribCreate_2_0Enums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
28  VERTICES,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::GUESS: return "guess"_sh;
40  case Grouptype::VERTICES: return "vertices"_sh;
41  case Grouptype::EDGES: return "edges"_sh;
42  case Grouptype::POINTS: return "points"_sh;
43  case Grouptype::PRIMS: return "prims"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Existing
49  {
50  ERROR = 0,
51  WARN,
52  REPLACE,
53  BETTER
54  };
55 
57  getToken(Existing enum_value)
58  {
59  using namespace UT::Literal;
60  switch (enum_value) {
61  case Existing::ERROR: return "error"_sh;
62  case Existing::WARN: return "warn"_sh;
63  case Existing::REPLACE: return "replace"_sh;
64  case Existing::BETTER: return "better"_sh;
65  default: UT_ASSERT(false); return ""_sh;
66  }
67  }
68 
69  enum class Class
70  {
71  DETAIL = 0,
72  PRIMITIVE,
73  POINT,
74  VERTEX
75  };
76 
78  getToken(Class enum_value)
79  {
80  using namespace UT::Literal;
81  switch (enum_value) {
82  case Class::DETAIL: return "detail"_sh;
83  case Class::PRIMITIVE: return "primitive"_sh;
84  case Class::POINT: return "point"_sh;
85  case Class::VERTEX: return "vertex"_sh;
86  default: UT_ASSERT(false); return ""_sh;
87  }
88  }
89 
90  enum class Type
91  {
92  FLOAT = 0,
93  INT,
94  VECTOR,
95  INDEX,
96  FLOATARRAY,
97  INTARRAY,
99  DICT,
100  DICTARRAY
101  };
102 
104  getToken(Type enum_value)
105  {
106  using namespace UT::Literal;
107  switch (enum_value) {
108  case Type::FLOAT: return "float"_sh;
109  case Type::INT: return "int"_sh;
110  case Type::VECTOR: return "vector"_sh;
111  case Type::INDEX: return "index"_sh;
112  case Type::FLOATARRAY: return "floatarray"_sh;
113  case Type::INTARRAY: return "intarray"_sh;
114  case Type::STRINGARRAY: return "stringarray"_sh;
115  case Type::DICT: return "dict"_sh;
116  case Type::DICTARRAY: return "dictarray"_sh;
117  default: UT_ASSERT(false); return ""_sh;
118  }
119  }
120 
121  enum class Typeinfo
122  {
123  GUESS = 0,
124  NONE,
125  POINT,
126  VECTOR,
127  NORMAL,
128  COLOR,
129  QUATERNION,
130  TRANFORM,
132  };
133 
135  getToken(Typeinfo enum_value)
136  {
137  using namespace UT::Literal;
138  switch (enum_value) {
139  case Typeinfo::GUESS: return "guess"_sh;
140  case Typeinfo::NONE: return "none"_sh;
141  case Typeinfo::POINT: return "point"_sh;
142  case Typeinfo::VECTOR: return "vector"_sh;
143  case Typeinfo::NORMAL: return "normal"_sh;
144  case Typeinfo::COLOR: return "color"_sh;
145  case Typeinfo::QUATERNION: return "quaternion"_sh;
146  case Typeinfo::TRANFORM: return "tranform"_sh;
147  case Typeinfo::TEXTURECOORD: return "texturecoord"_sh;
148  default: UT_ASSERT(false); return ""_sh;
149  }
150  }
151 
152  enum class Precision
153  {
154  _8 = 0,
155  _16,
156  _32,
157  _64,
158  AUTO
159  };
160 
162  getToken(Precision enum_value)
163  {
164  using namespace UT::Literal;
165  switch (enum_value) {
166  case Precision::_8: return "8"_sh;
167  case Precision::_16: return "16"_sh;
168  case Precision::_32: return "32"_sh;
169  case Precision::_64: return "64"_sh;
170  case Precision::AUTO: return "auto"_sh;
171  default: UT_ASSERT(false); return ""_sh;
172  }
173  }
174 
175 }
176 
177 
179 {
180 public:
181  static int version() { return 1; }
182  struct Numattr
183  {
184  bool enable;
197  bool uselocal;
200 
201 
203  {
204  enable = true;
205  name = "attribute#"_UTsh;
206  existing = 3;
207  createvarmap = false;
208  varname = ""_UTsh;
209  _class = 2;
210  savetoinfo = false;
211  type = 0;
212  typeinfo = 0;
213  precision = 4;
214  size = 1;
215  defaultv = UT_Vector4D(0,0,0,0);
216  writevalues = true;
217  uselocal = true;
218  valuev = UT_Vector4D(0,0,0,0);
219  string = ""_UTsh;
220 
221  }
222 
223  bool operator==(const Numattr &src) const
224  {
225  if (enable != src.enable) return false;
226  if (name != src.name) return false;
227  if (existing != src.existing) return false;
228  if (createvarmap != src.createvarmap) return false;
229  if (varname != src.varname) return false;
230  if (_class != src._class) return false;
231  if (savetoinfo != src.savetoinfo) return false;
232  if (type != src.type) return false;
233  if (typeinfo != src.typeinfo) return false;
234  if (precision != src.precision) return false;
235  if (size != src.size) return false;
236  if (defaultv != src.defaultv) return false;
237  if (writevalues != src.writevalues) return false;
238  if (uselocal != src.uselocal) return false;
239  if (valuev != src.valuev) return false;
240  if (string != src.string) return false;
241 
242  return true;
243  }
244  bool operator!=(const Numattr &src) const
245  {
246  return !operator==(src);
247  }
248 
249  };
250 
252  {
254 
255  buf.strcat("[ ");
256  for (int i = 0; i < list.entries(); i++)
257  {
258  if (i)
259  buf.strcat(", ");
260  buf.strcat("( ");
261  buf.append("");
262  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
263  buf.append(", ");
264  { UT_String tmp; tmp = UT_StringWrap(list(i).name).makeQuotedString('"'); buf.strcat(tmp); }
265  buf.append(", ");
266  buf.appendSprintf("%d", (int) list(i).existing);
267  buf.append(", ");
268  buf.appendSprintf("%s", (list(i).createvarmap) ? "true" : "false");
269  buf.append(", ");
270  { UT_String tmp; tmp = UT_StringWrap(list(i).varname).makeQuotedString('"'); buf.strcat(tmp); }
271  buf.append(", ");
272  buf.appendSprintf("%d", (int) list(i)._class);
273  buf.append(", ");
274  buf.appendSprintf("%s", (list(i).savetoinfo) ? "true" : "false");
275  buf.append(", ");
276  buf.appendSprintf("%d", (int) list(i).type);
277  buf.append(", ");
278  buf.appendSprintf("%d", (int) list(i).typeinfo);
279  buf.append(", ");
280  buf.appendSprintf("%d", (int) list(i).precision);
281  buf.append(", ");
282  buf.appendSprintf("%d", (int) list(i).size);
283  buf.append(", ");
284  buf.appendSprintf("(%f, %f, %f, %f)", list(i).defaultv.x(), list(i).defaultv.y(), list(i).defaultv.z(), list(i).defaultv.w());
285  buf.append(", ");
286  buf.appendSprintf("%s", (list(i).writevalues) ? "true" : "false");
287  buf.append(", ");
288  buf.appendSprintf("%s", (list(i).uselocal) ? "true" : "false");
289  buf.append(", ");
290  buf.appendSprintf("(%f, %f, %f, %f)", list(i).valuev.x(), list(i).valuev.y(), list(i).valuev.z(), list(i).valuev.w());
291  buf.append(", ");
292  { UT_String tmp; tmp = UT_StringWrap(list(i).string).makeQuotedString('"'); buf.strcat(tmp); }
293 
294  buf.strcat(" )");
295  }
296  buf.strcat(" ]");
297 
299  return result;
300  }
301 
303  {
304  myGroup = ""_UTsh;
305  myGrouptype = 0;
306  myEncodenames = false;
307  myNumattr.setSize(1);
308 
309  }
310 
311  explicit SOP_AttribCreate_2_0Parms(const SOP_AttribCreate_2_0Parms &) = default;
314  SOP_AttribCreate_2_0Parms &operator=(SOP_AttribCreate_2_0Parms &&) noexcept = default;
315 
317 
319  {
320  if (myGroup != src.myGroup) return false;
321  if (myGrouptype != src.myGrouptype) return false;
322  if (myEncodenames != src.myEncodenames) return false;
323  if (myNumattr != src.myNumattr) return false;
324 
325  return true;
326  }
328  {
329  return !operator==(src);
330  }
337 
338 
339 
340  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
341  {
342  myGroup = ""_UTsh;
343  if (true)
344  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
345  myGrouptype = 0;
346  if (true)
347  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
348  myEncodenames = false;
349  if (true)
350  graph->evalOpParm(myEncodenames, nodeidx, "encodenames", time, 0);
351  if (true)
352  {
353  int64 length = 0;
354  graph->evalOpParm(length, nodeidx, "numattr", time, 0);
355  if (length < 0) length = 0;
356  myNumattr.setSize(length);
357  for (exint i = 0; i < length; i++)
358  {
359  int parmidx[1];
360  int offsets[1];
361  parmidx[0] = i+1;
362  offsets[0] = 1;
363  auto && _curentry = myNumattr(i);
364  (void) _curentry;
365  _curentry.enable = true;
366  if (true)
367  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
368  _curentry.name = "attribute#"_UTsh;
369  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
370  graph->evalOpParmInst(_curentry.name, nodeidx, "name#", parmidx, offsets, time, 0, 2-1);
371  _curentry.existing = 3;
372  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
373  graph->evalOpParmInst(_curentry.existing, nodeidx, "existing#", parmidx, offsets, time, 0, 2-1);
374  _curentry.createvarmap = false;
375  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
376  graph->evalOpParmInst(_curentry.createvarmap, nodeidx, "createvarmap#", parmidx, offsets, time, 0, 2-1);
377  _curentry.varname = ""_UTsh;
378  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.createvarmap==0)))) ) )
379  graph->evalOpParmInst(_curentry.varname, nodeidx, "varname#", parmidx, offsets, time, 0, 2-1);
380  _curentry._class = 2;
381  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
382  graph->evalOpParmInst(_curentry._class, nodeidx, "class#", parmidx, offsets, time, 0, 2-1);
383  _curentry.savetoinfo = false;
384  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry._class!=0)))) ) )
385  graph->evalOpParmInst(_curentry.savetoinfo, nodeidx, "savetoinfo#", parmidx, offsets, time, 0, 2-1);
386  _curentry.type = 0;
387  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
388  graph->evalOpParmInst(_curentry.type, nodeidx, "type#", parmidx, offsets, time, 0, 2-1);
389  _curentry.typeinfo = 0;
390  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.type!=0)&&(_curentry.type!=4)))) ) )
391  graph->evalOpParmInst(_curentry.typeinfo, nodeidx, "typeinfo#", parmidx, offsets, time, 0, 2-1);
392  _curentry.precision = 4;
393  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.type==3))||((_curentry.type==6))||((_curentry.type==7))||((_curentry.type==8)))) ) )
394  graph->evalOpParmInst(_curentry.precision, nodeidx, "precision#", parmidx, offsets, time, 0, 2-1);
395  _curentry.size = 1;
396  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.type==2))||((_curentry.type==3)))) ) )
397  graph->evalOpParmInst(_curentry.size, nodeidx, "size#", parmidx, offsets, time, 0, 2-1);
398  _curentry.defaultv = UT_Vector4D(0,0,0,0);
399  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.type==3))||((_curentry.type==4))||((_curentry.type==5))||((_curentry.type==6))||((_curentry.type==7))||((_curentry.type==8)))) ) )
400  graph->evalOpParmInst(_curentry.defaultv, nodeidx, "default#v", parmidx, offsets, time, 0, 2-1);
401  _curentry.writevalues = true;
402  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.type==4))||((_curentry.type==5))||((_curentry.type==6))||((_curentry.type==7))||((_curentry.type==8)))) ) )
403  graph->evalOpParmInst(_curentry.writevalues, nodeidx, "writevalues#", parmidx, offsets, time, 0, 2-1);
404  _curentry.uselocal = true;
405  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.writevalues==0))||((_curentry.type==4))||((_curentry.type==5))||((_curentry.type==6))||((_curentry.type==7))||((_curentry.type==8)))) ) )
406  graph->evalOpParmInst(_curentry.uselocal, nodeidx, "uselocal#", parmidx, offsets, time, 0, 2-1);
407  _curentry.valuev = UT_Vector4D(0,0,0,0);
408  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.writevalues==0))||((_curentry.type!=0)&&(_curentry.type!=1)&&(_curentry.type!=2)))) ) )
409  graph->evalOpParmInst(_curentry.valuev, nodeidx, "value#v", parmidx, offsets, time, 0, 2-1);
410  _curentry.string = ""_UTsh;
411  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.writevalues==0))||((_curentry.type!=3)))) ) )
412  graph->evalOpParmInst(_curentry.string, nodeidx, "string#", parmidx, offsets, time, 0, 2-1);
413 
414  }
415  }
416  else
417  myNumattr.clear();
418 
419  }
420 
421 
422  void loadFromOpSubclass(const LoadParms &loadparms) override
423  {
424  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
425  }
426 
427 
428  void copyFrom(const OP_NodeParms *src) override
429  {
430  *this = *((const SOP_AttribCreate_2_0Parms *)src);
431  }
432 
433  template <typename T>
434  void
435  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
436  {
437  if (idx.size() < 1)
438  return;
439  UT_ASSERT(idx.size() == instance.size()+1);
440  if (idx.size() != instance.size()+1)
441  return;
442  switch (idx[0])
443  {
444  case 0:
445  coerceValue(value, myGroup);
446  break;
447  case 1:
448  coerceValue(value, myGrouptype);
449  break;
450  case 2:
451  coerceValue(value, myEncodenames);
452  break;
453  case 3:
454  if (idx.size() == 1)
455  coerceValue(value, myNumattr.entries());
456  else if (instance[0] < myNumattr.entries())
457  {
458  auto && _data = myNumattr(instance[0]);
459  switch (idx[1])
460  {
461  case 0:
462  coerceValue(value, _data.enable);
463  break;
464  case 1:
465  coerceValue(value, _data.name);
466  break;
467  case 2:
468  coerceValue(value, _data.existing);
469  break;
470  case 3:
471  coerceValue(value, _data.createvarmap);
472  break;
473  case 4:
474  coerceValue(value, _data.varname);
475  break;
476  case 5:
477  coerceValue(value, _data._class);
478  break;
479  case 6:
480  coerceValue(value, _data.savetoinfo);
481  break;
482  case 7:
483  coerceValue(value, _data.type);
484  break;
485  case 8:
486  coerceValue(value, _data.typeinfo);
487  break;
488  case 9:
489  coerceValue(value, _data.precision);
490  break;
491  case 10:
492  coerceValue(value, _data.size);
493  break;
494  case 11:
495  coerceValue(value, _data.defaultv);
496  break;
497  case 12:
498  coerceValue(value, _data.writevalues);
499  break;
500  case 13:
501  coerceValue(value, _data.uselocal);
502  break;
503  case 14:
504  coerceValue(value, _data.valuev);
505  break;
506  case 15:
507  coerceValue(value, _data.string);
508  break;
509 
510  }
511  }
512  break;
513 
514  }
515  }
516 
517  bool isParmColorRamp(exint idx) const override
518  {
519  switch (idx)
520  {
521 
522  }
523  return false;
524  }
525 
526  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
527  { doGetParmValue(idx, instance, value); }
528  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
529  { doGetParmValue(idx, instance, value); }
530  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
531  { doGetParmValue(idx, instance, value); }
532  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
533  { doGetParmValue(idx, instance, value); }
534  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
535  { doGetParmValue(idx, instance, value); }
536  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
537  { doGetParmValue(idx, instance, value); }
538  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
539  { doGetParmValue(idx, instance, value); }
540  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
541  { doGetParmValue(idx, instance, value); }
542  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
543  { doGetParmValue(idx, instance, value); }
544  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
545  { doGetParmValue(idx, instance, value); }
546  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
547  { doGetParmValue(idx, instance, value); }
548 
549  template <typename T>
550  void
551  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
552  {
553  if (idx.size() < 1)
554  return;
555  UT_ASSERT(idx.size() == instance.size()+1);
556  if (idx.size() != instance.size()+1)
557  return;
558  switch (idx[0])
559  {
560  case 0:
561  coerceValue(myGroup, ( ( value ) ));
562  break;
563  case 1:
564  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
565  break;
566  case 2:
567  coerceValue(myEncodenames, ( ( value ) ));
568  break;
569  case 3:
570  if (idx.size() == 1)
571  {
572  exint newsize;
573  coerceValue(newsize, value);
574  if (newsize < 0) newsize = 0;
575  myNumattr.setSize(newsize);
576  }
577  else
578  {
579  if (instance[0] < 0)
580  return;
581  myNumattr.setSizeIfNeeded(instance[0]+1);
582  auto && _data = myNumattr(instance[0]);
583  switch (idx[1])
584  {
585  case 0:
586  coerceValue(_data.enable, value);
587  break;
588  case 1:
589  coerceValue(_data.name, value);
590  break;
591  case 2:
592  coerceValue(_data.existing, value);
593  break;
594  case 3:
595  coerceValue(_data.createvarmap, value);
596  break;
597  case 4:
598  coerceValue(_data.varname, value);
599  break;
600  case 5:
601  coerceValue(_data._class, value);
602  break;
603  case 6:
604  coerceValue(_data.savetoinfo, value);
605  break;
606  case 7:
607  coerceValue(_data.type, value);
608  break;
609  case 8:
610  coerceValue(_data.typeinfo, value);
611  break;
612  case 9:
613  coerceValue(_data.precision, value);
614  break;
615  case 10:
616  coerceValue(_data.size, value);
617  break;
618  case 11:
619  coerceValue(_data.defaultv, value);
620  break;
621  case 12:
622  coerceValue(_data.writevalues, value);
623  break;
624  case 13:
625  coerceValue(_data.uselocal, value);
626  break;
627  case 14:
628  coerceValue(_data.valuev, value);
629  break;
630  case 15:
631  coerceValue(_data.string, value);
632  break;
633 
634  }
635  }
636  break;
637 
638  }
639  }
640 
641  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
642  { doSetParmValue(idx, instance, value); }
643  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
644  { doSetParmValue(idx, instance, value); }
645  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
646  { doSetParmValue(idx, instance, value); }
647  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
648  { doSetParmValue(idx, instance, value); }
649  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
650  { doSetParmValue(idx, instance, value); }
651  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
652  { doSetParmValue(idx, instance, value); }
653  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
654  { doSetParmValue(idx, instance, value); }
655  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
656  { doSetParmValue(idx, instance, value); }
657  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
658  { doSetParmValue(idx, instance, value); }
659  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
660  { doSetParmValue(idx, instance, value); }
661  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
662  { doSetParmValue(idx, instance, value); }
663 
664  exint getNestNumParms(TempIndex idx) const override
665  {
666  if (idx.size() == 0)
667  return 4;
668  switch (idx[0])
669  {
670  case 3:
671  return 16;
672 
673  }
674  // Invalid
675  return 0;
676  }
677 
678  const char *getNestParmName(TempIndex fieldnum) const override
679  {
680  if (fieldnum.size() < 1)
681  return 0;
682  switch (fieldnum[0])
683  {
684  case 0:
685  return "group";
686  case 1:
687  return "grouptype";
688  case 2:
689  return "encodenames";
690  case 3:
691  if (fieldnum.size() == 1)
692  return "numattr";
693  switch (fieldnum[1])
694  {
695  case 0:
696  return "enable#";
697  case 1:
698  return "name#";
699  case 2:
700  return "existing#";
701  case 3:
702  return "createvarmap#";
703  case 4:
704  return "varname#";
705  case 5:
706  return "class#";
707  case 6:
708  return "savetoinfo#";
709  case 7:
710  return "type#";
711  case 8:
712  return "typeinfo#";
713  case 9:
714  return "precision#";
715  case 10:
716  return "size#";
717  case 11:
718  return "default#v";
719  case 12:
720  return "writevalues#";
721  case 13:
722  return "uselocal#";
723  case 14:
724  return "value#v";
725  case 15:
726  return "string#";
727 
728  }
729  return 0;
730 
731  }
732  return 0;
733  }
734 
735  ParmType getNestParmType(TempIndex fieldnum) const override
736  {
737  if (fieldnum.size() < 1)
738  return PARM_UNSUPPORTED;
739  switch (fieldnum[0])
740  {
741  case 0:
742  return PARM_STRING;
743  case 1:
744  return PARM_INTEGER;
745  case 2:
746  return PARM_INTEGER;
747  case 3:
748  if (fieldnum.size() == 1)
749  return PARM_MULTIPARM;
750  switch (fieldnum[1])
751  {
752  case 0:
753  return PARM_INTEGER;
754  case 1:
755  return PARM_STRING;
756  case 2:
757  return PARM_INTEGER;
758  case 3:
759  return PARM_INTEGER;
760  case 4:
761  return PARM_STRING;
762  case 5:
763  return PARM_INTEGER;
764  case 6:
765  return PARM_INTEGER;
766  case 7:
767  return PARM_INTEGER;
768  case 8:
769  return PARM_INTEGER;
770  case 9:
771  return PARM_INTEGER;
772  case 10:
773  return PARM_INTEGER;
774  case 11:
775  return PARM_VECTOR4;
776  case 12:
777  return PARM_INTEGER;
778  case 13:
779  return PARM_INTEGER;
780  case 14:
781  return PARM_VECTOR4;
782  case 15:
783  return PARM_STRING;
784 
785  }
786  return PARM_UNSUPPORTED;
787 
788  }
789  return PARM_UNSUPPORTED;
790  }
791 
792  // Boiler plate to load individual types.
793  static void loadData(UT_IStream &is, int64 &v)
794  { is.bread(&v, 1); }
795  static void loadData(UT_IStream &is, bool &v)
796  { int64 iv; is.bread(&iv, 1); v = iv; }
797  static void loadData(UT_IStream &is, fpreal64 &v)
798  { is.bread<fpreal64>(&v, 1); }
799  static void loadData(UT_IStream &is, UT_Vector2D &v)
800  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
801  static void loadData(UT_IStream &is, UT_Vector3D &v)
802  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
803  is.bread<fpreal64>(&v.z(), 1); }
804  static void loadData(UT_IStream &is, UT_Vector4D &v)
805  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
806  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
807  static void loadData(UT_IStream &is, UT_Matrix2D &v)
808  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
809  static void loadData(UT_IStream &is, UT_Matrix3D &v)
810  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
811  static void loadData(UT_IStream &is, UT_Matrix4D &v)
812  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
813  static void loadData(UT_IStream &is, UT_Vector2I &v)
814  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
815  static void loadData(UT_IStream &is, UT_Vector3I &v)
816  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
817  is.bread<int64>(&v.z(), 1); }
818  static void loadData(UT_IStream &is, UT_Vector4I &v)
819  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
820  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
822  { is.bread(v); }
824  { UT_StringHolder rampdata;
825  loadData(is, rampdata);
826  if (rampdata.isstring())
827  {
828  v.reset(new UT_Ramp());
829  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
830  v->load(istr);
831  }
832  else v.reset();
833  }
836  loadData(is, data);
837  if (data.isstring())
838  {
839  // Find the data type.
840  const char *colon = UT_StringWrap(data).findChar(':');
841  if (colon)
842  {
843  int typelen = colon - data.buffer();
845  type.strncpy(data.buffer(), typelen);
846  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
847 
848  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
849  }
850  }
851  else v.reset();
852  }
853 
854  static void saveData(std::ostream &os, int64 v)
855  { UTwrite(os, &v); }
856  static void saveData(std::ostream &os, bool v)
857  { int64 iv = v; UTwrite(os, &iv); }
858  static void saveData(std::ostream &os, fpreal64 v)
859  { UTwrite<fpreal64>(os, &v); }
860  static void saveData(std::ostream &os, UT_Vector2D v)
861  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
862  static void saveData(std::ostream &os, UT_Vector3D v)
863  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
864  UTwrite<fpreal64>(os, &v.z()); }
865  static void saveData(std::ostream &os, UT_Vector4D v)
866  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
867  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
868  static void saveData(std::ostream &os, UT_Matrix2D v)
870  static void saveData(std::ostream &os, UT_Matrix3D v)
872  static void saveData(std::ostream &os, UT_Matrix4D v)
874  static void saveData(std::ostream &os, UT_StringHolder s)
875  { UT_StringWrap(s).saveBinary(os); }
876  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
878  UT_OStringStream ostr;
879  if (s) s->save(ostr);
880  result = ostr.str();
881  saveData(os, result);
882  }
883  static void saveData(std::ostream &os, PRM_DataItemHandle s)
885  UT_OStringStream ostr;
886  if (s)
887  {
888  ostr << s->getDataTypeToken();
889  ostr << ":";
890  s->saveBinary(ostr);
891  }
892  result = ostr.str();
893  saveData(os, result);
894  }
895 
896 
897  void save(std::ostream &os) const
898  {
899  int32 v = version();
900  UTwrite(os, &v);
901  saveData(os, myGroup);
902  saveData(os, myGrouptype);
903  saveData(os, myEncodenames);
904  {
905  int64 length = myNumattr.entries();
906  UTwrite(os, &length);
907  for (exint i = 0; i < length; i++)
908  {
909  auto && _curentry = myNumattr(i);
910  (void) _curentry;
911  saveData(os, _curentry.enable);
912  saveData(os, _curentry.name);
913  saveData(os, _curentry.existing);
914  saveData(os, _curentry.createvarmap);
915  saveData(os, _curentry.varname);
916  saveData(os, _curentry._class);
917  saveData(os, _curentry.savetoinfo);
918  saveData(os, _curentry.type);
919  saveData(os, _curentry.typeinfo);
920  saveData(os, _curentry.precision);
921  saveData(os, _curentry.size);
922  saveData(os, _curentry.defaultv);
923  saveData(os, _curentry.writevalues);
924  saveData(os, _curentry.uselocal);
925  saveData(os, _curentry.valuev);
926  saveData(os, _curentry.string);
927 
928  }
929  }
930 
931  }
932 
933  bool load(UT_IStream &is)
934  {
935  int32 v;
936  is.bread(&v, 1);
937  if (version() != v)
938  {
939  // Fail incompatible versions
940  return false;
941  }
942  loadData(is, myGroup);
943  loadData(is, myGrouptype);
944  loadData(is, myEncodenames);
945  {
946  int64 length;
947  is.read(&length, 1);
948  myNumattr.setSize(length);
949  for (exint i = 0; i < length; i++)
950  {
951  auto && _curentry = myNumattr(i);
952  (void) _curentry;
953  loadData(is, _curentry.enable);
954  loadData(is, _curentry.name);
955  loadData(is, _curentry.existing);
956  loadData(is, _curentry.createvarmap);
957  loadData(is, _curentry.varname);
958  loadData(is, _curentry._class);
959  loadData(is, _curentry.savetoinfo);
960  loadData(is, _curentry.type);
961  loadData(is, _curentry.typeinfo);
962  loadData(is, _curentry.precision);
963  loadData(is, _curentry.size);
964  loadData(is, _curentry.defaultv);
965  loadData(is, _curentry.writevalues);
966  loadData(is, _curentry.uselocal);
967  loadData(is, _curentry.valuev);
968  loadData(is, _curentry.string);
969 
970  }
971  }
972 
973  return true;
974  }
975 
976  const UT_StringHolder & getGroup() const { return myGroup; }
977  void setGroup(const UT_StringHolder & val) { myGroup = val; }
979  {
980  SOP_Node *thissop = cookparms.getNode();
981  if (!thissop) return getGroup();
983  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
984  return result;
985  }
986  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
987  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
989  {
990  SOP_Node *thissop = cookparms.getNode();
991  if (!thissop) return getGrouptype();
992  int64 result;
993  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
994  return Grouptype(result);
995  }
996  bool getEncodenames() const { return myEncodenames; }
997  void setEncodenames(bool val) { myEncodenames = val; }
998  bool opEncodenames(const SOP_NodeVerb::CookParms &cookparms) const
999  {
1000  SOP_Node *thissop = cookparms.getNode();
1001  if (!thissop) return getEncodenames();
1002  bool result;
1003  OP_Utils::evalOpParm(result, thissop, "encodenames", cookparms.getCookTime(), 0);
1004  return result;
1005  }
1006  const UT_Array<Numattr> &getNumattr() const { return myNumattr; }
1007 void setNumattr(const UT_Array<Numattr> &val) { myNumattr = val; }
1008  exint opNumattr(const SOP_NodeVerb::CookParms &cookparms) const
1009  {
1010  SOP_Node *thissop = cookparms.getNode();
1011  if (!thissop) return getNumattr().entries();
1012  exint result;
1013  OP_Utils::evalOpParm(result, thissop, "numattr", cookparms.getCookTime(), 0);
1014  return result;
1015  }
1016  bool opNumattr_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1017  { return opinstNumattr_enable(cookparms, &_idx); }
1018  bool opinstNumattr_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1019  {
1020  SOP_Node *thissop = cookparms.getNode();
1021  if (!thissop) return (myNumattr(_idx[0]).enable);
1022  int _parmidx[2-1];
1023  _parmidx[1-1] = _idx[1-1] + 1;
1024 
1025  bool result;
1026  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1027  return (result);
1028  }
1029  UT_StringHolder opNumattr_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1030  { return opinstNumattr_name(cookparms, &_idx); }
1031  UT_StringHolder opinstNumattr_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1032  {
1033  SOP_Node *thissop = cookparms.getNode();
1034  if (!thissop) return (myNumattr(_idx[0]).name);
1035  int _parmidx[2-1];
1036  _parmidx[1-1] = _idx[1-1] + 1;
1037 
1039  OP_Utils::evalOpParmInst(result, thissop, "name#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1040  return (result);
1041  }
1042  int64 opNumattr_existing(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1043  { return opinstNumattr_existing(cookparms, &_idx); }
1044  int64 opinstNumattr_existing(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1045  {
1046  SOP_Node *thissop = cookparms.getNode();
1047  if (!thissop) return (myNumattr(_idx[0]).existing);
1048  int _parmidx[2-1];
1049  _parmidx[1-1] = _idx[1-1] + 1;
1050 
1051  int64 result;
1052  OP_Utils::evalOpParmInst(result, thissop, "existing#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1053  return (result);
1054  }
1055  bool opNumattr_createvarmap(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1056  { return opinstNumattr_createvarmap(cookparms, &_idx); }
1057  bool opinstNumattr_createvarmap(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1058  {
1059  SOP_Node *thissop = cookparms.getNode();
1060  if (!thissop) return (myNumattr(_idx[0]).createvarmap);
1061  int _parmidx[2-1];
1062  _parmidx[1-1] = _idx[1-1] + 1;
1063 
1064  bool result;
1065  OP_Utils::evalOpParmInst(result, thissop, "createvarmap#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1066  return (result);
1067  }
1069  { return opinstNumattr_varname(cookparms, &_idx); }
1070  UT_StringHolder opinstNumattr_varname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1071  {
1072  SOP_Node *thissop = cookparms.getNode();
1073  if (!thissop) return (myNumattr(_idx[0]).varname);
1074  int _parmidx[2-1];
1075  _parmidx[1-1] = _idx[1-1] + 1;
1076 
1078  OP_Utils::evalOpParmInst(result, thissop, "varname#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1079  return (result);
1080  }
1081  int64 opNumattr__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1082  { return opinstNumattr__class(cookparms, &_idx); }
1083  int64 opinstNumattr__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1084  {
1085  SOP_Node *thissop = cookparms.getNode();
1086  if (!thissop) return (myNumattr(_idx[0])._class);
1087  int _parmidx[2-1];
1088  _parmidx[1-1] = _idx[1-1] + 1;
1089 
1090  int64 result;
1091  OP_Utils::evalOpParmInst(result, thissop, "class#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1092  return (result);
1093  }
1094  bool opNumattr_savetoinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1095  { return opinstNumattr_savetoinfo(cookparms, &_idx); }
1096  bool opinstNumattr_savetoinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1097  {
1098  SOP_Node *thissop = cookparms.getNode();
1099  if (!thissop) return (myNumattr(_idx[0]).savetoinfo);
1100  int _parmidx[2-1];
1101  _parmidx[1-1] = _idx[1-1] + 1;
1102 
1103  bool result;
1104  OP_Utils::evalOpParmInst(result, thissop, "savetoinfo#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1105  return (result);
1106  }
1107  int64 opNumattr_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1108  { return opinstNumattr_type(cookparms, &_idx); }
1109  int64 opinstNumattr_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1110  {
1111  SOP_Node *thissop = cookparms.getNode();
1112  if (!thissop) return (myNumattr(_idx[0]).type);
1113  int _parmidx[2-1];
1114  _parmidx[1-1] = _idx[1-1] + 1;
1115 
1116  int64 result;
1117  OP_Utils::evalOpParmInst(result, thissop, "type#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1118  return (result);
1119  }
1120  int64 opNumattr_typeinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1121  { return opinstNumattr_typeinfo(cookparms, &_idx); }
1122  int64 opinstNumattr_typeinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1123  {
1124  SOP_Node *thissop = cookparms.getNode();
1125  if (!thissop) return (myNumattr(_idx[0]).typeinfo);
1126  int _parmidx[2-1];
1127  _parmidx[1-1] = _idx[1-1] + 1;
1128 
1129  int64 result;
1130  OP_Utils::evalOpParmInst(result, thissop, "typeinfo#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1131  return (result);
1132  }
1133  int64 opNumattr_precision(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1134  { return opinstNumattr_precision(cookparms, &_idx); }
1135  int64 opinstNumattr_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1136  {
1137  SOP_Node *thissop = cookparms.getNode();
1138  if (!thissop) return (myNumattr(_idx[0]).precision);
1139  int _parmidx[2-1];
1140  _parmidx[1-1] = _idx[1-1] + 1;
1141 
1142  int64 result;
1143  OP_Utils::evalOpParmInst(result, thissop, "precision#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1144  return (result);
1145  }
1146  int64 opNumattr_size(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1147  { return opinstNumattr_size(cookparms, &_idx); }
1148  int64 opinstNumattr_size(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1149  {
1150  SOP_Node *thissop = cookparms.getNode();
1151  if (!thissop) return (myNumattr(_idx[0]).size);
1152  int _parmidx[2-1];
1153  _parmidx[1-1] = _idx[1-1] + 1;
1154 
1155  int64 result;
1156  OP_Utils::evalOpParmInst(result, thissop, "size#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1157  return (result);
1158  }
1159  UT_Vector4D opNumattr_defaultv(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1160  { return opinstNumattr_defaultv(cookparms, &_idx); }
1161  UT_Vector4D opinstNumattr_defaultv(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1162  {
1163  SOP_Node *thissop = cookparms.getNode();
1164  if (!thissop) return (myNumattr(_idx[0]).defaultv);
1165  int _parmidx[2-1];
1166  _parmidx[1-1] = _idx[1-1] + 1;
1167 
1169  OP_Utils::evalOpParmInst(result, thissop, "default#v", _parmidx, cookparms.getCookTime(), 0, 2-1);
1170  return (result);
1171  }
1172  bool opNumattr_writevalues(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1173  { return opinstNumattr_writevalues(cookparms, &_idx); }
1174  bool opinstNumattr_writevalues(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1175  {
1176  SOP_Node *thissop = cookparms.getNode();
1177  if (!thissop) return (myNumattr(_idx[0]).writevalues);
1178  int _parmidx[2-1];
1179  _parmidx[1-1] = _idx[1-1] + 1;
1180 
1181  bool result;
1182  OP_Utils::evalOpParmInst(result, thissop, "writevalues#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1183  return (result);
1184  }
1185  bool opNumattr_uselocal(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1186  { return opinstNumattr_uselocal(cookparms, &_idx); }
1187  bool opinstNumattr_uselocal(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1188  {
1189  SOP_Node *thissop = cookparms.getNode();
1190  if (!thissop) return (myNumattr(_idx[0]).uselocal);
1191  int _parmidx[2-1];
1192  _parmidx[1-1] = _idx[1-1] + 1;
1193 
1194  bool result;
1195  OP_Utils::evalOpParmInst(result, thissop, "uselocal#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1196  return (result);
1197  }
1198  UT_Vector4D opNumattr_valuev(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1199  { return opinstNumattr_valuev(cookparms, &_idx); }
1200  UT_Vector4D opinstNumattr_valuev(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1201  {
1202  SOP_Node *thissop = cookparms.getNode();
1203  if (!thissop) return (myNumattr(_idx[0]).valuev);
1204  int _parmidx[2-1];
1205  _parmidx[1-1] = _idx[1-1] + 1;
1206 
1208  OP_Utils::evalOpParmInst(result, thissop, "value#v", _parmidx, cookparms.getCookTime(), 0, 2-1);
1209  return (result);
1210  }
1212  { return opinstNumattr_string(cookparms, &_idx); }
1213  UT_StringHolder opinstNumattr_string(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1214  {
1215  SOP_Node *thissop = cookparms.getNode();
1216  if (!thissop) return (myNumattr(_idx[0]).string);
1217  int _parmidx[2-1];
1218  _parmidx[1-1] = _idx[1-1] + 1;
1219 
1221  OP_Utils::evalOpParmInst(result, thissop, "string#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1222  return (result);
1223  }
1224 
1225 
1226 private:
1227  UT_StringHolder myGroup;
1228  int64 myGrouptype;
1229  bool myEncodenames;
1230  UT_Array<Numattr> myNumattr;
1231 
1232 };
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
bool opNumattr_savetoinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNumattr(const UT_Array< Numattr > &val)
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLboolean * data
Definition: glcorearb.h:131
static void saveData(std::ostream &os, UT_Vector4D v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal getTime() const
Definition: OP_Context.h:62
exint getNestNumParms(TempIndex idx) const override
int64 opinstNumattr_typeinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opNumattr_varname(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, fpreal64 &v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool opNumattr_uselocal(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opNumattr_precision(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
UT_StringHolder opinstNumattr_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator==(const Numattr &src) const
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator==(const SOP_AttribCreate_2_0Parms &src) const
bool operator!=(const SOP_AttribCreate_2_0Parms &src) const
bool opinstNumattr_writevalues(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opNumattr__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
**But if you need a result
Definition: thread.h:613
bool opNumattr_createvarmap(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void loadFromOpSubclass(const LoadParms &loadparms) override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
bool opinstNumattr_savetoinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool isParmColorRamp(exint idx) const override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void saveData(std::ostream &os, bool v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int64 opNumattr_size(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder opNumattr_string(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint length() const
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
int64 opinstNumattr_size(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
ParmType getNestParmType(TempIndex fieldnum) const override
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opinstNumattr_string(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
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool opinstNumattr_createvarmap(const SOP_NodeVerb::CookParms &cookparms, const 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
exint opNumattr(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opinstNumattr_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLuint const GLchar * name
Definition: glcorearb.h:786
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_Vector4D opNumattr_valuev(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opinstNumattr_uselocal(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void save(std::ostream &os) const
SYS_FORCE_INLINE void strcat(const char *src)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, UT_Matrix4D v)
GT_API const UT_StringHolder version
GLenum GLint GLint * precision
Definition: glcorearb.h:1925
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
int64 opinstNumattr__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opNumattr_writevalues(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder createString(const UT_Array< Numattr > &list) const
GLsizeiptr size
Definition: glcorearb.h:664
UT_StringHolder opNumattr_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
UT_Vector4D opinstNumattr_valuev(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opNumattr_typeinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
const UT_Array< Numattr > & getNumattr() const
int64 opinstNumattr_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opinstNumattr_varname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opinstNumattr_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool operator!=(const Numattr &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
int64 opinstNumattr_existing(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opNumattr_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, fpreal64 v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void loadData(UT_IStream &is, UT_Vector2D &v)
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_Vector4T< fpreal64 > UT_Vector4D
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool opNumattr_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_Vector4D opNumattr_defaultv(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector4D opinstNumattr_defaultv(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opNumattr_existing(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opEncodenames(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663