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