HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupCombine.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_GroupCombineEnums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
28  POINTS,
29  PRIMS,
30  EDGES
31  };
32  enum class Negate_a
33  {
34  OFF = 0,
35  ON
36  };
37  enum class Op_ab
38  {
39  NONE = 0,
40  OR,
41  AND,
42  XOR,
43  SUB
44  };
45  enum class Negate_b
46  {
47  OFF = 0,
48  ON
49  };
50  enum class Op_bc
51  {
52  NONE = 0,
53  OR,
54  AND,
55  XOR,
56  SUB
57  };
58  enum class Negate_c
59  {
60  OFF = 0,
61  ON
62  };
63  enum class Op_cd
64  {
65  NONE = 0,
66  OR,
67  AND,
68  XOR,
69  SUB
70  };
71  enum class Negate_d
72  {
73  OFF = 0,
74  ON
75  };
76 }
77 
78 
80 {
81 public:
82  static int version() { return 1; }
83  struct Numcombine
84  {
98 
99 
101  {
102  grouptype = 0;
103  group = ""_sh;
104  negate_a = 0;
105  group_a = ""_sh;
106  op_ab = 0;
107  negate_b = 0;
108  group_b = ""_sh;
109  op_bc = 0;
110  negate_c = 0;
111  group_c = ""_sh;
112  op_cd = 0;
113  negate_d = 0;
114  group_d = ""_sh;
115 
116  }
117 
118  bool operator==(const Numcombine &src) const
119  {
120  if (grouptype != src.grouptype) return false;
121  if (group != src.group) return false;
122  if (negate_a != src.negate_a) return false;
123  if (group_a != src.group_a) return false;
124  if (op_ab != src.op_ab) return false;
125  if (negate_b != src.negate_b) return false;
126  if (group_b != src.group_b) return false;
127  if (op_bc != src.op_bc) return false;
128  if (negate_c != src.negate_c) return false;
129  if (group_c != src.group_c) return false;
130  if (op_cd != src.op_cd) return false;
131  if (negate_d != src.negate_d) return false;
132  if (group_d != src.group_d) return false;
133 
134  return true;
135  }
136  bool operator!=(const Numcombine &src) const
137  {
138  return !operator==(src);
139  }
140 
141  };
142 
144  {
146 
147  buf.strcat("[ ");
148  for (int i = 0; i < list.entries(); i++)
149  {
150  if (i)
151  buf.strcat(", ");
152  buf.strcat("( ");
153  buf.append("");
154  buf.appendSprintf("%d", (int) list(i).grouptype);
155  buf.append(", ");
156  { UT_String tmp; tmp = UT_StringWrap(list(i).group).makeQuotedString('"'); buf.strcat(tmp); }
157  buf.append(", ");
158  buf.appendSprintf("%d", (int) list(i).negate_a);
159  buf.append(", ");
160  { UT_String tmp; tmp = UT_StringWrap(list(i).group_a).makeQuotedString('"'); buf.strcat(tmp); }
161  buf.append(", ");
162  buf.appendSprintf("%d", (int) list(i).op_ab);
163  buf.append(", ");
164  buf.appendSprintf("%d", (int) list(i).negate_b);
165  buf.append(", ");
166  { UT_String tmp; tmp = UT_StringWrap(list(i).group_b).makeQuotedString('"'); buf.strcat(tmp); }
167  buf.append(", ");
168  buf.appendSprintf("%d", (int) list(i).op_bc);
169  buf.append(", ");
170  buf.appendSprintf("%d", (int) list(i).negate_c);
171  buf.append(", ");
172  { UT_String tmp; tmp = UT_StringWrap(list(i).group_c).makeQuotedString('"'); buf.strcat(tmp); }
173  buf.append(", ");
174  buf.appendSprintf("%d", (int) list(i).op_cd);
175  buf.append(", ");
176  buf.appendSprintf("%d", (int) list(i).negate_d);
177  buf.append(", ");
178  { UT_String tmp; tmp = UT_StringWrap(list(i).group_d).makeQuotedString('"'); buf.strcat(tmp); }
179 
180  buf.strcat(" )");
181  }
182  buf.strcat(" ]");
183 
185  return result;
186  }
187 
189  {
190 
191  }
192 
193  explicit SOP_GroupCombineParms(const SOP_GroupCombineParms &) = default;
194 
196 
198  {
199  if (myNumcombine != src.myNumcombine) return false;
200 
201  return true;
202  }
204  {
205  return !operator==(src);
206  }
215 
216 
217 
218  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
219  {
220  if (true)
221  {
222  int64 length = 0;
223  graph->evalOpParm(length, nodeidx, "numcombine", time, 0);
224  myNumcombine.entries(length);
225  for (exint i = 0; i < length; i++)
226  {
227  int parmidx = i+1;
228  auto && _curentry = myNumcombine(i);
229  (void) _curentry;
230  myNumcombine(i).grouptype = 0;
231  if (true)
232  graph->evalOpParmInst(myNumcombine(i).grouptype, nodeidx, "grouptype#", &parmidx, time, 0);
233  myNumcombine(i).group = ""_sh;
234  if (true)
235  graph->evalOpParmInst(myNumcombine(i).group, nodeidx, "group#", &parmidx, time, 0);
236  myNumcombine(i).negate_a = 0;
237  if (true)
238  graph->evalOpParmInst(myNumcombine(i).negate_a, nodeidx, "negate_a#", &parmidx, time, 0);
239  myNumcombine(i).group_a = ""_sh;
240  if (true)
241  graph->evalOpParmInst(myNumcombine(i).group_a, nodeidx, "group_a#", &parmidx, time, 0);
242  myNumcombine(i).op_ab = 0;
243  if (true)
244  graph->evalOpParmInst(myNumcombine(i).op_ab, nodeidx, "op_ab#", &parmidx, time, 0);
245  myNumcombine(i).negate_b = 0;
246  if (true && ( (!(((_curentry.op_ab==0)))) ) )
247  graph->evalOpParmInst(myNumcombine(i).negate_b, nodeidx, "negate_b#", &parmidx, time, 0);
248  myNumcombine(i).group_b = ""_sh;
249  if (true && ( (!(((_curentry.op_ab==0)))) ) )
250  graph->evalOpParmInst(myNumcombine(i).group_b, nodeidx, "group_b#", &parmidx, time, 0);
251  myNumcombine(i).op_bc = 0;
252  if (true)
253  graph->evalOpParmInst(myNumcombine(i).op_bc, nodeidx, "op_bc#", &parmidx, time, 0);
254  myNumcombine(i).negate_c = 0;
255  if (true && ( (!(((_curentry.op_bc==0)))) ) )
256  graph->evalOpParmInst(myNumcombine(i).negate_c, nodeidx, "negate_c#", &parmidx, time, 0);
257  myNumcombine(i).group_c = ""_sh;
258  if (true && ( (!(((_curentry.op_bc==0)))) ) )
259  graph->evalOpParmInst(myNumcombine(i).group_c, nodeidx, "group_c#", &parmidx, time, 0);
260  myNumcombine(i).op_cd = 0;
261  if (true)
262  graph->evalOpParmInst(myNumcombine(i).op_cd, nodeidx, "op_cd#", &parmidx, time, 0);
263  myNumcombine(i).negate_d = 0;
264  if (true && ( (!(((_curentry.op_cd==0)))) ) )
265  graph->evalOpParmInst(myNumcombine(i).negate_d, nodeidx, "negate_d#", &parmidx, time, 0);
266  myNumcombine(i).group_d = ""_sh;
267  if (true && ( (!(((_curentry.op_cd==0)))) ) )
268  graph->evalOpParmInst(myNumcombine(i).group_d, nodeidx, "group_d#", &parmidx, time, 0);
269 
270  }
271  }
272  else
273  myNumcombine.clear();
274 
275  }
276 
277 
278  void loadFromOpSubclass(const LoadParms &loadparms) override
279  {
280  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
281  }
282 
283 
284  void copyFrom(const SOP_NodeParms *src) override
285  {
286  *this = *((const SOP_GroupCombineParms *)src);
287  }
288 
289  template <typename T>
290  void
291  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
292  {
293  if (idx.size() < 1)
294  return;
295  UT_ASSERT(idx.size() == instance.size()+1);
296  if (idx.size() != instance.size()+1)
297  return;
298  switch (idx[0])
299  {
300  case 0:
301  if (idx.size() == 1)
302  coerceValue(value, myNumcombine.entries());
303  else if (instance[0] < myNumcombine.entries())
304  {
305  auto && _data = myNumcombine(instance[0]);
306  switch (idx[1])
307  {
308  case 0:
309  coerceValue(value, _data.grouptype);
310  break;
311  case 1:
312  coerceValue(value, _data.group);
313  break;
314  case 2:
315  coerceValue(value, _data.negate_a);
316  break;
317  case 3:
318  coerceValue(value, _data.group_a);
319  break;
320  case 4:
321  coerceValue(value, _data.op_ab);
322  break;
323  case 5:
324  coerceValue(value, _data.negate_b);
325  break;
326  case 6:
327  coerceValue(value, _data.group_b);
328  break;
329  case 7:
330  coerceValue(value, _data.op_bc);
331  break;
332  case 8:
333  coerceValue(value, _data.negate_c);
334  break;
335  case 9:
336  coerceValue(value, _data.group_c);
337  break;
338  case 10:
339  coerceValue(value, _data.op_cd);
340  break;
341  case 11:
342  coerceValue(value, _data.negate_d);
343  break;
344  case 12:
345  coerceValue(value, _data.group_d);
346  break;
347 
348  }
349  }
350  break;
351 
352  }
353  }
354 
355  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
356  { doGetParmValue(idx, instance, value); }
357  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
358  { doGetParmValue(idx, instance, value); }
359  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
360  { doGetParmValue(idx, instance, value); }
361  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
362  { doGetParmValue(idx, instance, value); }
363  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
364  { doGetParmValue(idx, instance, value); }
365  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
366  { doGetParmValue(idx, instance, value); }
367  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
368  { doGetParmValue(idx, instance, value); }
369  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
370  { doGetParmValue(idx, instance, value); }
371  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
372  { doGetParmValue(idx, instance, value); }
373  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
374  { doGetParmValue(idx, instance, value); }
375  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
376  { doGetParmValue(idx, instance, value); }
377 
378  template <typename T>
379  void
380  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
381  {
382  if (idx.size() < 1)
383  return;
384  UT_ASSERT(idx.size() == instance.size()+1);
385  if (idx.size() != instance.size()+1)
386  return;
387  switch (idx[0])
388  {
389  case 0:
390  if (idx.size() == 1)
391  {
392  exint newsize;
393  coerceValue(newsize, value);
394  myNumcombine.setSize(newsize);
395  }
396  else
397  {
398  myNumcombine.setSizeIfNeeded(instance[0]+1);
399  auto && _data = myNumcombine(instance[0]);
400  switch (idx[1])
401  {
402  case 0:
403  coerceValue(_data.grouptype, value);
404  break;
405  case 1:
406  coerceValue(_data.group, value);
407  break;
408  case 2:
409  coerceValue(_data.negate_a, value);
410  break;
411  case 3:
412  coerceValue(_data.group_a, value);
413  break;
414  case 4:
415  coerceValue(_data.op_ab, value);
416  break;
417  case 5:
418  coerceValue(_data.negate_b, value);
419  break;
420  case 6:
421  coerceValue(_data.group_b, value);
422  break;
423  case 7:
424  coerceValue(_data.op_bc, value);
425  break;
426  case 8:
427  coerceValue(_data.negate_c, value);
428  break;
429  case 9:
430  coerceValue(_data.group_c, value);
431  break;
432  case 10:
433  coerceValue(_data.op_cd, value);
434  break;
435  case 11:
436  coerceValue(_data.negate_d, value);
437  break;
438  case 12:
439  coerceValue(_data.group_d, value);
440  break;
441 
442  }
443  }
444  break;
445 
446  }
447  }
448 
449  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
450  { doSetParmValue(idx, instance, value); }
451  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
452  { doSetParmValue(idx, instance, value); }
453  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
454  { doSetParmValue(idx, instance, value); }
455  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
456  { doSetParmValue(idx, instance, value); }
457  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
458  { doSetParmValue(idx, instance, value); }
459  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
460  { doSetParmValue(idx, instance, value); }
461  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
462  { doSetParmValue(idx, instance, value); }
463  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
464  { doSetParmValue(idx, instance, value); }
465  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
466  { doSetParmValue(idx, instance, value); }
467  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
468  { doSetParmValue(idx, instance, value); }
469  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
470  { doSetParmValue(idx, instance, value); }
471 
472  exint getNestNumParms(TempIndex idx) const override
473  {
474  if (idx.size() == 0)
475  return 1;
476  switch (idx[0])
477  {
478  case 0:
479  return 13;
480 
481  }
482  // Invalid
483  return 0;
484  }
485 
486  const char *getNestParmName(TempIndex fieldnum) const override
487  {
488  if (fieldnum.size() < 1)
489  return 0;
490  switch (fieldnum[0])
491  {
492  case 0:
493  if (fieldnum.size() == 1)
494  return "numcombine";
495  switch (fieldnum[1])
496  {
497  case 0:
498  return "grouptype#";
499  case 1:
500  return "group#";
501  case 2:
502  return "negate_a#";
503  case 3:
504  return "group_a#";
505  case 4:
506  return "op_ab#";
507  case 5:
508  return "negate_b#";
509  case 6:
510  return "group_b#";
511  case 7:
512  return "op_bc#";
513  case 8:
514  return "negate_c#";
515  case 9:
516  return "group_c#";
517  case 10:
518  return "op_cd#";
519  case 11:
520  return "negate_d#";
521  case 12:
522  return "group_d#";
523 
524  }
525  return 0;
526 
527  }
528  return 0;
529  }
530 
531  ParmType getNestParmType(TempIndex fieldnum) const override
532  {
533  if (fieldnum.size() < 1)
534  return PARM_UNSUPPORTED;
535  switch (fieldnum[0])
536  {
537  case 0:
538  if (fieldnum.size() == 1)
539  return PARM_MULTIPARM;
540  switch (fieldnum[1])
541  {
542  case 0:
543  return PARM_INTEGER;
544  case 1:
545  return PARM_STRING;
546  case 2:
547  return PARM_INTEGER;
548  case 3:
549  return PARM_STRING;
550  case 4:
551  return PARM_INTEGER;
552  case 5:
553  return PARM_INTEGER;
554  case 6:
555  return PARM_STRING;
556  case 7:
557  return PARM_INTEGER;
558  case 8:
559  return PARM_INTEGER;
560  case 9:
561  return PARM_STRING;
562  case 10:
563  return PARM_INTEGER;
564  case 11:
565  return PARM_INTEGER;
566  case 12:
567  return PARM_STRING;
568 
569  }
570  return PARM_UNSUPPORTED;
571 
572  }
573  return PARM_UNSUPPORTED;
574  }
575 
576  // Boiler plate to load individual types.
577  static void loadData(UT_IStream &is, int64 &v)
578  { is.bread(&v, 1); }
579  static void loadData(UT_IStream &is, bool &v)
580  { int64 iv; is.bread(&iv, 1); v = iv; }
581  static void loadData(UT_IStream &is, fpreal64 &v)
582  { is.bread<fpreal64>(&v, 1); }
583  static void loadData(UT_IStream &is, UT_Vector2D &v)
584  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
585  static void loadData(UT_IStream &is, UT_Vector3D &v)
586  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
587  is.bread<fpreal64>(&v.z(), 1); }
588  static void loadData(UT_IStream &is, UT_Vector4D &v)
589  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
590  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
591  static void loadData(UT_IStream &is, UT_Matrix2D &v)
592  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
593  static void loadData(UT_IStream &is, UT_Matrix3D &v)
594  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
595  static void loadData(UT_IStream &is, UT_Matrix4D &v)
596  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
597  static void loadData(UT_IStream &is, UT_Vector2I &v)
598  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
599  static void loadData(UT_IStream &is, UT_Vector3I &v)
600  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
601  is.bread<int64>(&v.z(), 1); }
602  static void loadData(UT_IStream &is, UT_Vector4I &v)
603  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
604  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
606  { is.bread(v); }
608  { UT_StringHolder rampdata;
609  loadData(is, rampdata);
610  if (rampdata.isstring())
611  {
612  v.reset(new UT_Ramp());
613  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
614  v->load(istr);
615  }
616  else v.reset();
617  }
620  loadData(is, data);
621  if (data.isstring())
622  {
623  // Find the data type.
624  const char *colon = UT_StringWrap(data).findChar(':');
625  if (colon)
626  {
627  int typelen = colon - data.buffer();
629  type.strncpy(data.buffer(), typelen);
630  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
631 
632  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
633  }
634  }
635  else v.reset();
636  }
637 
638  static void saveData(std::ostream &os, int64 v)
639  { UTwrite(os, &v); }
640  static void saveData(std::ostream &os, bool v)
641  { int64 iv = v; UTwrite(os, &iv); }
642  static void saveData(std::ostream &os, fpreal64 v)
643  { UTwrite<fpreal64>(os, &v); }
644  static void saveData(std::ostream &os, UT_Vector2D v)
645  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
646  static void saveData(std::ostream &os, UT_Vector3D v)
647  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
648  UTwrite<fpreal64>(os, &v.z()); }
649  static void saveData(std::ostream &os, UT_Vector4D v)
650  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
651  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
652  static void saveData(std::ostream &os, UT_Matrix2D v)
654  static void saveData(std::ostream &os, UT_Matrix3D v)
656  static void saveData(std::ostream &os, UT_Matrix4D v)
658  static void saveData(std::ostream &os, UT_StringHolder s)
659  { UT_StringWrap(s).saveBinary(os); }
660  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
662  UT_OStringStream ostr;
663  if (s) s->save(ostr);
664  result = ostr.str();
665  saveData(os, result);
666  }
667  static void saveData(std::ostream &os, PRM_DataItemHandle s)
669  UT_OStringStream ostr;
670  if (s)
671  {
672  ostr << s->getDataTypeToken();
673  ostr << ":";
674  s->saveBinary(ostr);
675  }
676  result = ostr.str();
677  saveData(os, result);
678  }
679 
680 
681  void save(std::ostream &os) const
682  {
683  int32 v = version();
684  UTwrite(os, &v);
685  {
686  int64 length = myNumcombine.entries();
687  UTwrite(os, &length);
688  for (exint i = 0; i < length; i++)
689  {
690  saveData(os, myNumcombine(i).grouptype);
691  saveData(os, myNumcombine(i).group);
692  saveData(os, myNumcombine(i).negate_a);
693  saveData(os, myNumcombine(i).group_a);
694  saveData(os, myNumcombine(i).op_ab);
695  saveData(os, myNumcombine(i).negate_b);
696  saveData(os, myNumcombine(i).group_b);
697  saveData(os, myNumcombine(i).op_bc);
698  saveData(os, myNumcombine(i).negate_c);
699  saveData(os, myNumcombine(i).group_c);
700  saveData(os, myNumcombine(i).op_cd);
701  saveData(os, myNumcombine(i).negate_d);
702  saveData(os, myNumcombine(i).group_d);
703 
704  }
705  }
706 
707  }
708 
709  bool load(UT_IStream &is)
710  {
711  int32 v;
712  is.bread(&v, 1);
713  if (version() != v)
714  {
715  // Fail incompatible versions
716  return false;
717  }
718  {
719  int64 length;
720  is.read(&length, 1);
721  myNumcombine.entries(length);
722  for (exint i = 0; i < length; i++)
723  {
724  loadData(is, myNumcombine(i).grouptype);
725  loadData(is, myNumcombine(i).group);
726  loadData(is, myNumcombine(i).negate_a);
727  loadData(is, myNumcombine(i).group_a);
728  loadData(is, myNumcombine(i).op_ab);
729  loadData(is, myNumcombine(i).negate_b);
730  loadData(is, myNumcombine(i).group_b);
731  loadData(is, myNumcombine(i).op_bc);
732  loadData(is, myNumcombine(i).negate_c);
733  loadData(is, myNumcombine(i).group_c);
734  loadData(is, myNumcombine(i).op_cd);
735  loadData(is, myNumcombine(i).negate_d);
736  loadData(is, myNumcombine(i).group_d);
737 
738  }
739  }
740 
741  return true;
742  }
743 
744  const UT_Array<Numcombine> &getNumcombine() const { return myNumcombine; }
745  void setNumcombine(const UT_Array<Numcombine> &val) { myNumcombine = val; }
747  {
748  SOP_Node *thissop = cookparms.getNode();
749  if (!thissop) return getNumcombine().entries();
750  exint result;
751  OP_Utils::evalOpParm(result, thissop, "numcombine", cookparms.getCookTime(), 0);
752  return result;
753  }
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return (myNumcombine(_idx).grouptype);
758  int _parmidx = _idx + 1;
759  int64 result;
760  OP_Utils::evalOpParmInst(result, thissop, "grouptype#", &_parmidx, cookparms.getCookTime(), 0);
761  return (result);
762  }
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return (myNumcombine(_idx).group);
767  int _parmidx = _idx + 1;
769  OP_Utils::evalOpParmInst(result, thissop, "group#", &_parmidx, cookparms.getCookTime(), 0);
770  return (result);
771  }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return (myNumcombine(_idx).negate_a);
776  int _parmidx = _idx + 1;
777  int64 result;
778  OP_Utils::evalOpParmInst(result, thissop, "negate_a#", &_parmidx, cookparms.getCookTime(), 0);
779  return (result);
780  }
782  {
783  SOP_Node *thissop = cookparms.getNode();
784  if (!thissop) return (myNumcombine(_idx).group_a);
785  int _parmidx = _idx + 1;
787  OP_Utils::evalOpParmInst(result, thissop, "group_a#", &_parmidx, cookparms.getCookTime(), 0);
788  return (result);
789  }
791  {
792  SOP_Node *thissop = cookparms.getNode();
793  if (!thissop) return (myNumcombine(_idx).op_ab);
794  int _parmidx = _idx + 1;
795  int64 result;
796  OP_Utils::evalOpParmInst(result, thissop, "op_ab#", &_parmidx, cookparms.getCookTime(), 0);
797  return (result);
798  }
800  {
801  SOP_Node *thissop = cookparms.getNode();
802  if (!thissop) return (myNumcombine(_idx).negate_b);
803  int _parmidx = _idx + 1;
804  int64 result;
805  OP_Utils::evalOpParmInst(result, thissop, "negate_b#", &_parmidx, cookparms.getCookTime(), 0);
806  return (result);
807  }
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return (myNumcombine(_idx).group_b);
812  int _parmidx = _idx + 1;
814  OP_Utils::evalOpParmInst(result, thissop, "group_b#", &_parmidx, cookparms.getCookTime(), 0);
815  return (result);
816  }
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return (myNumcombine(_idx).op_bc);
821  int _parmidx = _idx + 1;
822  int64 result;
823  OP_Utils::evalOpParmInst(result, thissop, "op_bc#", &_parmidx, cookparms.getCookTime(), 0);
824  return (result);
825  }
827  {
828  SOP_Node *thissop = cookparms.getNode();
829  if (!thissop) return (myNumcombine(_idx).negate_c);
830  int _parmidx = _idx + 1;
831  int64 result;
832  OP_Utils::evalOpParmInst(result, thissop, "negate_c#", &_parmidx, cookparms.getCookTime(), 0);
833  return (result);
834  }
836  {
837  SOP_Node *thissop = cookparms.getNode();
838  if (!thissop) return (myNumcombine(_idx).group_c);
839  int _parmidx = _idx + 1;
841  OP_Utils::evalOpParmInst(result, thissop, "group_c#", &_parmidx, cookparms.getCookTime(), 0);
842  return (result);
843  }
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return (myNumcombine(_idx).op_cd);
848  int _parmidx = _idx + 1;
849  int64 result;
850  OP_Utils::evalOpParmInst(result, thissop, "op_cd#", &_parmidx, cookparms.getCookTime(), 0);
851  return (result);
852  }
854  {
855  SOP_Node *thissop = cookparms.getNode();
856  if (!thissop) return (myNumcombine(_idx).negate_d);
857  int _parmidx = _idx + 1;
858  int64 result;
859  OP_Utils::evalOpParmInst(result, thissop, "negate_d#", &_parmidx, cookparms.getCookTime(), 0);
860  return (result);
861  }
863  {
864  SOP_Node *thissop = cookparms.getNode();
865  if (!thissop) return (myNumcombine(_idx).group_d);
866  int _parmidx = _idx + 1;
868  OP_Utils::evalOpParmInst(result, thissop, "group_d#", &_parmidx, cookparms.getCookTime(), 0);
869  return (result);
870  }
871 
872 
873 private:
874  UT_Array<Numcombine> myNumcombine;
875 
876 };
GLdouble s
Definition: glew.h:1390
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
GLenum src
Definition: glew.h:2410
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opNumcombine_negate_c(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator==(const Numcombine &src) const
static void saveData(std::ostream &os, UT_Vector4D v)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
int64 opNumcombine_op_cd(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void copyFrom(const SOP_NodeParms *src) override
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
static void saveData(std::ostream &os, int64 v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
int64 opNumcombine_op_ab(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opNumcombine_group_a(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, bool v)
const GLdouble * v
Definition: glew.h:1391
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void save(std::ostream &os) const
double fpreal64
Definition: SYS_Types.h:201
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_Array< Numcombine > & getNumcombine() const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opNumcombine_group_d(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const SOP_GroupCombineParms &src) const
void loadFromOpSubclass(const LoadParms &loadparms) override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint length() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
exint opNumcombine(const SOP_NodeVerb::CookParms &cookparms) const
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int64 opNumcombine_negate_b(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const char * getNestParmName(TempIndex fieldnum) const override
void
Definition: png.h:1083
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
long long int64
Definition: SYS_Types.h:116
bool operator!=(const Numcombine &src) const
UT_StringHolder createString(const UT_Array< Numcombine > &list) const
int64 opNumcombine_grouptype(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opNumcombine_op_bc(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNumcombine(const UT_Array< Numcombine > &val)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
int64 opNumcombine_negate_d(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
ParmType getNestParmType(TempIndex fieldnum) const override
int64 opNumcombine_negate_a(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opNumcombine_group_b(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_StringHolder opNumcombine_group_c(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void loadData(UT_IStream &is, UT_Matrix3D &v)
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint getNestNumParms(TempIndex idx) const override
bool operator!=(const SOP_GroupCombineParms &src) const
UT_StringHolder opNumcombine_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
GLsizei const GLfloat * value
Definition: glew.h:1849
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
GLboolean GLuint group
Definition: glew.h:2745