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