HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_BlendShapes-2.0.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_BlendShapes_2_0Enums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
28  VERTICES,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33  enum class VoxelBlend
34  {
35  NONE = 0,
38  };
39 }
40 
41 
43 {
44 public:
45  static int version() { return 1; }
46  struct Nblends
47  {
49 
50 
52  {
53  blend = 0;
54 
55  }
56 
57  bool operator==(const Nblends &src) const
58  {
59  if (blend != src.blend) return false;
60 
61  return true;
62  }
63  bool operator!=(const Nblends &src) const
64  {
65  return !operator==(src);
66  }
67 
68  };
69 
71  {
73 
74  buf.strcat("[ ");
75  for (int i = 0; i < list.entries(); i++)
76  {
77  if (i)
78  buf.strcat(", ");
79  buf.strcat("( ");
80  buf.append("");
81  buf.appendSprintf("%f", (list(i).blend));
82 
83  buf.strcat(" )");
84  }
85  buf.strcat(" ]");
86 
88  return result;
89  }
90 
92  {
93  myGroup = ""_sh;
94  myGrouptype = 0;
95  mySelectionIdx = 0;
96  myDiff = true;
97  myCacheDeltas = false;
98  myDoPack = false;
99  myDoPackFirst = true;
100  myWeightPerPack = true;
101  myAttribs = "*"_sh;
102  myPtIDAttr = ""_sh;
103  myPrimIDAttr = ""_sh;
104  myVoxelBlend = 0;
105  myDoSlerp = true;
106 
107  }
108 
109  explicit SOP_BlendShapes_2_0Parms(const SOP_BlendShapes_2_0Parms &) = default;
110 
112 
114  {
115  if (myGroup != src.myGroup) return false;
116  if (myGrouptype != src.myGrouptype) return false;
117  if (mySelectionIdx != src.mySelectionIdx) return false;
118  if (myDiff != src.myDiff) return false;
119  if (myCacheDeltas != src.myCacheDeltas) return false;
120  if (myDoPack != src.myDoPack) return false;
121  if (myDoPackFirst != src.myDoPackFirst) return false;
122  if (myWeightPerPack != src.myWeightPerPack) return false;
123  if (myAttribs != src.myAttribs) return false;
124  if (myPtIDAttr != src.myPtIDAttr) return false;
125  if (myPrimIDAttr != src.myPrimIDAttr) return false;
126  if (myVoxelBlend != src.myVoxelBlend) return false;
127  if (myDoSlerp != src.myDoSlerp) return false;
128  if (myNblends != src.myNblends) return false;
129 
130  return true;
131  }
133  {
134  return !operator==(src);
135  }
138 
139 
140 
141  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
142  {
143  myGroup = ""_sh;
144  if (true)
145  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
146  myGrouptype = 0;
147  if (true)
148  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
149  mySelectionIdx = 0;
150  if (true)
151  graph->evalOpParm(mySelectionIdx, nodeidx, "selectionidx", time, 0);
152  myDiff = true;
153  if (true)
154  graph->evalOpParm(myDiff, nodeidx, "diff", time, 0);
155  myCacheDeltas = false;
156  if (true && ( (!(((getDiff()==0)))) ) )
157  graph->evalOpParm(myCacheDeltas, nodeidx, "cachedeltas", time, 0);
158  myDoPack = false;
159  if (true)
160  graph->evalOpParm(myDoPack, nodeidx, "pack", time, 0);
161  myDoPackFirst = true;
162  if (true && ( (!(((getDoPack()==0)))) ) )
163  graph->evalOpParm(myDoPackFirst, nodeidx, "packfirst", time, 0);
164  myWeightPerPack = true;
165  if (true && ( (!(((getDoPack()==0)))) ) )
166  graph->evalOpParm(myWeightPerPack, nodeidx, "weightperpack", time, 0);
167  myAttribs = "*"_sh;
168  if (true)
169  graph->evalOpParm(myAttribs, nodeidx, "attribs", time, 0);
170  myPtIDAttr = ""_sh;
171  if (true)
172  graph->evalOpParm(myPtIDAttr, nodeidx, "ptidattr", time, 0);
173  myPrimIDAttr = ""_sh;
174  if (true)
175  graph->evalOpParm(myPrimIDAttr, nodeidx, "primidattr", time, 0);
176  myVoxelBlend = 0;
177  if (true)
178  graph->evalOpParm(myVoxelBlend, nodeidx, "voxelblend", time, 0);
179  myDoSlerp = true;
180  if (true)
181  graph->evalOpParm(myDoSlerp, nodeidx, "doslerp", time, 0);
182  if (true)
183  {
184  int64 length = 0;
185  graph->evalOpParm(length, nodeidx, "nblends", time, 0);
186  myNblends.entries(length);
187  for (exint i = 0; i < length; i++)
188  {
189  int parmidx = i+0;
190  auto && _curentry = myNblends(i);
191  (void) _curentry;
192  myNblends(i).blend = 0;
193  if (true)
194  graph->evalOpParmInst(myNblends(i).blend, nodeidx, "blend#", &parmidx, time, 0);
195 
196  }
197  }
198  else
199  myNblends.clear();
200 
201  }
202 
203 
204  void loadFromOpSubclass(const LoadParms &loadparms) override
205  {
206  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
207  }
208 
209 
210  void copyFrom(const SOP_NodeParms *src) override
211  {
212  *this = *((const SOP_BlendShapes_2_0Parms *)src);
213  }
214 
215  template <typename T>
216  void
217  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
218  {
219  if (idx.size() < 1)
220  return;
221  UT_ASSERT(idx.size() == instance.size()+1);
222  if (idx.size() != instance.size()+1)
223  return;
224  switch (idx[0])
225  {
226  case 0:
227  coerceValue(value, myGroup);
228  break;
229  case 1:
230  coerceValue(value, myGrouptype);
231  break;
232  case 2:
233  coerceValue(value, mySelectionIdx);
234  break;
235  case 3:
236  coerceValue(value, myDiff);
237  break;
238  case 4:
239  coerceValue(value, myCacheDeltas);
240  break;
241  case 5:
242  coerceValue(value, myDoPack);
243  break;
244  case 6:
245  coerceValue(value, myDoPackFirst);
246  break;
247  case 7:
248  coerceValue(value, myWeightPerPack);
249  break;
250  case 8:
251  coerceValue(value, myAttribs);
252  break;
253  case 9:
254  coerceValue(value, myPtIDAttr);
255  break;
256  case 10:
257  coerceValue(value, myPrimIDAttr);
258  break;
259  case 11:
260  coerceValue(value, myVoxelBlend);
261  break;
262  case 12:
263  coerceValue(value, myDoSlerp);
264  break;
265  case 13:
266  if (idx.size() == 1)
267  coerceValue(value, myNblends.entries());
268  else if (instance[0] < myNblends.entries())
269  {
270  auto && _data = myNblends(instance[0]);
271  switch (idx[1])
272  {
273  case 0:
274  coerceValue(value, _data.blend);
275  break;
276 
277  }
278  }
279  break;
280 
281  }
282  }
283 
284  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
305  { doGetParmValue(idx, instance, value); }
306 
307  template <typename T>
308  void
309  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
310  {
311  if (idx.size() < 1)
312  return;
313  UT_ASSERT(idx.size() == instance.size()+1);
314  if (idx.size() != instance.size()+1)
315  return;
316  switch (idx[0])
317  {
318  case 0:
319  coerceValue(myGroup, value);
320  break;
321  case 1:
322  coerceValue(myGrouptype, value);
323  break;
324  case 2:
325  coerceValue(mySelectionIdx, value);
326  break;
327  case 3:
328  coerceValue(myDiff, value);
329  break;
330  case 4:
331  coerceValue(myCacheDeltas, value);
332  break;
333  case 5:
334  coerceValue(myDoPack, value);
335  break;
336  case 6:
337  coerceValue(myDoPackFirst, value);
338  break;
339  case 7:
340  coerceValue(myWeightPerPack, value);
341  break;
342  case 8:
343  coerceValue(myAttribs, value);
344  break;
345  case 9:
346  coerceValue(myPtIDAttr, value);
347  break;
348  case 10:
349  coerceValue(myPrimIDAttr, value);
350  break;
351  case 11:
352  coerceValue(myVoxelBlend, value);
353  break;
354  case 12:
355  coerceValue(myDoSlerp, value);
356  break;
357  case 13:
358  if (idx.size() == 1)
359  {
360  exint newsize;
361  coerceValue(newsize, value);
362  myNblends.setSize(newsize);
363  }
364  else
365  {
366  myNblends.setSizeIfNeeded(instance[0]+1);
367  auto && _data = myNblends(instance[0]);
368  switch (idx[1])
369  {
370  case 0:
371  coerceValue(_data.blend, value);
372  break;
373 
374  }
375  }
376  break;
377 
378  }
379  }
380 
381  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
394  { doSetParmValue(idx, instance, value); }
395  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
396  { doSetParmValue(idx, instance, value); }
397  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
398  { doSetParmValue(idx, instance, value); }
399  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
400  { doSetParmValue(idx, instance, value); }
401  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
402  { doSetParmValue(idx, instance, value); }
403 
404  exint getNestNumParms(TempIndex idx) const override
405  {
406  if (idx.size() == 0)
407  return 14;
408  switch (idx[0])
409  {
410  case 13:
411  return 1;
412 
413  }
414  // Invalid
415  return 0;
416  }
417 
418  const char *getNestParmName(TempIndex fieldnum) const override
419  {
420  if (fieldnum.size() < 1)
421  return 0;
422  switch (fieldnum[0])
423  {
424  case 0:
425  return "group";
426  case 1:
427  return "grouptype";
428  case 2:
429  return "selectionidx";
430  case 3:
431  return "diff";
432  case 4:
433  return "cachedeltas";
434  case 5:
435  return "pack";
436  case 6:
437  return "packfirst";
438  case 7:
439  return "weightperpack";
440  case 8:
441  return "attribs";
442  case 9:
443  return "ptidattr";
444  case 10:
445  return "primidattr";
446  case 11:
447  return "voxelblend";
448  case 12:
449  return "doslerp";
450  case 13:
451  if (fieldnum.size() == 1)
452  return "nblends";
453  switch (fieldnum[1])
454  {
455  case 0:
456  return "blend#";
457 
458  }
459  return 0;
460 
461  }
462  return 0;
463  }
464 
465  ParmType getNestParmType(TempIndex fieldnum) const override
466  {
467  if (fieldnum.size() < 1)
468  return PARM_UNSUPPORTED;
469  switch (fieldnum[0])
470  {
471  case 0:
472  return PARM_STRING;
473  case 1:
474  return PARM_INTEGER;
475  case 2:
476  return PARM_INTEGER;
477  case 3:
478  return PARM_INTEGER;
479  case 4:
480  return PARM_INTEGER;
481  case 5:
482  return PARM_INTEGER;
483  case 6:
484  return PARM_INTEGER;
485  case 7:
486  return PARM_INTEGER;
487  case 8:
488  return PARM_STRING;
489  case 9:
490  return PARM_STRING;
491  case 10:
492  return PARM_STRING;
493  case 11:
494  return PARM_INTEGER;
495  case 12:
496  return PARM_INTEGER;
497  case 13:
498  if (fieldnum.size() == 1)
499  return PARM_MULTIPARM;
500  switch (fieldnum[1])
501  {
502  case 0:
503  return PARM_FLOAT;
504 
505  }
506  return PARM_UNSUPPORTED;
507 
508  }
509  return PARM_UNSUPPORTED;
510  }
511 
512  // Boiler plate to load individual types.
513  static void loadData(UT_IStream &is, int64 &v)
514  { is.bread(&v, 1); }
515  static void loadData(UT_IStream &is, bool &v)
516  { int64 iv; is.bread(&iv, 1); v = iv; }
517  static void loadData(UT_IStream &is, fpreal64 &v)
518  { is.bread<fpreal64>(&v, 1); }
519  static void loadData(UT_IStream &is, UT_Vector2D &v)
520  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
521  static void loadData(UT_IStream &is, UT_Vector3D &v)
522  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
523  is.bread<fpreal64>(&v.z(), 1); }
524  static void loadData(UT_IStream &is, UT_Vector4D &v)
525  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
526  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
527  static void loadData(UT_IStream &is, UT_Matrix2D &v)
528  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
529  static void loadData(UT_IStream &is, UT_Matrix3D &v)
530  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
531  static void loadData(UT_IStream &is, UT_Matrix4D &v)
532  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
533  static void loadData(UT_IStream &is, UT_Vector2I &v)
534  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
535  static void loadData(UT_IStream &is, UT_Vector3I &v)
536  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
537  is.bread<int64>(&v.z(), 1); }
538  static void loadData(UT_IStream &is, UT_Vector4I &v)
539  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
540  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
542  { is.bread(v); }
544  { UT_StringHolder rampdata;
545  loadData(is, rampdata);
546  if (rampdata.isstring())
547  {
548  v.reset(new UT_Ramp());
549  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
550  v->load(istr);
551  }
552  else v.reset();
553  }
556  loadData(is, data);
557  if (data.isstring())
558  {
559  // Find the data type.
560  const char *colon = UT_StringWrap(data).findChar(':');
561  if (colon)
562  {
563  int typelen = colon - data.buffer();
565  type.strncpy(data.buffer(), typelen);
566  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
567 
568  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
569  }
570  }
571  else v.reset();
572  }
573 
574  static void saveData(std::ostream &os, int64 v)
575  { UTwrite(os, &v); }
576  static void saveData(std::ostream &os, bool v)
577  { int64 iv = v; UTwrite(os, &iv); }
578  static void saveData(std::ostream &os, fpreal64 v)
579  { UTwrite<fpreal64>(os, &v); }
580  static void saveData(std::ostream &os, UT_Vector2D v)
581  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
582  static void saveData(std::ostream &os, UT_Vector3D v)
583  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
584  UTwrite<fpreal64>(os, &v.z()); }
585  static void saveData(std::ostream &os, UT_Vector4D v)
586  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
587  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
588  static void saveData(std::ostream &os, UT_Matrix2D v)
590  static void saveData(std::ostream &os, UT_Matrix3D v)
592  static void saveData(std::ostream &os, UT_Matrix4D v)
594  static void saveData(std::ostream &os, UT_StringHolder s)
595  { UT_StringWrap(s).saveBinary(os); }
596  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
598  UT_OStringStream ostr;
599  if (s) s->save(ostr);
600  result = ostr.str();
601  saveData(os, result);
602  }
603  static void saveData(std::ostream &os, PRM_DataItemHandle s)
605  UT_OStringStream ostr;
606  if (s)
607  {
608  ostr << s->getDataTypeToken();
609  ostr << ":";
610  s->saveBinary(ostr);
611  }
612  result = ostr.str();
613  saveData(os, result);
614  }
615 
616 
617  void save(std::ostream &os) const
618  {
619  int32 v = version();
620  UTwrite(os, &v);
621  saveData(os, myGroup);
622  saveData(os, myGrouptype);
623  saveData(os, mySelectionIdx);
624  saveData(os, myDiff);
625  saveData(os, myCacheDeltas);
626  saveData(os, myDoPack);
627  saveData(os, myDoPackFirst);
628  saveData(os, myWeightPerPack);
629  saveData(os, myAttribs);
630  saveData(os, myPtIDAttr);
631  saveData(os, myPrimIDAttr);
632  saveData(os, myVoxelBlend);
633  saveData(os, myDoSlerp);
634  {
635  int64 length = myNblends.entries();
636  UTwrite(os, &length);
637  for (exint i = 0; i < length; i++)
638  {
639  saveData(os, myNblends(i).blend);
640 
641  }
642  }
643 
644  }
645 
646  bool load(UT_IStream &is)
647  {
648  int32 v;
649  is.bread(&v, 1);
650  if (version() != v)
651  {
652  // Fail incompatible versions
653  return false;
654  }
655  loadData(is, myGroup);
656  loadData(is, myGrouptype);
657  loadData(is, mySelectionIdx);
658  loadData(is, myDiff);
659  loadData(is, myCacheDeltas);
660  loadData(is, myDoPack);
661  loadData(is, myDoPackFirst);
662  loadData(is, myWeightPerPack);
663  loadData(is, myAttribs);
664  loadData(is, myPtIDAttr);
665  loadData(is, myPrimIDAttr);
666  loadData(is, myVoxelBlend);
667  loadData(is, myDoSlerp);
668  {
669  int64 length;
670  is.read(&length, 1);
671  myNblends.entries(length);
672  for (exint i = 0; i < length; i++)
673  {
674  loadData(is, myNblends(i).blend);
675 
676  }
677  }
678 
679  return true;
680  }
681 
682  const UT_StringHolder & getGroup() const { return myGroup; }
683  void setGroup(const UT_StringHolder & val) { myGroup = val; }
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getGroup();
689  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
690  return result;
691  }
692  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
693  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getGrouptype();
698  int64 result;
699  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
700  return Grouptype(result);
701  }
702  int64 getSelectionIdx() const { return mySelectionIdx; }
703  void setSelectionIdx(int64 val) { mySelectionIdx = val; }
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getSelectionIdx();
708  int64 result;
709  OP_Utils::evalOpParm(result, thissop, "selectionidx", cookparms.getCookTime(), 0);
710  return result;
711  }
712  bool getDiff() const { return myDiff; }
713  void setDiff(bool val) { myDiff = val; }
714  bool opDiff(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getDiff();
718  bool result;
719  OP_Utils::evalOpParm(result, thissop, "diff", cookparms.getCookTime(), 0);
720  return result;
721  }
722  bool getCacheDeltas() const { return myCacheDeltas; }
723  void setCacheDeltas(bool val) { myCacheDeltas = val; }
724  bool opCacheDeltas(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getCacheDeltas();
728  bool result;
729  OP_Utils::evalOpParm(result, thissop, "cachedeltas", cookparms.getCookTime(), 0);
730  return result;
731  }
732  bool getDoPack() const { return myDoPack; }
733  void setDoPack(bool val) { myDoPack = val; }
734  bool opDoPack(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getDoPack();
738  bool result;
739  OP_Utils::evalOpParm(result, thissop, "pack", cookparms.getCookTime(), 0);
740  return result;
741  }
742  bool getDoPackFirst() const { return myDoPackFirst; }
743  void setDoPackFirst(bool val) { myDoPackFirst = val; }
744  bool opDoPackFirst(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getDoPackFirst();
748  bool result;
749  OP_Utils::evalOpParm(result, thissop, "packfirst", cookparms.getCookTime(), 0);
750  return result;
751  }
752  bool getWeightPerPack() const { return myWeightPerPack; }
753  void setWeightPerPack(bool val) { myWeightPerPack = val; }
754  bool opWeightPerPack(const SOP_NodeVerb::CookParms &cookparms) const
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getWeightPerPack();
758  bool result;
759  OP_Utils::evalOpParm(result, thissop, "weightperpack", cookparms.getCookTime(), 0);
760  return result;
761  }
762  const UT_StringHolder & getAttribs() const { return myAttribs; }
763  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getAttribs();
769  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
770  return result;
771  }
772  const UT_StringHolder & getPtIDAttr() const { return myPtIDAttr; }
773  void setPtIDAttr(const UT_StringHolder & val) { myPtIDAttr = val; }
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getPtIDAttr();
779  OP_Utils::evalOpParm(result, thissop, "ptidattr", cookparms.getCookTime(), 0);
780  return result;
781  }
782  const UT_StringHolder & getPrimIDAttr() const { return myPrimIDAttr; }
783  void setPrimIDAttr(const UT_StringHolder & val) { myPrimIDAttr = val; }
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getPrimIDAttr();
789  OP_Utils::evalOpParm(result, thissop, "primidattr", cookparms.getCookTime(), 0);
790  return result;
791  }
792  VoxelBlend getVoxelBlend() const { return VoxelBlend(myVoxelBlend); }
793  void setVoxelBlend(VoxelBlend val) { myVoxelBlend = int64(val); }
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getVoxelBlend();
798  int64 result;
799  OP_Utils::evalOpParm(result, thissop, "voxelblend", cookparms.getCookTime(), 0);
800  return VoxelBlend(result);
801  }
802  bool getDoSlerp() const { return myDoSlerp; }
803  void setDoSlerp(bool val) { myDoSlerp = val; }
804  bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getDoSlerp();
808  bool result;
809  OP_Utils::evalOpParm(result, thissop, "doslerp", cookparms.getCookTime(), 0);
810  return result;
811  }
812  const UT_Array<Nblends> &getNblends() const { return myNblends; }
813  void setNblends(const UT_Array<Nblends> &val) { myNblends = val; }
814  exint opNblends(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getNblends().entries();
818  exint result;
819  OP_Utils::evalOpParm(result, thissop, "nblends", cookparms.getCookTime(), 0);
820  return result;
821  }
823  {
824  SOP_Node *thissop = cookparms.getNode();
825  if (!thissop) return (myNblends(_idx).blend);
826  int _parmidx = _idx + 0;
828  OP_Utils::evalOpParmInst(result, thissop, "blend#", &_parmidx, cookparms.getCookTime(), 0);
829  return (result);
830  }
831 
832 
833 private:
834  UT_StringHolder myGroup;
835  int64 myGrouptype;
836  int64 mySelectionIdx;
837  bool myDiff;
838  bool myCacheDeltas;
839  bool myDoPack;
840  bool myDoPackFirst;
841  bool myWeightPerPack;
842  UT_StringHolder myAttribs;
843  UT_StringHolder myPtIDAttr;
844  UT_StringHolder myPrimIDAttr;
845  int64 myVoxelBlend;
846  bool myDoSlerp;
847  UT_Array<Nblends> myNblends;
848 
849 };
GLdouble s
Definition: glew.h:1390
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Nblends &src) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator!=(const SOP_BlendShapes_2_0Parms &src) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
bool opWeightPerPack(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glew.h:2410
bool opDoPackFirst(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setAttribs(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getPrimIDAttr() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
ParmType getNestParmType(TempIndex fieldnum) const override
VoxelBlend opVoxelBlend(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, bool &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getGroup() const
bool opDiff(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
double fpreal64
Definition: SYS_Types.h:201
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
Definition: simd.h:4648
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setNblends(const UT_Array< Nblends > &val)
exint length() const
const UT_StringHolder & getAttribs() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &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
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_StringHolder s)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_StringHolder createString(const UT_Array< Nblends > &list) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal64 opNblends_blend(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void
Definition: png.h:1083
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
long long int64
Definition: SYS_Types.h:116
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
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_Vector2I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
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
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setPrimIDAttr(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
bool operator==(const SOP_BlendShapes_2_0Parms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSelectionIdx(const SOP_NodeVerb::CookParms &cookparms) const
bool opDoPack(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator!=(const Nblends &src) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, int64 v)
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
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
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool opCacheDeltas(const SOP_NodeVerb::CookParms &cookparms) const
const UT_Array< Nblends > & getNblends() const
UT_StringHolder opPtIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
exint opNblends(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glew.h:1849
static void loadData(UT_IStream &is, UT_StringHolder &v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void saveData(std::ostream &os, UT_Vector2D v)
void setGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getPtIDAttr() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void setPtIDAttr(const UT_StringHolder &val)