HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupPromote.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_GroupPromoteEnums
24 {
25  enum class Fromtype
26  {
27  AUTO = 0,
28  PRIMS,
29  POINTS,
30  EDGES,
31  VERTICES
32  };
33 
35  getToken(Fromtype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Fromtype::AUTO: return "auto"_sh;
40  case Fromtype::PRIMS: return "prims"_sh;
41  case Fromtype::POINTS: return "points"_sh;
42  case Fromtype::EDGES: return "edges"_sh;
43  case Fromtype::VERTICES: return "vertices"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Totype
49  {
50  PRIMS = 0,
51  POINTS,
52  EDGES,
53  VERTICES
54  };
55 
57  getToken(Totype enum_value)
58  {
59  using namespace UT::Literal;
60  switch (enum_value) {
61  case Totype::PRIMS: return "prims"_sh;
62  case Totype::POINTS: return "points"_sh;
63  case Totype::EDGES: return "edges"_sh;
64  case Totype::VERTICES: return "vertices"_sh;
65  default: UT_ASSERT(false); return ""_sh;
66  }
67  }
68 
69 }
70 
71 
73 {
74 public:
75  static int version() { return 1; }
76  struct Promotions
77  {
78  bool enable;
83  bool preserve;
90  bool onlyfull;
93  bool toattrib;
94 
95 
97  {
98  enable = true;
99  fromtype = 0;
100  totype = 1;
101  group = ""_UTsh;
102  newname = ""_UTsh;
103  preserve = false;
104  onlyboundary = false;
105  includeunshared = true;
106  includecurveunshared = true;
107  useconnectivityattrib = false;
108  connectivityattrib = "uv"_UTsh;
109  primsbyattribbndpts = false;
110  onlyfull = false;
111  onlyprimsedge = false;
112  removedegen = false;
113  toattrib = false;
114 
115  }
116 
117  bool operator==(const Promotions &src) const
118  {
119  if (enable != src.enable) return false;
120  if (fromtype != src.fromtype) return false;
121  if (totype != src.totype) return false;
122  if (group != src.group) return false;
123  if (newname != src.newname) return false;
124  if (preserve != src.preserve) return false;
125  if (onlyboundary != src.onlyboundary) return false;
126  if (includeunshared != src.includeunshared) return false;
127  if (includecurveunshared != src.includecurveunshared) return false;
128  if (useconnectivityattrib != src.useconnectivityattrib) return false;
129  if (connectivityattrib != src.connectivityattrib) return false;
130  if (primsbyattribbndpts != src.primsbyattribbndpts) return false;
131  if (onlyfull != src.onlyfull) return false;
132  if (onlyprimsedge != src.onlyprimsedge) return false;
133  if (removedegen != src.removedegen) return false;
134  if (toattrib != src.toattrib) return false;
135 
136  return true;
137  }
138  bool operator!=(const Promotions &src) const
139  {
140  return !operator==(src);
141  }
142 
143  };
144 
146  {
148 
149  buf.strcat("[ ");
150  for (int i = 0; i < list.entries(); i++)
151  {
152  if (i)
153  buf.strcat(", ");
154  buf.strcat("( ");
155  buf.append("");
156  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
157  buf.append(", ");
158  buf.appendSprintf("%d", (int) list(i).fromtype);
159  buf.append(", ");
160  buf.appendSprintf("%d", (int) list(i).totype);
161  buf.append(", ");
162  { UT_String tmp; tmp = UT_StringWrap(list(i).group).makeQuotedString('"'); buf.strcat(tmp); }
163  buf.append(", ");
164  { UT_String tmp; tmp = UT_StringWrap(list(i).newname).makeQuotedString('"'); buf.strcat(tmp); }
165  buf.append(", ");
166  buf.appendSprintf("%s", (list(i).preserve) ? "true" : "false");
167  buf.append(", ");
168  buf.appendSprintf("%s", (list(i).onlyboundary) ? "true" : "false");
169  buf.append(", ");
170  buf.appendSprintf("%s", (list(i).includeunshared) ? "true" : "false");
171  buf.append(", ");
172  buf.appendSprintf("%s", (list(i).includecurveunshared) ? "true" : "false");
173  buf.append(", ");
174  buf.appendSprintf("%s", (list(i).useconnectivityattrib) ? "true" : "false");
175  buf.append(", ");
176  { UT_String tmp; tmp = UT_StringWrap(list(i).connectivityattrib).makeQuotedString('"'); buf.strcat(tmp); }
177  buf.append(", ");
178  buf.appendSprintf("%s", (list(i).primsbyattribbndpts) ? "true" : "false");
179  buf.append(", ");
180  buf.appendSprintf("%s", (list(i).onlyfull) ? "true" : "false");
181  buf.append(", ");
182  buf.appendSprintf("%s", (list(i).onlyprimsedge) ? "true" : "false");
183  buf.append(", ");
184  buf.appendSprintf("%s", (list(i).removedegen) ? "true" : "false");
185  buf.append(", ");
186  buf.appendSprintf("%s", (list(i).toattrib) ? "true" : "false");
187 
188  buf.strcat(" )");
189  }
190  buf.strcat(" ]");
191 
193  return result;
194  }
195 
197  {
198  myPromotions.setSize(1);
199 
200  }
201 
202  explicit SOP_GroupPromoteParms(const SOP_GroupPromoteParms &) = default;
204  SOP_GroupPromoteParms(SOP_GroupPromoteParms &&) noexcept = default;
205  SOP_GroupPromoteParms &operator=(SOP_GroupPromoteParms &&) noexcept = default;
206 
207  ~SOP_GroupPromoteParms() override {}
208 
210  {
211  if (myPromotions != src.myPromotions) return false;
212 
213  return true;
214  }
216  {
217  return !operator==(src);
218  }
221 
222 
223 
224  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
225  {
226  if (true)
227  {
228  int64 length = 0;
229  graph->evalOpParm(length, nodeidx, "promotions", time, 0);
230  if (length < 0) length = 0;
231  myPromotions.setSize(length);
232  for (exint i = 0; i < length; i++)
233  {
234  int parmidx[1];
235  int offsets[1];
236  parmidx[0] = i+1;
237  offsets[0] = 1;
238  auto && _curentry = myPromotions(i);
239  (void) _curentry;
240  _curentry.enable = true;
241  if (true)
242  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
243  _curentry.fromtype = 0;
244  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
245  graph->evalOpParmInst(_curentry.fromtype, nodeidx, "fromtype#", parmidx, offsets, time, 0, 2-1);
246  _curentry.totype = 1;
247  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
248  graph->evalOpParmInst(_curentry.totype, nodeidx, "totype#", parmidx, offsets, time, 0, 2-1);
249  _curentry.group = ""_UTsh;
250  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
251  graph->evalOpParmInst(_curentry.group, nodeidx, "group#", parmidx, offsets, time, 0, 2-1);
252  _curentry.newname = ""_UTsh;
253  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
254  graph->evalOpParmInst(_curentry.newname, nodeidx, "newname#", parmidx, offsets, time, 0, 2-1);
255  _curentry.preserve = false;
256  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
257  graph->evalOpParmInst(_curentry.preserve, nodeidx, "preserve#", parmidx, offsets, time, 0, 2-1);
258  _curentry.onlyboundary = false;
259  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
260  graph->evalOpParmInst(_curentry.onlyboundary, nodeidx, "onlyboundary#", parmidx, offsets, time, 0, 2-1);
261  _curentry.includeunshared = true;
262  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.onlyboundary==0)))) ) )
263  graph->evalOpParmInst(_curentry.includeunshared, nodeidx, "includeunshared#", parmidx, offsets, time, 0, 2-1);
264  _curentry.includecurveunshared = true;
265  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.onlyboundary==0))||((_curentry.includeunshared==0)))) ) )
266  graph->evalOpParmInst(_curentry.includecurveunshared, nodeidx, "includecurveunshared#", parmidx, offsets, time, 0, 2-1);
267  _curentry.useconnectivityattrib = false;
268  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.onlyboundary==0)))) ) )
269  graph->evalOpParmInst(_curentry.useconnectivityattrib, nodeidx, "useconnectivityattrib#", parmidx, offsets, time, 0, 2-1);
270  _curentry.connectivityattrib = "uv"_UTsh;
271  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.onlyboundary==0))||((_curentry.useconnectivityattrib==0)))) ) )
272  graph->evalOpParmInst(_curentry.connectivityattrib, nodeidx, "connectivityattrib#", parmidx, offsets, time, 0, 2-1);
273  _curentry.primsbyattribbndpts = false;
274  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.onlyboundary==0))||((_curentry.totype!=0)))) ) )
275  graph->evalOpParmInst(_curentry.primsbyattribbndpts, nodeidx, "primsbyattribbndpts#", parmidx, offsets, time, 0, 2-1);
276  _curentry.onlyfull = false;
277  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.totype==1))||((_curentry.onlyboundary==1)))) ) )
278  graph->evalOpParmInst(_curentry.onlyfull, nodeidx, "onlyfull#", parmidx, offsets, time, 0, 2-1);
279  _curentry.onlyprimsedge = false;
280  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.totype!=0))||((_curentry.fromtype==1))||((_curentry.onlyboundary==1))||((_curentry.onlyfull==1)))) ) )
281  graph->evalOpParmInst(_curentry.onlyprimsedge, nodeidx, "onlyprimsedge#", parmidx, offsets, time, 0, 2-1);
282  _curentry.removedegen = false;
283  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.totype==0)))) ) )
284  graph->evalOpParmInst(_curentry.removedegen, nodeidx, "removedegen#", parmidx, offsets, time, 0, 2-1);
285  _curentry.toattrib = false;
286  if (true && ( (true&&!(((_curentry.enable==0))||((_curentry.totype==2)))) ) )
287  graph->evalOpParmInst(_curentry.toattrib, nodeidx, "toattrib#", parmidx, offsets, time, 0, 2-1);
288 
289  }
290  }
291  else
292  myPromotions.clear();
293 
294  }
295 
296 
297  void loadFromOpSubclass(const LoadParms &loadparms) override
298  {
299  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
300  }
301 
302 
303  void copyFrom(const OP_NodeParms *src) override
304  {
305  *this = *((const SOP_GroupPromoteParms *)src);
306  }
307 
308  template <typename T>
309  void
310  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
311  {
312  if (idx.size() < 1)
313  return;
314  UT_ASSERT(idx.size() == instance.size()+1);
315  if (idx.size() != instance.size()+1)
316  return;
317  switch (idx[0])
318  {
319  case 0:
320  if (idx.size() == 1)
321  coerceValue(value, myPromotions.entries());
322  else if (instance[0] < myPromotions.entries())
323  {
324  auto && _data = myPromotions(instance[0]);
325  switch (idx[1])
326  {
327  case 0:
328  coerceValue(value, _data.enable);
329  break;
330  case 1:
331  coerceValue(value, _data.fromtype);
332  break;
333  case 2:
334  coerceValue(value, _data.totype);
335  break;
336  case 3:
337  coerceValue(value, _data.group);
338  break;
339  case 4:
340  coerceValue(value, _data.newname);
341  break;
342  case 5:
343  coerceValue(value, _data.preserve);
344  break;
345  case 6:
346  coerceValue(value, _data.onlyboundary);
347  break;
348  case 7:
349  coerceValue(value, _data.includeunshared);
350  break;
351  case 8:
352  coerceValue(value, _data.includecurveunshared);
353  break;
354  case 9:
355  coerceValue(value, _data.useconnectivityattrib);
356  break;
357  case 10:
358  coerceValue(value, _data.connectivityattrib);
359  break;
360  case 11:
361  coerceValue(value, _data.primsbyattribbndpts);
362  break;
363  case 12:
364  coerceValue(value, _data.onlyfull);
365  break;
366  case 13:
367  coerceValue(value, _data.onlyprimsedge);
368  break;
369  case 14:
370  coerceValue(value, _data.removedegen);
371  break;
372  case 15:
373  coerceValue(value, _data.toattrib);
374  break;
375 
376  }
377  }
378  break;
379 
380  }
381  }
382 
383  bool isParmColorRamp(exint idx) const override
384  {
385  switch (idx)
386  {
387 
388  }
389  return false;
390  }
391 
392  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
393  { doGetParmValue(idx, instance, value); }
394  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
395  { doGetParmValue(idx, instance, value); }
396  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
397  { doGetParmValue(idx, instance, value); }
398  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
399  { doGetParmValue(idx, instance, value); }
400  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
401  { doGetParmValue(idx, instance, value); }
402  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
403  { doGetParmValue(idx, instance, value); }
404  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
405  { doGetParmValue(idx, instance, value); }
406  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
407  { doGetParmValue(idx, instance, value); }
408  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
409  { doGetParmValue(idx, instance, value); }
410  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
411  { doGetParmValue(idx, instance, value); }
412  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
413  { doGetParmValue(idx, instance, value); }
414 
415  template <typename T>
416  void
417  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
418  {
419  if (idx.size() < 1)
420  return;
421  UT_ASSERT(idx.size() == instance.size()+1);
422  if (idx.size() != instance.size()+1)
423  return;
424  switch (idx[0])
425  {
426  case 0:
427  if (idx.size() == 1)
428  {
429  exint newsize;
430  coerceValue(newsize, value);
431  if (newsize < 0) newsize = 0;
432  myPromotions.setSize(newsize);
433  }
434  else
435  {
436  if (instance[0] < 0)
437  return;
438  myPromotions.setSizeIfNeeded(instance[0]+1);
439  auto && _data = myPromotions(instance[0]);
440  switch (idx[1])
441  {
442  case 0:
443  coerceValue(_data.enable, value);
444  break;
445  case 1:
446  coerceValue(_data.fromtype, value);
447  break;
448  case 2:
449  coerceValue(_data.totype, value);
450  break;
451  case 3:
452  coerceValue(_data.group, value);
453  break;
454  case 4:
455  coerceValue(_data.newname, value);
456  break;
457  case 5:
458  coerceValue(_data.preserve, value);
459  break;
460  case 6:
461  coerceValue(_data.onlyboundary, value);
462  break;
463  case 7:
464  coerceValue(_data.includeunshared, value);
465  break;
466  case 8:
467  coerceValue(_data.includecurveunshared, value);
468  break;
469  case 9:
470  coerceValue(_data.useconnectivityattrib, value);
471  break;
472  case 10:
473  coerceValue(_data.connectivityattrib, value);
474  break;
475  case 11:
476  coerceValue(_data.primsbyattribbndpts, value);
477  break;
478  case 12:
479  coerceValue(_data.onlyfull, value);
480  break;
481  case 13:
482  coerceValue(_data.onlyprimsedge, value);
483  break;
484  case 14:
485  coerceValue(_data.removedegen, value);
486  break;
487  case 15:
488  coerceValue(_data.toattrib, value);
489  break;
490 
491  }
492  }
493  break;
494 
495  }
496  }
497 
498  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
499  { doSetParmValue(idx, instance, value); }
500  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
501  { doSetParmValue(idx, instance, value); }
502  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
503  { doSetParmValue(idx, instance, value); }
504  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
505  { doSetParmValue(idx, instance, value); }
506  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
507  { doSetParmValue(idx, instance, value); }
508  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
509  { doSetParmValue(idx, instance, value); }
510  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
511  { doSetParmValue(idx, instance, value); }
512  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
513  { doSetParmValue(idx, instance, value); }
514  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
515  { doSetParmValue(idx, instance, value); }
516  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
517  { doSetParmValue(idx, instance, value); }
518  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
519  { doSetParmValue(idx, instance, value); }
520 
521  exint getNestNumParms(TempIndex idx) const override
522  {
523  if (idx.size() == 0)
524  return 1;
525  switch (idx[0])
526  {
527  case 0:
528  return 16;
529 
530  }
531  // Invalid
532  return 0;
533  }
534 
535  const char *getNestParmName(TempIndex fieldnum) const override
536  {
537  if (fieldnum.size() < 1)
538  return 0;
539  switch (fieldnum[0])
540  {
541  case 0:
542  if (fieldnum.size() == 1)
543  return "promotions";
544  switch (fieldnum[1])
545  {
546  case 0:
547  return "enable#";
548  case 1:
549  return "fromtype#";
550  case 2:
551  return "totype#";
552  case 3:
553  return "group#";
554  case 4:
555  return "newname#";
556  case 5:
557  return "preserve#";
558  case 6:
559  return "onlyboundary#";
560  case 7:
561  return "includeunshared#";
562  case 8:
563  return "includecurveunshared#";
564  case 9:
565  return "useconnectivityattrib#";
566  case 10:
567  return "connectivityattrib#";
568  case 11:
569  return "primsbyattribbndpts#";
570  case 12:
571  return "onlyfull#";
572  case 13:
573  return "onlyprimsedge#";
574  case 14:
575  return "removedegen#";
576  case 15:
577  return "toattrib#";
578 
579  }
580  return 0;
581 
582  }
583  return 0;
584  }
585 
586  ParmType getNestParmType(TempIndex fieldnum) const override
587  {
588  if (fieldnum.size() < 1)
589  return PARM_UNSUPPORTED;
590  switch (fieldnum[0])
591  {
592  case 0:
593  if (fieldnum.size() == 1)
594  return PARM_MULTIPARM;
595  switch (fieldnum[1])
596  {
597  case 0:
598  return PARM_INTEGER;
599  case 1:
600  return PARM_INTEGER;
601  case 2:
602  return PARM_INTEGER;
603  case 3:
604  return PARM_STRING;
605  case 4:
606  return PARM_STRING;
607  case 5:
608  return PARM_INTEGER;
609  case 6:
610  return PARM_INTEGER;
611  case 7:
612  return PARM_INTEGER;
613  case 8:
614  return PARM_INTEGER;
615  case 9:
616  return PARM_INTEGER;
617  case 10:
618  return PARM_STRING;
619  case 11:
620  return PARM_INTEGER;
621  case 12:
622  return PARM_INTEGER;
623  case 13:
624  return PARM_INTEGER;
625  case 14:
626  return PARM_INTEGER;
627  case 15:
628  return PARM_INTEGER;
629 
630  }
631  return PARM_UNSUPPORTED;
632 
633  }
634  return PARM_UNSUPPORTED;
635  }
636 
637  // Boiler plate to load individual types.
638  static void loadData(UT_IStream &is, int64 &v)
639  { is.bread(&v, 1); }
640  static void loadData(UT_IStream &is, bool &v)
641  { int64 iv; is.bread(&iv, 1); v = iv; }
642  static void loadData(UT_IStream &is, fpreal64 &v)
643  { is.bread<fpreal64>(&v, 1); }
644  static void loadData(UT_IStream &is, UT_Vector2D &v)
645  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
646  static void loadData(UT_IStream &is, UT_Vector3D &v)
647  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
648  is.bread<fpreal64>(&v.z(), 1); }
649  static void loadData(UT_IStream &is, UT_Vector4D &v)
650  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
651  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
652  static void loadData(UT_IStream &is, UT_Matrix2D &v)
653  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
654  static void loadData(UT_IStream &is, UT_Matrix3D &v)
655  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
656  static void loadData(UT_IStream &is, UT_Matrix4D &v)
657  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
658  static void loadData(UT_IStream &is, UT_Vector2I &v)
659  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
660  static void loadData(UT_IStream &is, UT_Vector3I &v)
661  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
662  is.bread<int64>(&v.z(), 1); }
663  static void loadData(UT_IStream &is, UT_Vector4I &v)
664  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
665  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
667  { is.bread(v); }
669  { UT_StringHolder rampdata;
670  loadData(is, rampdata);
671  if (rampdata.isstring())
672  {
673  v.reset(new UT_Ramp());
674  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
675  v->load(istr);
676  }
677  else v.reset();
678  }
681  loadData(is, data);
682  if (data.isstring())
683  {
684  // Find the data type.
685  const char *colon = UT_StringWrap(data).findChar(':');
686  if (colon)
687  {
688  int typelen = colon - data.buffer();
690  type.strncpy(data.buffer(), typelen);
691  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
692 
693  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
694  }
695  }
696  else v.reset();
697  }
698 
699  static void saveData(std::ostream &os, int64 v)
700  { UTwrite(os, &v); }
701  static void saveData(std::ostream &os, bool v)
702  { int64 iv = v; UTwrite(os, &iv); }
703  static void saveData(std::ostream &os, fpreal64 v)
704  { UTwrite<fpreal64>(os, &v); }
705  static void saveData(std::ostream &os, UT_Vector2D v)
706  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
707  static void saveData(std::ostream &os, UT_Vector3D v)
708  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
709  UTwrite<fpreal64>(os, &v.z()); }
710  static void saveData(std::ostream &os, UT_Vector4D v)
711  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
712  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
713  static void saveData(std::ostream &os, UT_Matrix2D v)
715  static void saveData(std::ostream &os, UT_Matrix3D v)
717  static void saveData(std::ostream &os, UT_Matrix4D v)
719  static void saveData(std::ostream &os, UT_StringHolder s)
720  { UT_StringWrap(s).saveBinary(os); }
721  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
723  UT_OStringStream ostr;
724  if (s) s->save(ostr);
725  result = ostr.str();
726  saveData(os, result);
727  }
728  static void saveData(std::ostream &os, PRM_DataItemHandle s)
730  UT_OStringStream ostr;
731  if (s)
732  {
733  ostr << s->getDataTypeToken();
734  ostr << ":";
735  s->saveBinary(ostr);
736  }
737  result = ostr.str();
738  saveData(os, result);
739  }
740 
741 
742  void save(std::ostream &os) const
743  {
744  int32 v = version();
745  UTwrite(os, &v);
746  {
747  int64 length = myPromotions.entries();
748  UTwrite(os, &length);
749  for (exint i = 0; i < length; i++)
750  {
751  auto && _curentry = myPromotions(i);
752  (void) _curentry;
753  saveData(os, _curentry.enable);
754  saveData(os, _curentry.fromtype);
755  saveData(os, _curentry.totype);
756  saveData(os, _curentry.group);
757  saveData(os, _curentry.newname);
758  saveData(os, _curentry.preserve);
759  saveData(os, _curentry.onlyboundary);
760  saveData(os, _curentry.includeunshared);
761  saveData(os, _curentry.includecurveunshared);
762  saveData(os, _curentry.useconnectivityattrib);
763  saveData(os, _curentry.connectivityattrib);
764  saveData(os, _curentry.primsbyattribbndpts);
765  saveData(os, _curentry.onlyfull);
766  saveData(os, _curentry.onlyprimsedge);
767  saveData(os, _curentry.removedegen);
768  saveData(os, _curentry.toattrib);
769 
770  }
771  }
772 
773  }
774 
775  bool load(UT_IStream &is)
776  {
777  int32 v;
778  is.bread(&v, 1);
779  if (version() != v)
780  {
781  // Fail incompatible versions
782  return false;
783  }
784  {
785  int64 length;
786  is.read(&length, 1);
787  myPromotions.setSize(length);
788  for (exint i = 0; i < length; i++)
789  {
790  auto && _curentry = myPromotions(i);
791  (void) _curentry;
792  loadData(is, _curentry.enable);
793  loadData(is, _curentry.fromtype);
794  loadData(is, _curentry.totype);
795  loadData(is, _curentry.group);
796  loadData(is, _curentry.newname);
797  loadData(is, _curentry.preserve);
798  loadData(is, _curentry.onlyboundary);
799  loadData(is, _curentry.includeunshared);
800  loadData(is, _curentry.includecurveunshared);
801  loadData(is, _curentry.useconnectivityattrib);
802  loadData(is, _curentry.connectivityattrib);
803  loadData(is, _curentry.primsbyattribbndpts);
804  loadData(is, _curentry.onlyfull);
805  loadData(is, _curentry.onlyprimsedge);
806  loadData(is, _curentry.removedegen);
807  loadData(is, _curentry.toattrib);
808 
809  }
810  }
811 
812  return true;
813  }
814 
815  const UT_Array<Promotions> &getPromotions() const { return myPromotions; }
816 void setPromotions(const UT_Array<Promotions> &val) { myPromotions = val; }
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return getPromotions().entries();
821  exint result;
822  OP_Utils::evalOpParm(result, thissop, "promotions", cookparms.getCookTime(), 0);
823  return result;
824  }
825  bool opPromotions_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
826  { return opinstPromotions_enable(cookparms, &_idx); }
827  bool opinstPromotions_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
828  {
829  SOP_Node *thissop = cookparms.getNode();
830  if (!thissop) return (myPromotions(_idx[0]).enable);
831  int _parmidx[2-1];
832  _parmidx[1-1] = _idx[1-1] + 1;
833 
834  bool result;
835  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
836  return (result);
837  }
838  int64 opPromotions_fromtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
839  { return opinstPromotions_fromtype(cookparms, &_idx); }
840  int64 opinstPromotions_fromtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
841  {
842  SOP_Node *thissop = cookparms.getNode();
843  if (!thissop) return (myPromotions(_idx[0]).fromtype);
844  int _parmidx[2-1];
845  _parmidx[1-1] = _idx[1-1] + 1;
846 
847  int64 result;
848  OP_Utils::evalOpParmInst(result, thissop, "fromtype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
849  return (result);
850  }
851  int64 opPromotions_totype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
852  { return opinstPromotions_totype(cookparms, &_idx); }
853  int64 opinstPromotions_totype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
854  {
855  SOP_Node *thissop = cookparms.getNode();
856  if (!thissop) return (myPromotions(_idx[0]).totype);
857  int _parmidx[2-1];
858  _parmidx[1-1] = _idx[1-1] + 1;
859 
860  int64 result;
861  OP_Utils::evalOpParmInst(result, thissop, "totype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
862  return (result);
863  }
865  { return opinstPromotions_group(cookparms, &_idx); }
866  UT_StringHolder opinstPromotions_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
867  {
868  SOP_Node *thissop = cookparms.getNode();
869  if (!thissop) return (myPromotions(_idx[0]).group);
870  int _parmidx[2-1];
871  _parmidx[1-1] = _idx[1-1] + 1;
872 
874  OP_Utils::evalOpParmInst(result, thissop, "group#", _parmidx, cookparms.getCookTime(), 0, 2-1);
875  return (result);
876  }
878  { return opinstPromotions_newname(cookparms, &_idx); }
879  UT_StringHolder opinstPromotions_newname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
880  {
881  SOP_Node *thissop = cookparms.getNode();
882  if (!thissop) return (myPromotions(_idx[0]).newname);
883  int _parmidx[2-1];
884  _parmidx[1-1] = _idx[1-1] + 1;
885 
887  OP_Utils::evalOpParmInst(result, thissop, "newname#", _parmidx, cookparms.getCookTime(), 0, 2-1);
888  return (result);
889  }
890  bool opPromotions_preserve(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
891  { return opinstPromotions_preserve(cookparms, &_idx); }
892  bool opinstPromotions_preserve(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
893  {
894  SOP_Node *thissop = cookparms.getNode();
895  if (!thissop) return (myPromotions(_idx[0]).preserve);
896  int _parmidx[2-1];
897  _parmidx[1-1] = _idx[1-1] + 1;
898 
899  bool result;
900  OP_Utils::evalOpParmInst(result, thissop, "preserve#", _parmidx, cookparms.getCookTime(), 0, 2-1);
901  return (result);
902  }
903  bool opPromotions_onlyboundary(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
904  { return opinstPromotions_onlyboundary(cookparms, &_idx); }
905  bool opinstPromotions_onlyboundary(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
906  {
907  SOP_Node *thissop = cookparms.getNode();
908  if (!thissop) return (myPromotions(_idx[0]).onlyboundary);
909  int _parmidx[2-1];
910  _parmidx[1-1] = _idx[1-1] + 1;
911 
912  bool result;
913  OP_Utils::evalOpParmInst(result, thissop, "onlyboundary#", _parmidx, cookparms.getCookTime(), 0, 2-1);
914  return (result);
915  }
916  bool opPromotions_includeunshared(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
917  { return opinstPromotions_includeunshared(cookparms, &_idx); }
918  bool opinstPromotions_includeunshared(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
919  {
920  SOP_Node *thissop = cookparms.getNode();
921  if (!thissop) return (myPromotions(_idx[0]).includeunshared);
922  int _parmidx[2-1];
923  _parmidx[1-1] = _idx[1-1] + 1;
924 
925  bool result;
926  OP_Utils::evalOpParmInst(result, thissop, "includeunshared#", _parmidx, cookparms.getCookTime(), 0, 2-1);
927  return (result);
928  }
929  bool opPromotions_includecurveunshared(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
930  { return opinstPromotions_includecurveunshared(cookparms, &_idx); }
931  bool opinstPromotions_includecurveunshared(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
932  {
933  SOP_Node *thissop = cookparms.getNode();
934  if (!thissop) return (myPromotions(_idx[0]).includecurveunshared);
935  int _parmidx[2-1];
936  _parmidx[1-1] = _idx[1-1] + 1;
937 
938  bool result;
939  OP_Utils::evalOpParmInst(result, thissop, "includecurveunshared#", _parmidx, cookparms.getCookTime(), 0, 2-1);
940  return (result);
941  }
942  bool opPromotions_useconnectivityattrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
943  { return opinstPromotions_useconnectivityattrib(cookparms, &_idx); }
944  bool opinstPromotions_useconnectivityattrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
945  {
946  SOP_Node *thissop = cookparms.getNode();
947  if (!thissop) return (myPromotions(_idx[0]).useconnectivityattrib);
948  int _parmidx[2-1];
949  _parmidx[1-1] = _idx[1-1] + 1;
950 
951  bool result;
952  OP_Utils::evalOpParmInst(result, thissop, "useconnectivityattrib#", _parmidx, cookparms.getCookTime(), 0, 2-1);
953  return (result);
954  }
956  { return opinstPromotions_connectivityattrib(cookparms, &_idx); }
958  {
959  SOP_Node *thissop = cookparms.getNode();
960  if (!thissop) return (myPromotions(_idx[0]).connectivityattrib);
961  int _parmidx[2-1];
962  _parmidx[1-1] = _idx[1-1] + 1;
963 
965  OP_Utils::evalOpParmInst(result, thissop, "connectivityattrib#", _parmidx, cookparms.getCookTime(), 0, 2-1);
966  return (result);
967  }
968  bool opPromotions_primsbyattribbndpts(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
969  { return opinstPromotions_primsbyattribbndpts(cookparms, &_idx); }
970  bool opinstPromotions_primsbyattribbndpts(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
971  {
972  SOP_Node *thissop = cookparms.getNode();
973  if (!thissop) return (myPromotions(_idx[0]).primsbyattribbndpts);
974  int _parmidx[2-1];
975  _parmidx[1-1] = _idx[1-1] + 1;
976 
977  bool result;
978  OP_Utils::evalOpParmInst(result, thissop, "primsbyattribbndpts#", _parmidx, cookparms.getCookTime(), 0, 2-1);
979  return (result);
980  }
981  bool opPromotions_onlyfull(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
982  { return opinstPromotions_onlyfull(cookparms, &_idx); }
983  bool opinstPromotions_onlyfull(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
984  {
985  SOP_Node *thissop = cookparms.getNode();
986  if (!thissop) return (myPromotions(_idx[0]).onlyfull);
987  int _parmidx[2-1];
988  _parmidx[1-1] = _idx[1-1] + 1;
989 
990  bool result;
991  OP_Utils::evalOpParmInst(result, thissop, "onlyfull#", _parmidx, cookparms.getCookTime(), 0, 2-1);
992  return (result);
993  }
994  bool opPromotions_onlyprimsedge(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
995  { return opinstPromotions_onlyprimsedge(cookparms, &_idx); }
996  bool opinstPromotions_onlyprimsedge(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
997  {
998  SOP_Node *thissop = cookparms.getNode();
999  if (!thissop) return (myPromotions(_idx[0]).onlyprimsedge);
1000  int _parmidx[2-1];
1001  _parmidx[1-1] = _idx[1-1] + 1;
1002 
1003  bool result;
1004  OP_Utils::evalOpParmInst(result, thissop, "onlyprimsedge#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1005  return (result);
1006  }
1007  bool opPromotions_removedegen(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1008  { return opinstPromotions_removedegen(cookparms, &_idx); }
1009  bool opinstPromotions_removedegen(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1010  {
1011  SOP_Node *thissop = cookparms.getNode();
1012  if (!thissop) return (myPromotions(_idx[0]).removedegen);
1013  int _parmidx[2-1];
1014  _parmidx[1-1] = _idx[1-1] + 1;
1015 
1016  bool result;
1017  OP_Utils::evalOpParmInst(result, thissop, "removedegen#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1018  return (result);
1019  }
1020  bool opPromotions_toattrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1021  { return opinstPromotions_toattrib(cookparms, &_idx); }
1022  bool opinstPromotions_toattrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1023  {
1024  SOP_Node *thissop = cookparms.getNode();
1025  if (!thissop) return (myPromotions(_idx[0]).toattrib);
1026  int _parmidx[2-1];
1027  _parmidx[1-1] = _idx[1-1] + 1;
1028 
1029  bool result;
1030  OP_Utils::evalOpParmInst(result, thissop, "toattrib#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1031  return (result);
1032  }
1033 
1034 
1035 private:
1036  UT_Array<Promotions> myPromotions;
1037 
1038 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool opinstPromotions_onlyprimsedge(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void copyFrom(const OP_NodeParms *src) override
bool opPromotions_removedegen(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder createString(const UT_Array< Promotions > &list) const
bool opinstPromotions_onlyfull(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void
Definition: png.h:1083
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opPromotions_connectivityattrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool opPromotions_onlyfull(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE const char * buffer() const
bool opinstPromotions_useconnectivityattrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLdouble s
Definition: glad.h:3009
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opPromotions_onlyprimsedge(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opinstPromotions_fromtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opPromotions_newname(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
**But if you need a result
Definition: thread.h:613
bool opinstPromotions_toattrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_StringHolder opinstPromotions_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opPromotions_onlyboundary(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opinstPromotions_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
int64 opinstPromotions_totype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool opPromotions_useconnectivityattrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, bool &v)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
static void saveData(std::ostream &os, bool v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool isParmColorRamp(exint idx) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
int64 opPromotions_totype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opinstPromotions_connectivityattrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
bool opPromotions_toattrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const Promotions &src) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
exint getNestNumParms(TempIndex idx) const override
bool opinstPromotions_removedegen(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opPromotions_fromtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
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 opinstPromotions_preserve(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder opPromotions_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE UT_StringHolder getToken(Fromtype enum_value)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool opPromotions_includecurveunshared(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
GT_API const UT_StringHolder version
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
exint opPromotions(const SOP_NodeVerb::CookParms &cookparms) const
bool opPromotions_preserve(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opinstPromotions_includeunshared(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool operator!=(const SOP_GroupPromoteParms &src) const
bool opinstPromotions_primsbyattribbndpts(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setPromotions(const UT_Array< Promotions > &val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void loadData(UT_IStream &is, UT_Vector4D &v)
#define SOP_API
Definition: SOP_API.h:10
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator==(const Promotions &src) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opinstPromotions_newname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opPromotions_primsbyattribbndpts(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GLboolean r
Definition: glcorearb.h:1222
bool opPromotions_includeunshared(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opPromotions_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
ParmType getNestParmType(TempIndex fieldnum) const override
type
Definition: core.h:1059
bool opinstPromotions_includecurveunshared(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator==(const SOP_GroupPromoteParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
bool opinstPromotions_onlyboundary(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
const UT_Array< Promotions > & getPromotions() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Matrix2D v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override