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