HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_ShapeDiff.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_ShapeDiffEnums
24 {
25  enum class DiffType
26  {
27  PREDEFORM = 0,
28  POSTDEFORM,
31  };
32 
34  getToken(DiffType enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case DiffType::PREDEFORM: return "predeform"_sh;
39  case DiffType::POSTDEFORM: return "postdeform"_sh;
40  case DiffType::POSTDEFORM_ORIENT: return "postdeform_orient"_sh;
41  case DiffType::FROMINPUTGEO: return "frominputgeo"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class SkinType
47  {
48  LINEAR = 0,
49  DUALQUAT,
52  };
53 
55  getToken(SkinType enum_value)
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case SkinType::LINEAR: return "linear"_sh;
60  case SkinType::DUALQUAT: return "dualquat"_sh;
61  case SkinType::BLENDDUALQUAT: return "blenddualquat"_sh;
62  case SkinType::FROMINPUTGEO: return "frominputgeo"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67 }
68 
69 
71 {
72 public:
73  static int version() { return 1; }
74 
76  {
77  myDiffType = 1;
78  myOrientAttrib = ""_UTsh;
79  mySkelRootPath = ""_UTsh;
80  myBoneTransformPath = ""_UTsh;
81  mySkinType = 1;
82  myBlendAttrib = ""_UTsh;
83  myDoNormal = false;
84  myDoVAttribs = true;
85  myVAttribs = "P"_UTsh;
86  myDoQAttribs = false;
87  myQAttribs = ""_UTsh;
88  myMaskAttrib = ""_UTsh;
89  myScaleMask = 1;
90 
91  }
92 
93  explicit SOP_ShapeDiffParms(const SOP_ShapeDiffParms &) = default;
95  SOP_ShapeDiffParms(SOP_ShapeDiffParms &&) noexcept = default;
96  SOP_ShapeDiffParms &operator=(SOP_ShapeDiffParms &&) noexcept = default;
97 
98  ~SOP_ShapeDiffParms() override {}
99 
100  bool operator==(const SOP_ShapeDiffParms &src) const
101  {
102  if (myDiffType != src.myDiffType) return false;
103  if (myOrientAttrib != src.myOrientAttrib) return false;
104  if (mySkelRootPath != src.mySkelRootPath) return false;
105  if (myBoneTransformPath != src.myBoneTransformPath) return false;
106  if (mySkinType != src.mySkinType) return false;
107  if (myBlendAttrib != src.myBlendAttrib) return false;
108  if (myDoNormal != src.myDoNormal) return false;
109  if (myDoVAttribs != src.myDoVAttribs) return false;
110  if (myVAttribs != src.myVAttribs) return false;
111  if (myDoQAttribs != src.myDoQAttribs) return false;
112  if (myQAttribs != src.myQAttribs) return false;
113  if (myMaskAttrib != src.myMaskAttrib) return false;
114  if (myScaleMask != src.myScaleMask) return false;
115 
116 
117  if (baseGetSignature() != src.baseGetSignature()) return false;
118 
119  return true;
120  }
121  bool operator!=(const SOP_ShapeDiffParms &src) const
122  {
123  return !operator==(src);
124  }
127 
128 
129 
130  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
131  {
132  myDiffType = 1;
133  if (true)
134  graph->evalOpParm(myDiffType, nodeidx, "difftype", time, graph->isDirect()?nullptr:depnode);
135  myOrientAttrib = ""_UTsh;
136  if (true && ( (true&&!(((int64(getDiffType())!=2)))) ) )
137  graph->evalOpParm(myOrientAttrib, nodeidx, "orientattrib", time, graph->isDirect()?nullptr:depnode);
138  mySkelRootPath = ""_UTsh;
139  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
140  graph->evalOpParm(mySkelRootPath, nodeidx, "skelrootpath", time, graph->isDirect()?nullptr:depnode);
141  myBoneTransformPath = ""_UTsh;
142  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
143  graph->evalOpParm(myBoneTransformPath, nodeidx, "bonetransformpath", time, graph->isDirect()?nullptr:depnode);
144  mySkinType = 1;
145  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
146  graph->evalOpParm(mySkinType, nodeidx, "skintype", time, graph->isDirect()?nullptr:depnode);
147  myBlendAttrib = ""_UTsh;
148  if (true && ( (true&&!(((int64(getSkinType())!=2))||((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
149  graph->evalOpParm(myBlendAttrib, nodeidx, "blendattrib", time, graph->isDirect()?nullptr:depnode);
150  myDoNormal = false;
151  if (true)
152  graph->evalOpParm(myDoNormal, nodeidx, "donormal", time, graph->isDirect()?nullptr:depnode);
153  myDoVAttribs = true;
154  if (true)
155  graph->evalOpParm(myDoVAttribs, nodeidx, "dovattribs", time, graph->isDirect()?nullptr:depnode);
156  myVAttribs = "P"_UTsh;
157  if (true && ( (true&&!(((getDoVAttribs()==0)))) ) )
158  graph->evalOpParm(myVAttribs, nodeidx, "vattribs", time, graph->isDirect()?nullptr:depnode);
159  myDoQAttribs = false;
160  if (true)
161  graph->evalOpParm(myDoQAttribs, nodeidx, "doqattribs", time, graph->isDirect()?nullptr:depnode);
162  myQAttribs = ""_UTsh;
163  if (true && ( (true&&!(((getDoQAttribs()==0)))) ) )
164  graph->evalOpParm(myQAttribs, nodeidx, "qattribs", time, graph->isDirect()?nullptr:depnode);
165  myMaskAttrib = ""_UTsh;
166  if (true)
167  graph->evalOpParm(myMaskAttrib, nodeidx, "maskattrib", time, graph->isDirect()?nullptr:depnode);
168  myScaleMask = 1;
169  if (true && ( (true&&!(((getMaskAttrib()=="''")))) ) )
170  graph->evalOpParm(myScaleMask, nodeidx, "scalemask", time, graph->isDirect()?nullptr:depnode);
171 
172  }
173 
174 
175  void loadFromOpSubclass(const LoadParms &loadparms) override
176  {
177  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
178  }
179 
180 
181  void copyFrom(const OP_NodeParms *src) override
182  {
183  *this = *((const SOP_ShapeDiffParms *)src);
184  }
185 
186  template <typename T>
187  void
188  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
189  {
190  if (idx.size() < 1)
191  return;
192  UT_ASSERT(idx.size() == instance.size()+1);
193  if (idx.size() != instance.size()+1)
194  return;
195  switch (idx[0])
196  {
197  case 0:
198  coerceValue(value, myDiffType);
199  break;
200  case 1:
201  coerceValue(value, myOrientAttrib);
202  break;
203  case 2:
204  coerceValue(value, mySkelRootPath);
205  break;
206  case 3:
207  coerceValue(value, myBoneTransformPath);
208  break;
209  case 4:
210  coerceValue(value, mySkinType);
211  break;
212  case 5:
213  coerceValue(value, myBlendAttrib);
214  break;
215  case 6:
216  coerceValue(value, myDoNormal);
217  break;
218  case 7:
219  coerceValue(value, myDoVAttribs);
220  break;
221  case 8:
222  coerceValue(value, myVAttribs);
223  break;
224  case 9:
225  coerceValue(value, myDoQAttribs);
226  break;
227  case 10:
228  coerceValue(value, myQAttribs);
229  break;
230  case 11:
231  coerceValue(value, myMaskAttrib);
232  break;
233  case 12:
234  coerceValue(value, myScaleMask);
235  break;
236 
237  }
238  }
239 
240  bool isParmColorRamp(exint idx) const override
241  {
242  switch (idx)
243  {
244 
245  }
246  return false;
247  }
248 
249  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
270  { doGetParmValue(idx, instance, value); }
271 
272  template <typename T>
273  void
274  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
275  {
276  if (idx.size() < 1)
277  return;
278  UT_ASSERT(idx.size() == instance.size()+1);
279  if (idx.size() != instance.size()+1)
280  return;
281  switch (idx[0])
282  {
283  case 0:
284  coerceValue(myDiffType, clampMinValue(0, clampMaxValue(3, value ) ));
285  break;
286  case 1:
287  coerceValue(myOrientAttrib, ( ( value ) ));
288  break;
289  case 2:
290  coerceValue(mySkelRootPath, ( ( value ) ));
291  break;
292  case 3:
293  coerceValue(myBoneTransformPath, ( ( value ) ));
294  break;
295  case 4:
296  coerceValue(mySkinType, clampMinValue(0, clampMaxValue(3, value ) ));
297  break;
298  case 5:
299  coerceValue(myBlendAttrib, ( ( value ) ));
300  break;
301  case 6:
302  coerceValue(myDoNormal, ( ( value ) ));
303  break;
304  case 7:
305  coerceValue(myDoVAttribs, ( ( value ) ));
306  break;
307  case 8:
308  coerceValue(myVAttribs, ( ( value ) ));
309  break;
310  case 9:
311  coerceValue(myDoQAttribs, ( ( value ) ));
312  break;
313  case 10:
314  coerceValue(myQAttribs, ( ( value ) ));
315  break;
316  case 11:
317  coerceValue(myMaskAttrib, ( ( value ) ));
318  break;
319  case 12:
320  coerceValue(myScaleMask, ( ( value ) ));
321  break;
322 
323  }
324  }
325 
326  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
347  { doSetParmValue(idx, instance, value); }
348 
349  exint getNestNumParms(TempIndex idx) const override
350  {
351  if (idx.size() == 0)
352  return 13;
353  switch (idx[0])
354  {
355 
356  }
357  // Invalid
358  return 0;
359  }
360 
361  const char *getNestParmName(TempIndex fieldnum) const override
362  {
363  if (fieldnum.size() < 1)
364  return 0;
365  switch (fieldnum[0])
366  {
367  case 0:
368  return "difftype";
369  case 1:
370  return "orientattrib";
371  case 2:
372  return "skelrootpath";
373  case 3:
374  return "bonetransformpath";
375  case 4:
376  return "skintype";
377  case 5:
378  return "blendattrib";
379  case 6:
380  return "donormal";
381  case 7:
382  return "dovattribs";
383  case 8:
384  return "vattribs";
385  case 9:
386  return "doqattribs";
387  case 10:
388  return "qattribs";
389  case 11:
390  return "maskattrib";
391  case 12:
392  return "scalemask";
393 
394  }
395  return 0;
396  }
397 
398  ParmType getNestParmType(TempIndex fieldnum) const override
399  {
400  if (fieldnum.size() < 1)
401  return PARM_UNSUPPORTED;
402  switch (fieldnum[0])
403  {
404  case 0:
405  return PARM_INTEGER;
406  case 1:
407  return PARM_STRING;
408  case 2:
409  return PARM_STRING;
410  case 3:
411  return PARM_STRING;
412  case 4:
413  return PARM_INTEGER;
414  case 5:
415  return PARM_STRING;
416  case 6:
417  return PARM_INTEGER;
418  case 7:
419  return PARM_INTEGER;
420  case 8:
421  return PARM_STRING;
422  case 9:
423  return PARM_INTEGER;
424  case 10:
425  return PARM_STRING;
426  case 11:
427  return PARM_STRING;
428  case 12:
429  return PARM_FLOAT;
430 
431  }
432  return PARM_UNSUPPORTED;
433  }
434 
435  // Boiler plate to load individual types.
436  static void loadData(UT_IStream &is, int64 &v)
437  { is.bread(&v, 1); }
438  static void loadData(UT_IStream &is, bool &v)
439  { int64 iv; is.bread(&iv, 1); v = iv; }
440  static void loadData(UT_IStream &is, fpreal64 &v)
441  { is.bread<fpreal64>(&v, 1); }
442  static void loadData(UT_IStream &is, UT_Vector2D &v)
443  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector3D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
446  is.bread<fpreal64>(&v.z(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector4D &v)
448  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
449  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
450  static void loadData(UT_IStream &is, UT_Matrix2D &v)
451  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
452  static void loadData(UT_IStream &is, UT_Matrix3D &v)
453  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
454  static void loadData(UT_IStream &is, UT_Matrix4D &v)
455  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
456  static void loadData(UT_IStream &is, UT_Vector2I &v)
457  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector3I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
460  is.bread<int64>(&v.z(), 1); }
461  static void loadData(UT_IStream &is, UT_Vector4I &v)
462  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
463  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
465  { is.bread(v); }
467  { UT_StringHolder rampdata;
468  loadData(is, rampdata);
469  if (rampdata.isstring())
470  {
471  v.reset(new UT_Ramp());
472  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
473  v->load(istr);
474  }
475  else v.reset();
476  }
479  loadData(is, data);
480  if (data.isstring())
481  {
482  // Find the data type.
483  const char *colon = UT_StringWrap(data).findChar(':');
484  if (colon)
485  {
486  int typelen = colon - data.buffer();
488  type.strncpy(data.buffer(), typelen);
489  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
490 
491  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
492  }
493  }
494  else v.reset();
495  }
496 
497  static void saveData(std::ostream &os, int64 v)
498  { UTwrite(os, &v); }
499  static void saveData(std::ostream &os, bool v)
500  { int64 iv = v; UTwrite(os, &iv); }
501  static void saveData(std::ostream &os, fpreal64 v)
502  { UTwrite<fpreal64>(os, &v); }
503  static void saveData(std::ostream &os, UT_Vector2D v)
504  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
505  static void saveData(std::ostream &os, UT_Vector3D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
507  UTwrite<fpreal64>(os, &v.z()); }
508  static void saveData(std::ostream &os, UT_Vector4D v)
509  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
510  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
511  static void saveData(std::ostream &os, UT_Matrix2D v)
513  static void saveData(std::ostream &os, UT_Matrix3D v)
515  static void saveData(std::ostream &os, UT_Matrix4D v)
517  static void saveData(std::ostream &os, UT_StringHolder s)
518  { UT_StringWrap(s).saveBinary(os); }
519  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
521  UT_OStringStream ostr;
522  if (s) s->save(ostr);
523  result = ostr.str();
524  saveData(os, result);
525  }
526  static void saveData(std::ostream &os, PRM_DataItemHandle s)
528  UT_OStringStream ostr;
529  if (s)
530  {
531  ostr << s->getDataTypeToken();
532  ostr << ":";
533  s->saveBinary(ostr);
534  }
535  result = ostr.str();
536  saveData(os, result);
537  }
538 
539 
540  void save(std::ostream &os) const
541  {
542  int32 v = version();
543  UTwrite(os, &v);
544  saveData(os, myDiffType);
545  saveData(os, myOrientAttrib);
546  saveData(os, mySkelRootPath);
547  saveData(os, myBoneTransformPath);
548  saveData(os, mySkinType);
549  saveData(os, myBlendAttrib);
550  saveData(os, myDoNormal);
551  saveData(os, myDoVAttribs);
552  saveData(os, myVAttribs);
553  saveData(os, myDoQAttribs);
554  saveData(os, myQAttribs);
555  saveData(os, myMaskAttrib);
556  saveData(os, myScaleMask);
557 
558  }
559 
560  bool load(UT_IStream &is)
561  {
562  int32 v;
563  is.bread(&v, 1);
564  if (version() != v)
565  {
566  // Fail incompatible versions
567  return false;
568  }
569  loadData(is, myDiffType);
570  loadData(is, myOrientAttrib);
571  loadData(is, mySkelRootPath);
572  loadData(is, myBoneTransformPath);
573  loadData(is, mySkinType);
574  loadData(is, myBlendAttrib);
575  loadData(is, myDoNormal);
576  loadData(is, myDoVAttribs);
577  loadData(is, myVAttribs);
578  loadData(is, myDoQAttribs);
579  loadData(is, myQAttribs);
580  loadData(is, myMaskAttrib);
581  loadData(is, myScaleMask);
582 
583  return true;
584  }
585 
586  DiffType getDiffType() const { return DiffType(myDiffType); }
587  void setDiffType(DiffType val) { myDiffType = int64(val); }
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getDiffType();
592  int64 result;
593  OP_Utils::evalOpParm(result, thissop, "difftype", cookparms.getCookTime(), 0);
594  return DiffType(result);
595  }
596  const UT_StringHolder & getOrientAttrib() const { return myOrientAttrib; }
597  void setOrientAttrib(const UT_StringHolder & val) { myOrientAttrib = val; }
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getOrientAttrib();
603  OP_Utils::evalOpParm(result, thissop, "orientattrib", cookparms.getCookTime(), 0);
604  return result;
605  }
606  const UT_StringHolder & getSkelRootPath() const { return mySkelRootPath; }
607  void setSkelRootPath(const UT_StringHolder & val) { mySkelRootPath = val; }
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getSkelRootPath();
613  OP_Utils::evalOpParm(result, thissop, "skelrootpath", cookparms.getCookTime(), 0);
614  return result;
615  }
616  const UT_StringHolder & getBoneTransformPath() const { return myBoneTransformPath; }
617  void setBoneTransformPath(const UT_StringHolder & val) { myBoneTransformPath = val; }
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getBoneTransformPath();
623  OP_Utils::evalOpParm(result, thissop, "bonetransformpath", cookparms.getCookTime(), 0);
624  return result;
625  }
626  SkinType getSkinType() const { return SkinType(mySkinType); }
627  void setSkinType(SkinType val) { mySkinType = int64(val); }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getSkinType();
632  int64 result;
633  OP_Utils::evalOpParm(result, thissop, "skintype", cookparms.getCookTime(), 0);
634  return SkinType(result);
635  }
636  const UT_StringHolder & getBlendAttrib() const { return myBlendAttrib; }
637  void setBlendAttrib(const UT_StringHolder & val) { myBlendAttrib = val; }
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getBlendAttrib();
643  OP_Utils::evalOpParm(result, thissop, "blendattrib", cookparms.getCookTime(), 0);
644  return result;
645  }
646  bool getDoNormal() const { return myDoNormal; }
647  void setDoNormal(bool val) { myDoNormal = val; }
648  bool opDoNormal(const SOP_NodeVerb::CookParms &cookparms) const
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getDoNormal();
652  bool result;
653  OP_Utils::evalOpParm(result, thissop, "donormal", cookparms.getCookTime(), 0);
654  return result;
655  }
656  bool getDoVAttribs() const { return myDoVAttribs; }
657  void setDoVAttribs(bool val) { myDoVAttribs = val; }
658  bool opDoVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getDoVAttribs();
662  bool result;
663  OP_Utils::evalOpParm(result, thissop, "dovattribs", cookparms.getCookTime(), 0);
664  return result;
665  }
666  const UT_StringHolder & getVAttribs() const { return myVAttribs; }
667  void setVAttribs(const UT_StringHolder & val) { myVAttribs = val; }
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getVAttribs();
673  OP_Utils::evalOpParm(result, thissop, "vattribs", cookparms.getCookTime(), 0);
674  return result;
675  }
676  bool getDoQAttribs() const { return myDoQAttribs; }
677  void setDoQAttribs(bool val) { myDoQAttribs = val; }
678  bool opDoQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getDoQAttribs();
682  bool result;
683  OP_Utils::evalOpParm(result, thissop, "doqattribs", cookparms.getCookTime(), 0);
684  return result;
685  }
686  const UT_StringHolder & getQAttribs() const { return myQAttribs; }
687  void setQAttribs(const UT_StringHolder & val) { myQAttribs = val; }
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getQAttribs();
693  OP_Utils::evalOpParm(result, thissop, "qattribs", cookparms.getCookTime(), 0);
694  return result;
695  }
696  const UT_StringHolder & getMaskAttrib() const { return myMaskAttrib; }
697  void setMaskAttrib(const UT_StringHolder & val) { myMaskAttrib = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getMaskAttrib();
703  OP_Utils::evalOpParm(result, thissop, "maskattrib", cookparms.getCookTime(), 0);
704  return result;
705  }
706  fpreal64 getScaleMask() const { return myScaleMask; }
707  void setScaleMask(fpreal64 val) { myScaleMask = val; }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getScaleMask();
713  OP_Utils::evalOpParm(result, thissop, "scalemask", cookparms.getCookTime(), 0);
714  return result;
715  }
716 
717 private:
718  int64 myDiffType;
719  UT_StringHolder myOrientAttrib;
720  UT_StringHolder mySkelRootPath;
721  UT_StringHolder myBoneTransformPath;
722  int64 mySkinType;
723  UT_StringHolder myBlendAttrib;
724  bool myDoNormal;
725  bool myDoVAttribs;
726  UT_StringHolder myVAttribs;
727  bool myDoQAttribs;
728  UT_StringHolder myQAttribs;
729  UT_StringHolder myMaskAttrib;
730  fpreal64 myScaleMask;
731 
732 };
type
Definition: core.h:556
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(DiffType enum_value)
void setScaleMask(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, fpreal64 v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setBoneTransformPath(const UT_StringHolder &val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool getDoVAttribs() const
static void loadData(UT_IStream &is, bool &v)
void setQAttribs(const UT_StringHolder &val)
const UT_StringHolder & getBlendAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setOrientAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getVAttribs() const
const UT_StringHolder & getBoneTransformPath() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void saveData(std::ostream &os, UT_Vector4D 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
UT_StringHolder opVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setSkelRootPath(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 opScaleMask(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSkelRootPath(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Matrix4D v)
void setBlendAttrib(const UT_StringHolder &val)
SkinType getSkinType() 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, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opDoQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator!=(const SOP_ShapeDiffParms &src) const
GLdouble s
Definition: glad.h:3009
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setDiffType(DiffType val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void setMaskAttrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
**But if you need a result
Definition: thread.h:622
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_StringHolder opBoneTransformPath(const SOP_NodeVerb::CookParms &cookparms) const
DiffType opDiffType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const SOP_ShapeDiffParms &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void saveData(std::ostream &os, int64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSkelRootPath() const
const UT_StringHolder & getMaskAttrib() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder opOrientAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setDoQAttribs(bool val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setDoNormal(bool val)
const UT_StringHolder & getOrientAttrib() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
long long int64
Definition: SYS_Types.h:116
void setVAttribs(const UT_StringHolder &val)
UT_StringHolder opMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 getScaleMask() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getDoQAttribs() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector2I &v)
const UT_StringHolder & getQAttribs() const
bool opDoVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opBlendAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setSkinType(SkinType val)
bool load(UT_IStream &is)
fpreal64 fpreal
Definition: SYS_Types.h:278
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
DiffType getDiffType() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
bool opDoNormal(const SOP_NodeVerb::CookParms &cookparms) const
SkinType opSkinType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setDoVAttribs(bool val)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663