HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Material.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_MaterialEnums
24 {
25  enum class Uselabels
26  {
27  USELABELS = 0,
28  USENAMES
29  };
30 
32  getToken(Uselabels enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Uselabels::USELABELS: return "uselabels"_sh;
37  case Uselabels::USENAMES: return "usenames"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49  struct Num_local
50  {
58 
59 
61  {
62  local_name = ""_UTsh;
63  local_type = "float"_UTsh;
64  local_ival = 0;
65  local_fval = 0;
66  local_sval = ""_UTsh;
67  local_cval = UT_Vector3D(1,1,1);
68  local_vval = UT_Vector4D(0,0,0,0);
69 
70  }
71 
72  bool operator==(const Num_local &src) const
73  {
74  if (local_name != src.local_name) return false;
75  if (local_type != src.local_type) return false;
76  if (local_ival != src.local_ival) return false;
77  if (local_fval != src.local_fval) return false;
78  if (local_sval != src.local_sval) return false;
79  if (local_cval != src.local_cval) return false;
80  if (local_vval != src.local_vval) return false;
81 
82  return true;
83  }
84  bool operator!=(const Num_local &src) const
85  {
86  return !operator==(src);
87  }
88 
89  };
90 
92  {
94 
95  buf.strcat("[ ");
96  for (int i = 0; i < list.entries(); i++)
97  {
98  if (i)
99  buf.strcat(", ");
100  buf.strcat("( ");
101  buf.append("");
102  { UT_String tmp; tmp = UT_StringWrap(list(i).local_name).makeQuotedString('"'); buf.strcat(tmp); }
103  buf.append(", ");
104  { UT_String tmp; tmp = UT_StringWrap(list(i).local_type).makeQuotedString('"'); buf.strcat(tmp); }
105  buf.append(", ");
106  buf.appendSprintf("%d", (int) list(i).local_ival);
107  buf.append(", ");
108  buf.appendSprintf("%f", (list(i).local_fval));
109  buf.append(", ");
110  { UT_String tmp; tmp = UT_StringWrap(list(i).local_sval).makeQuotedString('"'); buf.strcat(tmp); }
111  buf.append(", ");
112  buf.appendSprintf("(%f, %f, %f)", list(i).local_cval.x(), list(i).local_cval.y(), list(i).local_cval.z());
113  buf.append(", ");
114  buf.appendSprintf("(%f, %f, %f, %f)", list(i).local_vval.x(), list(i).local_vval.y(), list(i).local_vval.z(), list(i).local_vval.w());
115 
116  buf.strcat(" )");
117  }
118  buf.strcat(" ]");
119 
121  return result;
122  }
124  {
127  bool localvar;
130 
131 
133  {
134  group = ""_UTsh;
135  shop_materialpath = ""_UTsh;
136  localvar = false;
137  mergeoverride = false;
138  num_local.setSize(0);
139 
140  }
141 
142  bool operator==(const Num_materials &src) const
143  {
144  if (group != src.group) return false;
145  if (shop_materialpath != src.shop_materialpath) return false;
146  if (localvar != src.localvar) return false;
147  if (mergeoverride != src.mergeoverride) return false;
148  if (num_local != src.num_local) return false;
149 
150  return true;
151  }
152  bool operator!=(const Num_materials &src) const
153  {
154  return !operator==(src);
155  }
156 
157  };
158 
160  {
162 
163  buf.strcat("[ ");
164  for (int i = 0; i < list.entries(); i++)
165  {
166  if (i)
167  buf.strcat(", ");
168  buf.strcat("( ");
169  buf.append("");
170  { UT_String tmp; tmp = UT_StringWrap(list(i).group).makeQuotedString('"'); buf.strcat(tmp); }
171  buf.append(", ");
172  { UT_String tmp; tmp = UT_StringWrap(list(i).shop_materialpath).makeQuotedString('"'); buf.strcat(tmp); }
173  buf.append(", ");
174  buf.appendSprintf("%s", (list(i).localvar) ? "true" : "false");
175  buf.append(", ");
176  buf.appendSprintf("%s", (list(i).mergeoverride) ? "true" : "false");
177  buf.append(", ");
178  buf.strcat(createString(list(i).num_local));
179 
180  buf.strcat(" )");
181  }
182  buf.strcat(" ]");
183 
185  return result;
186  }
187 
189  {
190  myStyle = "primitive"_UTsh;
191  myUselabels = 0;
192  myCreatestylesheets = false;
193  myFullpath = true;
194  myNum_materials.setSize(1);
195 
196  }
197 
198  explicit SOP_MaterialParms(const SOP_MaterialParms &) = default;
199  SOP_MaterialParms &operator=(const SOP_MaterialParms &) = default;
200  SOP_MaterialParms(SOP_MaterialParms &&) noexcept = default;
201  SOP_MaterialParms &operator=(SOP_MaterialParms &&) noexcept = default;
202 
203  ~SOP_MaterialParms() override {}
204 
205  bool operator==(const SOP_MaterialParms &src) const
206  {
207  if (myStyle != src.myStyle) return false;
208  if (myUselabels != src.myUselabels) return false;
209  if (myCreatestylesheets != src.myCreatestylesheets) return false;
210  if (myFullpath != src.myFullpath) return false;
211  if (myNum_materials != src.myNum_materials) return false;
212 
213 
214  if (baseGetSignature() != src.baseGetSignature()) return false;
215 
216  return true;
217  }
218  bool operator!=(const SOP_MaterialParms &src) const
219  {
220  return !operator==(src);
221  }
223 
224 
225 
226  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
227  {
228  myStyle = "primitive"_UTsh;
229  if (true)
230  graph->evalOpParm(myStyle, nodeidx, "style", time, graph->isDirect()?nullptr:depnode);
231  myUselabels = 0;
232  if (true)
233  graph->evalOpParm(myUselabels, nodeidx, "uselabels", time, graph->isDirect()?nullptr:depnode);
234  myCreatestylesheets = false;
235  if (true)
236  graph->evalOpParm(myCreatestylesheets, nodeidx, "createstylesheets", time, graph->isDirect()?nullptr:depnode);
237  myFullpath = true;
238  if (true)
239  graph->evalOpParm(myFullpath, nodeidx, "fullpath", time, graph->isDirect()?nullptr:depnode);
240  if (true)
241  {
242  int64 length = 0;
243  graph->evalOpParm(length, nodeidx, "num_materials", time, graph->isDirect()?nullptr:depnode);
244  if (length < 0) length = 0;
245  myNum_materials.setSize(length);
246  for (exint i = 0; i < length; i++)
247  {
248  int parmidx[1];
249  int offsets[1];
250  parmidx[0] = i+1;
251  offsets[0] = 1;
252  auto && _curentry = myNum_materials(i);
253  (void) _curentry;
254  _curentry.group = ""_UTsh;
255  if (true)
256  graph->evalOpParmInst(_curentry.group, nodeidx, "group#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
257  _curentry.shop_materialpath = ""_UTsh;
258  if (true)
259  graph->evalOpParmInst(_curentry.shop_materialpath, nodeidx, "shop_materialpath#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
260  _curentry.localvar = false;
261  if (true)
262  graph->evalOpParmInst(_curentry.localvar, nodeidx, "localvar#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
263  _curentry.mergeoverride = false;
264  if (true)
265  graph->evalOpParmInst(_curentry.mergeoverride, nodeidx, "mergeoverride#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
266  {
267  if (true)
268  {
269  int64 length = 0;
270  graph->evalOpParmInst(length, nodeidx, "num_local#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
271  if (length < 0) length = 0;
272  _curentry.num_local.setSize(length);
273  for (exint i = 0; i < length; i++)
274  {
275  auto && _unshadow_entry = _curentry.num_local;
276  auto && _unshadow_parmidx = parmidx;
277  auto && _unshadow_offsets = offsets;
278  {
279  auto && _curentry = _unshadow_entry(i);
280  int parmidx[2];
281  int offsets[2];
282  for (int _i = 0; _i < 2 - 1; _i++)
283  parmidx[_i] = _unshadow_parmidx[_i];
284  for (int _i = 0; _i < 2 - 1; _i++)
285  offsets[_i] = _unshadow_offsets[_i];
286  parmidx[2-1] = i+1;
287  offsets[2-1] = 1;
288  (void) _curentry;
289  _curentry.local_name = ""_UTsh;
290  if (true)
291  graph->evalOpParmInst(_curentry.local_name, nodeidx, "local#_name#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
292  _curentry.local_type = "float"_UTsh;
293  if (true)
294  graph->evalOpParmInst(_curentry.local_type, nodeidx, "local#_type#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
295  _curentry.local_ival = 0;
296  if (true && ( (true&&!(((_curentry.local_type!="int")))) ) )
297  graph->evalOpParmInst(_curentry.local_ival, nodeidx, "local#_ival#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
298  _curentry.local_fval = 0;
299  if (true && ( (true&&!(((_curentry.local_type!="float")))) ) )
300  graph->evalOpParmInst(_curentry.local_fval, nodeidx, "local#_fval#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
301  _curentry.local_sval = ""_UTsh;
302  if (true && ( (true&&!(((_curentry.local_type!="string")))) ) )
303  graph->evalOpParmInst(_curentry.local_sval, nodeidx, "local#_sval#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
304  _curentry.local_cval = UT_Vector3D(1,1,1);
305  if (true && ( (true&&!(((_curentry.local_type!="color")))) ) )
306  graph->evalOpParmInst(_curentry.local_cval, nodeidx, "local#_cval#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
307  _curentry.local_vval = UT_Vector4D(0,0,0,0);
308  if (true && ( (true&&!(((_curentry.local_type!="vector2")&&(_curentry.local_type!="vector3")&&(_curentry.local_type!="vector4")))) ) )
309  graph->evalOpParmInst(_curentry.local_vval, nodeidx, "local#_vval#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 3-1);
310 
311  }
312  }
313  }
314  else
315  _curentry.num_local.clear();
316  }
317 
318  }
319  }
320  else
321  myNum_materials.clear();
322 
323  }
324 
325 
326  void loadFromOpSubclass(const LoadParms &loadparms) override
327  {
328  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
329  }
330 
331 
332  void copyFrom(const OP_NodeParms *src) override
333  {
334  *this = *((const SOP_MaterialParms *)src);
335  }
336 
337  template <typename T>
338  void
339  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
340  {
341  if (idx.size() < 1)
342  return;
343  UT_ASSERT(idx.size() == instance.size()+1);
344  if (idx.size() != instance.size()+1)
345  return;
346  switch (idx[0])
347  {
348  case 0:
349  coerceValue(value, myStyle);
350  break;
351  case 1:
352  coerceValue(value, myUselabels);
353  break;
354  case 2:
355  coerceValue(value, myCreatestylesheets);
356  break;
357  case 3:
358  coerceValue(value, myFullpath);
359  break;
360  case 4:
361  if (idx.size() == 1)
362  coerceValue(value, myNum_materials.entries());
363  else if (instance[0] < myNum_materials.entries())
364  {
365  auto && _data = myNum_materials(instance[0]);
366  switch (idx[1])
367  {
368  case 0:
369  coerceValue(value, _data.group);
370  break;
371  case 1:
372  coerceValue(value, _data.shop_materialpath);
373  break;
374  case 2:
375  coerceValue(value, _data.localvar);
376  break;
377  case 3:
378  coerceValue(value, _data.mergeoverride);
379  break;
380  case 4:
381  if (idx.size() == 2)
382  coerceValue(value, _data.num_local.entries());
383  else if (instance[2-1] < _data.num_local.entries())
384  {
385  auto && _unshadow = _data.num_local;
386  {
387  auto && _data = _unshadow(instance[2-1]);
388  switch (idx[2])
389  {
390  case 0:
391  coerceValue(value, _data.local_name);
392  break;
393  case 1:
394  coerceValue(value, _data.local_type);
395  break;
396  case 2:
397  coerceValue(value, _data.local_ival);
398  break;
399  case 3:
400  coerceValue(value, _data.local_fval);
401  break;
402  case 4:
403  coerceValue(value, _data.local_sval);
404  break;
405  case 5:
406  coerceValue(value, _data.local_cval);
407  break;
408  case 6:
409  coerceValue(value, _data.local_vval);
410  break;
411 
412  }
413  }
414  }
415  break;
416 
417  }
418  }
419  break;
420 
421  }
422  }
423 
424  bool isParmColorRamp(exint idx) const override
425  {
426  switch (idx)
427  {
428 
429  }
430  return false;
431  }
432 
433  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
434  { doGetParmValue(idx, instance, value); }
435  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
436  { doGetParmValue(idx, instance, value); }
437  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
438  { doGetParmValue(idx, instance, value); }
439  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
440  { doGetParmValue(idx, instance, value); }
441  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
442  { doGetParmValue(idx, instance, value); }
443  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
444  { doGetParmValue(idx, instance, value); }
445  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
446  { doGetParmValue(idx, instance, value); }
447  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
448  { doGetParmValue(idx, instance, value); }
449  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
450  { doGetParmValue(idx, instance, value); }
451  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
452  { doGetParmValue(idx, instance, value); }
453  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
454  { doGetParmValue(idx, instance, value); }
455 
456  template <typename T>
457  void
458  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
459  {
460  if (idx.size() < 1)
461  return;
462  UT_ASSERT(idx.size() == instance.size()+1);
463  if (idx.size() != instance.size()+1)
464  return;
465  switch (idx[0])
466  {
467  case 0:
468  coerceValue(myStyle, ( ( value ) ));
469  break;
470  case 1:
471  coerceValue(myUselabels, clampMinValue(0, clampMaxValue(1, value ) ));
472  break;
473  case 2:
474  coerceValue(myCreatestylesheets, ( ( value ) ));
475  break;
476  case 3:
477  coerceValue(myFullpath, ( ( value ) ));
478  break;
479  case 4:
480  if (idx.size() == 1)
481  {
482  exint newsize;
483  coerceValue(newsize, value);
484  if (newsize < 0) newsize = 0;
485  myNum_materials.setSize(newsize);
486  }
487  else
488  {
489  if (instance[0] < 0)
490  return;
491  myNum_materials.setSizeIfNeeded(instance[0]+1);
492  auto && _data = myNum_materials(instance[0]);
493  switch (idx[1])
494  {
495  case 0:
496  coerceValue(_data.group, value);
497  break;
498  case 1:
499  coerceValue(_data.shop_materialpath, value);
500  break;
501  case 2:
502  coerceValue(_data.localvar, value);
503  break;
504  case 3:
505  coerceValue(_data.mergeoverride, value);
506  break;
507  case 4:
508  if (idx.size() == 2)
509  {
510  exint newsize;
511  coerceValue(newsize, value);
512  if (newsize < 0) newsize = 0;
513  _data.num_local.setSize(newsize);
514  }
515  else
516  {
517  if (instance[2-1] < 0)
518  return;
519  _data.num_local.setSizeIfNeeded(instance[2-1]+1);
520  auto && _unshadow = _data.num_local;
521  {
522  auto && _data = _unshadow(instance[2-1]);
523  switch (idx[2])
524  {
525  case 0:
526  coerceValue(_data.local_name, value);
527  break;
528  case 1:
529  coerceValue(_data.local_type, value);
530  break;
531  case 2:
532  coerceValue(_data.local_ival, value);
533  break;
534  case 3:
535  coerceValue(_data.local_fval, value);
536  break;
537  case 4:
538  coerceValue(_data.local_sval, value);
539  break;
540  case 5:
541  coerceValue(_data.local_cval, value);
542  break;
543  case 6:
544  coerceValue(_data.local_vval, value);
545  break;
546 
547  }
548  }
549  }
550  break;
551 
552  }
553  }
554  break;
555 
556  }
557  }
558 
559  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
560  { doSetParmValue(idx, instance, value); }
561  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
562  { doSetParmValue(idx, instance, value); }
563  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
564  { doSetParmValue(idx, instance, value); }
565  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
566  { doSetParmValue(idx, instance, value); }
567  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
568  { doSetParmValue(idx, instance, value); }
569  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
570  { doSetParmValue(idx, instance, value); }
571  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
572  { doSetParmValue(idx, instance, value); }
573  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
574  { doSetParmValue(idx, instance, value); }
575  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
576  { doSetParmValue(idx, instance, value); }
577  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
578  { doSetParmValue(idx, instance, value); }
579  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
580  { doSetParmValue(idx, instance, value); }
581 
582  exint getNestNumParms(TempIndex idx) const override
583  {
584  if (idx.size() == 0)
585  return 5;
586  switch (idx[0])
587  {
588  case 4:
589  return 5;
590 
591  }
592  // Invalid
593  return 0;
594  }
595 
596  const char *getNestParmName(TempIndex fieldnum) const override
597  {
598  if (fieldnum.size() < 1)
599  return 0;
600  switch (fieldnum[0])
601  {
602  case 0:
603  return "style";
604  case 1:
605  return "uselabels";
606  case 2:
607  return "createstylesheets";
608  case 3:
609  return "fullpath";
610  case 4:
611  if (fieldnum.size() == 1)
612  return "num_materials";
613  switch (fieldnum[1])
614  {
615  case 0:
616  return "group#";
617  case 1:
618  return "shop_materialpath#";
619  case 2:
620  return "localvar#";
621  case 3:
622  return "mergeoverride#";
623  case 4:
624  if (fieldnum.size() == 2)
625  return "num_local#";
626  switch (fieldnum[2])
627  {
628  case 0:
629  return "local#_name#";
630  case 1:
631  return "local#_type#";
632  case 2:
633  return "local#_ival#";
634  case 3:
635  return "local#_fval#";
636  case 4:
637  return "local#_sval#";
638  case 5:
639  return "local#_cval#";
640  case 6:
641  return "local#_vval#";
642 
643  }
644  return 0;
645 
646  }
647  return 0;
648 
649  }
650  return 0;
651  }
652 
653  ParmType getNestParmType(TempIndex fieldnum) const override
654  {
655  if (fieldnum.size() < 1)
656  return PARM_UNSUPPORTED;
657  switch (fieldnum[0])
658  {
659  case 0:
660  return PARM_STRING;
661  case 1:
662  return PARM_INTEGER;
663  case 2:
664  return PARM_INTEGER;
665  case 3:
666  return PARM_INTEGER;
667  case 4:
668  if (fieldnum.size() == 1)
669  return PARM_MULTIPARM;
670  switch (fieldnum[1])
671  {
672  case 0:
673  return PARM_STRING;
674  case 1:
675  return PARM_STRING;
676  case 2:
677  return PARM_INTEGER;
678  case 3:
679  return PARM_INTEGER;
680  case 4:
681  if (fieldnum.size() == 2)
682  return PARM_MULTIPARM;
683  switch (fieldnum[2])
684  {
685  case 0:
686  return PARM_STRING;
687  case 1:
688  return PARM_STRING;
689  case 2:
690  return PARM_INTEGER;
691  case 3:
692  return PARM_FLOAT;
693  case 4:
694  return PARM_STRING;
695  case 5:
696  return PARM_VECTOR3;
697  case 6:
698  return PARM_VECTOR4;
699 
700  }
701  return PARM_UNSUPPORTED;
702 
703  }
704  return PARM_UNSUPPORTED;
705 
706  }
707  return PARM_UNSUPPORTED;
708  }
709 
710  // Boiler plate to load individual types.
711  static void loadData(UT_IStream &is, int64 &v)
712  { is.bread(&v, 1); }
713  static void loadData(UT_IStream &is, bool &v)
714  { int64 iv; is.bread(&iv, 1); v = iv; }
715  static void loadData(UT_IStream &is, fpreal64 &v)
716  { is.bread<fpreal64>(&v, 1); }
717  static void loadData(UT_IStream &is, UT_Vector2D &v)
718  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
719  static void loadData(UT_IStream &is, UT_Vector3D &v)
720  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
721  is.bread<fpreal64>(&v.z(), 1); }
722  static void loadData(UT_IStream &is, UT_Vector4D &v)
723  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
724  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
725  static void loadData(UT_IStream &is, UT_Matrix2D &v)
726  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
727  static void loadData(UT_IStream &is, UT_Matrix3D &v)
728  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
729  static void loadData(UT_IStream &is, UT_Matrix4D &v)
730  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
731  static void loadData(UT_IStream &is, UT_Vector2I &v)
732  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
733  static void loadData(UT_IStream &is, UT_Vector3I &v)
734  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
735  is.bread<int64>(&v.z(), 1); }
736  static void loadData(UT_IStream &is, UT_Vector4I &v)
737  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
738  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
740  { is.bread(v); }
742  { UT_StringHolder rampdata;
743  loadData(is, rampdata);
744  if (rampdata.isstring())
745  {
746  v.reset(new UT_Ramp());
747  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
748  v->load(istr);
749  }
750  else v.reset();
751  }
754  loadData(is, data);
755  if (data.isstring())
756  {
757  // Find the data type.
758  const char *colon = UT_StringWrap(data).findChar(':');
759  if (colon)
760  {
761  int typelen = colon - data.buffer();
763  type.strncpy(data.buffer(), typelen);
764  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
765 
766  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
767  }
768  }
769  else v.reset();
770  }
771 
772  static void saveData(std::ostream &os, int64 v)
773  { UTwrite(os, &v); }
774  static void saveData(std::ostream &os, bool v)
775  { int64 iv = v; UTwrite(os, &iv); }
776  static void saveData(std::ostream &os, fpreal64 v)
777  { UTwrite<fpreal64>(os, &v); }
778  static void saveData(std::ostream &os, UT_Vector2D v)
779  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
780  static void saveData(std::ostream &os, UT_Vector3D v)
781  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
782  UTwrite<fpreal64>(os, &v.z()); }
783  static void saveData(std::ostream &os, UT_Vector4D v)
784  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
785  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
786  static void saveData(std::ostream &os, UT_Matrix2D v)
788  static void saveData(std::ostream &os, UT_Matrix3D v)
790  static void saveData(std::ostream &os, UT_Matrix4D v)
792  static void saveData(std::ostream &os, UT_StringHolder s)
793  { UT_StringWrap(s).saveBinary(os); }
794  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
796  UT_OStringStream ostr;
797  if (s) s->save(ostr);
798  result = ostr.str();
799  saveData(os, result);
800  }
801  static void saveData(std::ostream &os, PRM_DataItemHandle s)
803  UT_OStringStream ostr;
804  if (s)
805  {
806  ostr << s->getDataTypeToken();
807  ostr << ":";
808  s->saveBinary(ostr);
809  }
810  result = ostr.str();
811  saveData(os, result);
812  }
813 
814 
815  void save(std::ostream &os) const
816  {
817  int32 v = version();
818  UTwrite(os, &v);
819  saveData(os, myStyle);
820  saveData(os, myUselabels);
821  saveData(os, myCreatestylesheets);
822  saveData(os, myFullpath);
823  {
824  int64 length = myNum_materials.entries();
825  UTwrite(os, &length);
826  for (exint i = 0; i < length; i++)
827  {
828  auto && _curentry = myNum_materials(i);
829  (void) _curentry;
830  saveData(os, _curentry.group);
831  saveData(os, _curentry.shop_materialpath);
832  saveData(os, _curentry.localvar);
833  saveData(os, _curentry.mergeoverride);
834  {
835  int64 length2 = _curentry.num_local.entries();
836  UTwrite(os, &length2);
837  for (exint i2 = 0; i2 < length2; i2++)
838  {
839  auto && _unshadow_entry = _curentry;
840  {
841  auto && _curentry = _unshadow_entry.num_local(i2);
842  (void) _curentry;
843  saveData(os, _curentry.local_name);
844  saveData(os, _curentry.local_type);
845  saveData(os, _curentry.local_ival);
846  saveData(os, _curentry.local_fval);
847  saveData(os, _curentry.local_sval);
848  saveData(os, _curentry.local_cval);
849  saveData(os, _curentry.local_vval);
850 
851  }
852  }
853  }
854 
855  }
856  }
857 
858  }
859 
860  bool load(UT_IStream &is)
861  {
862  int32 v;
863  is.bread(&v, 1);
864  if (version() != v)
865  {
866  // Fail incompatible versions
867  return false;
868  }
869  loadData(is, myStyle);
870  loadData(is, myUselabels);
871  loadData(is, myCreatestylesheets);
872  loadData(is, myFullpath);
873  {
874  int64 length;
875  is.read(&length, 1);
876  myNum_materials.setSize(length);
877  for (exint i = 0; i < length; i++)
878  {
879  auto && _curentry = myNum_materials(i);
880  (void) _curentry;
881  loadData(is, _curentry.group);
882  loadData(is, _curentry.shop_materialpath);
883  loadData(is, _curentry.localvar);
884  loadData(is, _curentry.mergeoverride);
885  {
886  int64 length2;
887  is.read(&length2, 1);
888  _curentry.num_local.setSize(length2);
889  for (exint i2 = 0; i2 < length2; i2++)
890  {
891  auto && _unshadow_entry = _curentry;
892  {
893  auto && _curentry = _unshadow_entry.num_local(i2);
894  (void) _curentry;
895  loadData(is, _curentry.local_name);
896  loadData(is, _curentry.local_type);
897  loadData(is, _curentry.local_ival);
898  loadData(is, _curentry.local_fval);
899  loadData(is, _curentry.local_sval);
900  loadData(is, _curentry.local_cval);
901  loadData(is, _curentry.local_vval);
902 
903  }
904  }
905  }
906 
907  }
908  }
909 
910  return true;
911  }
912 
913  const UT_StringHolder & getStyle() const { return myStyle; }
914  void setStyle(const UT_StringHolder & val) { myStyle = val; }
916  {
917  SOP_Node *thissop = cookparms.getNode();
918  if (!thissop) return getStyle();
920  OP_Utils::evalOpParm(result, thissop, "style", cookparms.getCookTime(), 0);
921  return result;
922  }
923  Uselabels getUselabels() const { return Uselabels(myUselabels); }
924  void setUselabels(Uselabels val) { myUselabels = int64(val); }
926  {
927  SOP_Node *thissop = cookparms.getNode();
928  if (!thissop) return getUselabels();
929  int64 result;
930  OP_Utils::evalOpParm(result, thissop, "uselabels", cookparms.getCookTime(), 0);
931  return Uselabels(result);
932  }
933  bool getCreatestylesheets() const { return myCreatestylesheets; }
934  void setCreatestylesheets(bool val) { myCreatestylesheets = val; }
935  bool opCreatestylesheets(const SOP_NodeVerb::CookParms &cookparms) const
936  {
937  SOP_Node *thissop = cookparms.getNode();
938  if (!thissop) return getCreatestylesheets();
939  bool result;
940  OP_Utils::evalOpParm(result, thissop, "createstylesheets", cookparms.getCookTime(), 0);
941  return result;
942  }
943  bool getFullpath() const { return myFullpath; }
944  void setFullpath(bool val) { myFullpath = val; }
945  bool opFullpath(const SOP_NodeVerb::CookParms &cookparms) const
946  {
947  SOP_Node *thissop = cookparms.getNode();
948  if (!thissop) return getFullpath();
949  bool result;
950  OP_Utils::evalOpParm(result, thissop, "fullpath", cookparms.getCookTime(), 0);
951  return result;
952  }
953  const UT_Array<Num_materials> &getNum_materials() const { return myNum_materials; }
954 void setNum_materials(const UT_Array<Num_materials> &val) { myNum_materials = val; }
956  {
957  SOP_Node *thissop = cookparms.getNode();
958  if (!thissop) return getNum_materials().entries();
959  exint result;
960  OP_Utils::evalOpParm(result, thissop, "num_materials", cookparms.getCookTime(), 0);
961  return result;
962  }
964  { return opinstNum_materials_group(cookparms, &_idx); }
965  UT_StringHolder opinstNum_materials_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
966  {
967  SOP_Node *thissop = cookparms.getNode();
968  if (!thissop) return (myNum_materials(_idx[0]).group);
969  int _parmidx[2-1];
970  _parmidx[1-1] = _idx[1-1] + 1;
971 
973  OP_Utils::evalOpParmInst(result, thissop, "group#", _parmidx, cookparms.getCookTime(), 0, 2-1);
974  return (result);
975  }
977  { return opinstNum_materials_shop_materialpath(cookparms, &_idx); }
979  {
980  SOP_Node *thissop = cookparms.getNode();
981  if (!thissop) return (myNum_materials(_idx[0]).shop_materialpath);
982  int _parmidx[2-1];
983  _parmidx[1-1] = _idx[1-1] + 1;
984 
986  OP_Utils::evalOpParmInst(result, thissop, "shop_materialpath#", _parmidx, cookparms.getCookTime(), 0, 2-1);
987  return (result);
988  }
989  bool opNum_materials_localvar(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
990  { return opinstNum_materials_localvar(cookparms, &_idx); }
991  bool opinstNum_materials_localvar(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
992  {
993  SOP_Node *thissop = cookparms.getNode();
994  if (!thissop) return (myNum_materials(_idx[0]).localvar);
995  int _parmidx[2-1];
996  _parmidx[1-1] = _idx[1-1] + 1;
997 
998  bool result;
999  OP_Utils::evalOpParmInst(result, thissop, "localvar#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1000  return (result);
1001  }
1002  bool opNum_materials_mergeoverride(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1003  { return opinstNum_materials_mergeoverride(cookparms, &_idx); }
1004  bool opinstNum_materials_mergeoverride(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1005  {
1006  SOP_Node *thissop = cookparms.getNode();
1007  if (!thissop) return (myNum_materials(_idx[0]).mergeoverride);
1008  int _parmidx[2-1];
1009  _parmidx[1-1] = _idx[1-1] + 1;
1010 
1011  bool result;
1012  OP_Utils::evalOpParmInst(result, thissop, "mergeoverride#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1013  return (result);
1014  }
1015  exint opinstNum_materials_num_local(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1016  {
1017  SOP_Node *thissop = cookparms.getNode();
1018  if (!thissop) return myNum_materials(_idx[0]).num_local.entries();
1019  exint result;
1020  int _parmidx[2-1];
1021  _parmidx[1-1] = _idx[1-1] + 1;
1022 
1023  OP_Utils::evalOpParmInst(result, thissop, "num_local#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1024  return result;
1025  }
1027  {
1028  SOP_Node *thissop = cookparms.getNode();
1029  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_name);
1030  int _parmidx[3-1];
1031  _parmidx[1-1] = _idx[1-1] + 1;
1032  _parmidx[2-1] = _idx[2-1] + 1;
1033 
1035  OP_Utils::evalOpParmInst(result, thissop, "local#_name#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1036  return (result);
1037  }
1039  {
1040  SOP_Node *thissop = cookparms.getNode();
1041  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_type);
1042  int _parmidx[3-1];
1043  _parmidx[1-1] = _idx[1-1] + 1;
1044  _parmidx[2-1] = _idx[2-1] + 1;
1045 
1047  OP_Utils::evalOpParmInst(result, thissop, "local#_type#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1048  return (result);
1049  }
1051  {
1052  SOP_Node *thissop = cookparms.getNode();
1053  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_ival);
1054  int _parmidx[3-1];
1055  _parmidx[1-1] = _idx[1-1] + 1;
1056  _parmidx[2-1] = _idx[2-1] + 1;
1057 
1058  int64 result;
1059  OP_Utils::evalOpParmInst(result, thissop, "local#_ival#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1060  return (result);
1061  }
1063  {
1064  SOP_Node *thissop = cookparms.getNode();
1065  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_fval);
1066  int _parmidx[3-1];
1067  _parmidx[1-1] = _idx[1-1] + 1;
1068  _parmidx[2-1] = _idx[2-1] + 1;
1069 
1070  fpreal64 result;
1071  OP_Utils::evalOpParmInst(result, thissop, "local#_fval#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1072  return (result);
1073  }
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_sval);
1078  int _parmidx[3-1];
1079  _parmidx[1-1] = _idx[1-1] + 1;
1080  _parmidx[2-1] = _idx[2-1] + 1;
1081 
1083  OP_Utils::evalOpParmInst(result, thissop, "local#_sval#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1084  return (result);
1085  }
1087  {
1088  SOP_Node *thissop = cookparms.getNode();
1089  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_cval);
1090  int _parmidx[3-1];
1091  _parmidx[1-1] = _idx[1-1] + 1;
1092  _parmidx[2-1] = _idx[2-1] + 1;
1093 
1095  OP_Utils::evalOpParmInst(result, thissop, "local#_cval#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1096  return (result);
1097  }
1099  {
1100  SOP_Node *thissop = cookparms.getNode();
1101  if (!thissop) return (myNum_materials(_idx[0]).num_local(_idx[1]).local_vval);
1102  int _parmidx[3-1];
1103  _parmidx[1-1] = _idx[1-1] + 1;
1104  _parmidx[2-1] = _idx[2-1] + 1;
1105 
1107  OP_Utils::evalOpParmInst(result, thissop, "local#_vval#", _parmidx, cookparms.getCookTime(), 0, 3-1);
1108  return (result);
1109  }
1110 
1111 
1112 
1113 private:
1114  UT_StringHolder myStyle;
1115  int64 myUselabels;
1116  bool myCreatestylesheets;
1117  bool myFullpath;
1118  UT_Array<Num_materials> myNum_materials;
1119 
1120 };
UT_StringHolder opinstNum_materials_num_local_local_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, fpreal64 v)
type
Definition: core.h:556
bool operator==(const Num_local &src) const
const char * getNestParmName(TempIndex fieldnum) const override
bool opNum_materials_localvar(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder createString(const UT_Array< Num_local > &list) const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator!=(const Num_local &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
PUGI__FN const char_t * local_name(const xpath_node &node)
Definition: pugixml.cpp:8471
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
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
fpreal getTime() const
Definition: OP_Context.h:63
ParmType getNestParmType(TempIndex fieldnum) const override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, bool v)
bool operator!=(const SOP_MaterialParms &src) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
exint opNum_materials(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
static void saveData(std::ostream &os, UT_Matrix2D v)
int64 exint
Definition: SYS_Types.h:125
bool isParmColorRamp(exint idx) const override
GLint GLint i2
Definition: glad.h:2724
bool operator==(const Num_materials &src) const
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLdouble s
Definition: glad.h:3009
bool opCreatestylesheets(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
bool load(UT_IStream &is)
An output stream object that owns its own string buffer storage.
UT_StringHolder opStyle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
**But if you need a result
Definition: thread.h:622
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Uselabels getUselabels() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void copyFrom(const OP_NodeParms *src) override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_Vector4D opinstNum_materials_num_local_local_vval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opinstNum_materials_num_local_local_sval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool operator==(const SOP_MaterialParms &src) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
UT_StringHolder opinstNum_materials_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
UT_StringHolder opNum_materials_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
int64 opinstNum_materials_num_local_local_ival(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setStyle(const UT_StringHolder &val)
void setCreatestylesheets(bool val)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
UT_StringHolder opinstNum_materials_num_local_local_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
UT_StringHolder opNum_materials_shop_materialpath(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, fpreal64 &v)
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
bool getCreatestylesheets() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal64 opinstNum_materials_num_local_local_fval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_Array< Num_materials > & getNum_materials() const
bool opNum_materials_mergeoverride(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_Vector3D opinstNum_materials_num_local_local_cval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setUselabels(Uselabels val)
SYS_FORCE_INLINE UT_StringHolder getToken(Uselabels enum_value)
SYS_FORCE_INLINE void strcat(const char *src)
exint opinstNum_materials_num_local(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:655
bool opinstNum_materials_localvar(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNum_materials(const UT_Array< Num_materials > &val)
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool operator!=(const Num_materials &src) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, UT_Vector2D v)
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
const UT_StringHolder & getStyle() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
bool getFullpath() const
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, PRM_DataItemHandle s)
Uselabels opUselabels(const SOP_NodeVerb::CookParms &cookparms) const
void setFullpath(bool val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void saveData(std::ostream &os, UT_Matrix3D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool opFullpath(const SOP_NodeVerb::CookParms &cookparms) const
bool opinstNum_materials_mergeoverride(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, int64 v)
UT_Vector4T< fpreal64 > UT_Vector4D
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opinstNum_materials_shop_materialpath(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder createString(const UT_Array< Num_materials > &list) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GA_API const UT_StringHolder shop_materialpath
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663