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 <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_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  return true;
117  }
118  bool operator!=(const SOP_ShapeDiffParms &src) const
119  {
120  return !operator==(src);
121  }
124 
125 
126 
127  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
128  {
129  myDiffType = 1;
130  if (true)
131  graph->evalOpParm(myDiffType, nodeidx, "difftype", time, 0);
132  myOrientAttrib = ""_UTsh;
133  if (true && ( (true&&!(((int64(getDiffType())!=2)))) ) )
134  graph->evalOpParm(myOrientAttrib, nodeidx, "orientattrib", time, 0);
135  mySkelRootPath = ""_UTsh;
136  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
137  graph->evalOpParm(mySkelRootPath, nodeidx, "skelrootpath", time, 0);
138  myBoneTransformPath = ""_UTsh;
139  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
140  graph->evalOpParm(myBoneTransformPath, nodeidx, "bonetransformpath", time, 0);
141  mySkinType = 1;
142  if (true && ( (true&&!(((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
143  graph->evalOpParm(mySkinType, nodeidx, "skintype", time, 0);
144  myBlendAttrib = ""_UTsh;
145  if (true && ( (true&&!(((int64(getSkinType())!=2))||((int64(getDiffType())==1))||((int64(getDiffType())==2)))) ) )
146  graph->evalOpParm(myBlendAttrib, nodeidx, "blendattrib", time, 0);
147  myDoNormal = false;
148  if (true)
149  graph->evalOpParm(myDoNormal, nodeidx, "donormal", time, 0);
150  myDoVAttribs = true;
151  if (true)
152  graph->evalOpParm(myDoVAttribs, nodeidx, "dovattribs", time, 0);
153  myVAttribs = "P"_UTsh;
154  if (true && ( (true&&!(((getDoVAttribs()==0)))) ) )
155  graph->evalOpParm(myVAttribs, nodeidx, "vattribs", time, 0);
156  myDoQAttribs = false;
157  if (true)
158  graph->evalOpParm(myDoQAttribs, nodeidx, "doqattribs", time, 0);
159  myQAttribs = ""_UTsh;
160  if (true && ( (true&&!(((getDoQAttribs()==0)))) ) )
161  graph->evalOpParm(myQAttribs, nodeidx, "qattribs", time, 0);
162  myMaskAttrib = ""_UTsh;
163  if (true)
164  graph->evalOpParm(myMaskAttrib, nodeidx, "maskattrib", time, 0);
165  myScaleMask = 1;
166  if (true && ( (true&&!(((getMaskAttrib()=="''")))) ) )
167  graph->evalOpParm(myScaleMask, nodeidx, "scalemask", time, 0);
168 
169  }
170 
171 
172  void loadFromOpSubclass(const LoadParms &loadparms) override
173  {
174  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
175  }
176 
177 
178  void copyFrom(const OP_NodeParms *src) override
179  {
180  *this = *((const SOP_ShapeDiffParms *)src);
181  }
182 
183  template <typename T>
184  void
185  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
186  {
187  if (idx.size() < 1)
188  return;
189  UT_ASSERT(idx.size() == instance.size()+1);
190  if (idx.size() != instance.size()+1)
191  return;
192  switch (idx[0])
193  {
194  case 0:
195  coerceValue(value, myDiffType);
196  break;
197  case 1:
198  coerceValue(value, myOrientAttrib);
199  break;
200  case 2:
201  coerceValue(value, mySkelRootPath);
202  break;
203  case 3:
204  coerceValue(value, myBoneTransformPath);
205  break;
206  case 4:
207  coerceValue(value, mySkinType);
208  break;
209  case 5:
210  coerceValue(value, myBlendAttrib);
211  break;
212  case 6:
213  coerceValue(value, myDoNormal);
214  break;
215  case 7:
216  coerceValue(value, myDoVAttribs);
217  break;
218  case 8:
219  coerceValue(value, myVAttribs);
220  break;
221  case 9:
222  coerceValue(value, myDoQAttribs);
223  break;
224  case 10:
225  coerceValue(value, myQAttribs);
226  break;
227  case 11:
228  coerceValue(value, myMaskAttrib);
229  break;
230  case 12:
231  coerceValue(value, myScaleMask);
232  break;
233 
234  }
235  }
236 
237  bool isParmColorRamp(exint idx) const override
238  {
239  switch (idx)
240  {
241 
242  }
243  return false;
244  }
245 
246  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
267  { doGetParmValue(idx, instance, value); }
268 
269  template <typename T>
270  void
271  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
272  {
273  if (idx.size() < 1)
274  return;
275  UT_ASSERT(idx.size() == instance.size()+1);
276  if (idx.size() != instance.size()+1)
277  return;
278  switch (idx[0])
279  {
280  case 0:
281  coerceValue(myDiffType, clampMinValue(0, clampMaxValue(3, value ) ));
282  break;
283  case 1:
284  coerceValue(myOrientAttrib, ( ( value ) ));
285  break;
286  case 2:
287  coerceValue(mySkelRootPath, ( ( value ) ));
288  break;
289  case 3:
290  coerceValue(myBoneTransformPath, ( ( value ) ));
291  break;
292  case 4:
293  coerceValue(mySkinType, clampMinValue(0, clampMaxValue(3, value ) ));
294  break;
295  case 5:
296  coerceValue(myBlendAttrib, ( ( value ) ));
297  break;
298  case 6:
299  coerceValue(myDoNormal, ( ( value ) ));
300  break;
301  case 7:
302  coerceValue(myDoVAttribs, ( ( value ) ));
303  break;
304  case 8:
305  coerceValue(myVAttribs, ( ( value ) ));
306  break;
307  case 9:
308  coerceValue(myDoQAttribs, ( ( value ) ));
309  break;
310  case 10:
311  coerceValue(myQAttribs, ( ( value ) ));
312  break;
313  case 11:
314  coerceValue(myMaskAttrib, ( ( value ) ));
315  break;
316  case 12:
317  coerceValue(myScaleMask, ( ( value ) ));
318  break;
319 
320  }
321  }
322 
323  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
344  { doSetParmValue(idx, instance, value); }
345 
346  exint getNestNumParms(TempIndex idx) const override
347  {
348  if (idx.size() == 0)
349  return 13;
350  switch (idx[0])
351  {
352 
353  }
354  // Invalid
355  return 0;
356  }
357 
358  const char *getNestParmName(TempIndex fieldnum) const override
359  {
360  if (fieldnum.size() < 1)
361  return 0;
362  switch (fieldnum[0])
363  {
364  case 0:
365  return "difftype";
366  case 1:
367  return "orientattrib";
368  case 2:
369  return "skelrootpath";
370  case 3:
371  return "bonetransformpath";
372  case 4:
373  return "skintype";
374  case 5:
375  return "blendattrib";
376  case 6:
377  return "donormal";
378  case 7:
379  return "dovattribs";
380  case 8:
381  return "vattribs";
382  case 9:
383  return "doqattribs";
384  case 10:
385  return "qattribs";
386  case 11:
387  return "maskattrib";
388  case 12:
389  return "scalemask";
390 
391  }
392  return 0;
393  }
394 
395  ParmType getNestParmType(TempIndex fieldnum) const override
396  {
397  if (fieldnum.size() < 1)
398  return PARM_UNSUPPORTED;
399  switch (fieldnum[0])
400  {
401  case 0:
402  return PARM_INTEGER;
403  case 1:
404  return PARM_STRING;
405  case 2:
406  return PARM_STRING;
407  case 3:
408  return PARM_STRING;
409  case 4:
410  return PARM_INTEGER;
411  case 5:
412  return PARM_STRING;
413  case 6:
414  return PARM_INTEGER;
415  case 7:
416  return PARM_INTEGER;
417  case 8:
418  return PARM_STRING;
419  case 9:
420  return PARM_INTEGER;
421  case 10:
422  return PARM_STRING;
423  case 11:
424  return PARM_STRING;
425  case 12:
426  return PARM_FLOAT;
427 
428  }
429  return PARM_UNSUPPORTED;
430  }
431 
432  // Boiler plate to load individual types.
433  static void loadData(UT_IStream &is, int64 &v)
434  { is.bread(&v, 1); }
435  static void loadData(UT_IStream &is, bool &v)
436  { int64 iv; is.bread(&iv, 1); v = iv; }
437  static void loadData(UT_IStream &is, fpreal64 &v)
438  { is.bread<fpreal64>(&v, 1); }
439  static void loadData(UT_IStream &is, UT_Vector2D &v)
440  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
441  static void loadData(UT_IStream &is, UT_Vector3D &v)
442  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
443  is.bread<fpreal64>(&v.z(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector4D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
446  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
447  static void loadData(UT_IStream &is, UT_Matrix2D &v)
448  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
449  static void loadData(UT_IStream &is, UT_Matrix3D &v)
450  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
451  static void loadData(UT_IStream &is, UT_Matrix4D &v)
452  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
453  static void loadData(UT_IStream &is, UT_Vector2I &v)
454  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
455  static void loadData(UT_IStream &is, UT_Vector3I &v)
456  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
457  is.bread<int64>(&v.z(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector4I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
460  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
462  { is.bread(v); }
464  { UT_StringHolder rampdata;
465  loadData(is, rampdata);
466  if (rampdata.isstring())
467  {
468  v.reset(new UT_Ramp());
469  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
470  v->load(istr);
471  }
472  else v.reset();
473  }
476  loadData(is, data);
477  if (data.isstring())
478  {
479  // Find the data type.
480  const char *colon = UT_StringWrap(data).findChar(':');
481  if (colon)
482  {
483  int typelen = colon - data.buffer();
485  type.strncpy(data.buffer(), typelen);
486  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
487 
488  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
489  }
490  }
491  else v.reset();
492  }
493 
494  static void saveData(std::ostream &os, int64 v)
495  { UTwrite(os, &v); }
496  static void saveData(std::ostream &os, bool v)
497  { int64 iv = v; UTwrite(os, &iv); }
498  static void saveData(std::ostream &os, fpreal64 v)
499  { UTwrite<fpreal64>(os, &v); }
500  static void saveData(std::ostream &os, UT_Vector2D v)
501  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
502  static void saveData(std::ostream &os, UT_Vector3D v)
503  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
504  UTwrite<fpreal64>(os, &v.z()); }
505  static void saveData(std::ostream &os, UT_Vector4D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
507  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
508  static void saveData(std::ostream &os, UT_Matrix2D v)
510  static void saveData(std::ostream &os, UT_Matrix3D v)
512  static void saveData(std::ostream &os, UT_Matrix4D v)
514  static void saveData(std::ostream &os, UT_StringHolder s)
515  { UT_StringWrap(s).saveBinary(os); }
516  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
518  UT_OStringStream ostr;
519  if (s) s->save(ostr);
520  result = ostr.str();
521  saveData(os, result);
522  }
523  static void saveData(std::ostream &os, PRM_DataItemHandle s)
525  UT_OStringStream ostr;
526  if (s)
527  {
528  ostr << s->getDataTypeToken();
529  ostr << ":";
530  s->saveBinary(ostr);
531  }
532  result = ostr.str();
533  saveData(os, result);
534  }
535 
536 
537  void save(std::ostream &os) const
538  {
539  int32 v = version();
540  UTwrite(os, &v);
541  saveData(os, myDiffType);
542  saveData(os, myOrientAttrib);
543  saveData(os, mySkelRootPath);
544  saveData(os, myBoneTransformPath);
545  saveData(os, mySkinType);
546  saveData(os, myBlendAttrib);
547  saveData(os, myDoNormal);
548  saveData(os, myDoVAttribs);
549  saveData(os, myVAttribs);
550  saveData(os, myDoQAttribs);
551  saveData(os, myQAttribs);
552  saveData(os, myMaskAttrib);
553  saveData(os, myScaleMask);
554 
555  }
556 
557  bool load(UT_IStream &is)
558  {
559  int32 v;
560  is.bread(&v, 1);
561  if (version() != v)
562  {
563  // Fail incompatible versions
564  return false;
565  }
566  loadData(is, myDiffType);
567  loadData(is, myOrientAttrib);
568  loadData(is, mySkelRootPath);
569  loadData(is, myBoneTransformPath);
570  loadData(is, mySkinType);
571  loadData(is, myBlendAttrib);
572  loadData(is, myDoNormal);
573  loadData(is, myDoVAttribs);
574  loadData(is, myVAttribs);
575  loadData(is, myDoQAttribs);
576  loadData(is, myQAttribs);
577  loadData(is, myMaskAttrib);
578  loadData(is, myScaleMask);
579 
580  return true;
581  }
582 
583  DiffType getDiffType() const { return DiffType(myDiffType); }
584  void setDiffType(DiffType val) { myDiffType = int64(val); }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getDiffType();
589  int64 result;
590  OP_Utils::evalOpParm(result, thissop, "difftype", cookparms.getCookTime(), 0);
591  return DiffType(result);
592  }
593  const UT_StringHolder & getOrientAttrib() const { return myOrientAttrib; }
594  void setOrientAttrib(const UT_StringHolder & val) { myOrientAttrib = val; }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getOrientAttrib();
600  OP_Utils::evalOpParm(result, thissop, "orientattrib", cookparms.getCookTime(), 0);
601  return result;
602  }
603  const UT_StringHolder & getSkelRootPath() const { return mySkelRootPath; }
604  void setSkelRootPath(const UT_StringHolder & val) { mySkelRootPath = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getSkelRootPath();
610  OP_Utils::evalOpParm(result, thissop, "skelrootpath", cookparms.getCookTime(), 0);
611  return result;
612  }
613  const UT_StringHolder & getBoneTransformPath() const { return myBoneTransformPath; }
614  void setBoneTransformPath(const UT_StringHolder & val) { myBoneTransformPath = val; }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getBoneTransformPath();
620  OP_Utils::evalOpParm(result, thissop, "bonetransformpath", cookparms.getCookTime(), 0);
621  return result;
622  }
623  SkinType getSkinType() const { return SkinType(mySkinType); }
624  void setSkinType(SkinType val) { mySkinType = int64(val); }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getSkinType();
629  int64 result;
630  OP_Utils::evalOpParm(result, thissop, "skintype", cookparms.getCookTime(), 0);
631  return SkinType(result);
632  }
633  const UT_StringHolder & getBlendAttrib() const { return myBlendAttrib; }
634  void setBlendAttrib(const UT_StringHolder & val) { myBlendAttrib = val; }
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getBlendAttrib();
640  OP_Utils::evalOpParm(result, thissop, "blendattrib", cookparms.getCookTime(), 0);
641  return result;
642  }
643  bool getDoNormal() const { return myDoNormal; }
644  void setDoNormal(bool val) { myDoNormal = val; }
645  bool opDoNormal(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getDoNormal();
649  bool result;
650  OP_Utils::evalOpParm(result, thissop, "donormal", cookparms.getCookTime(), 0);
651  return result;
652  }
653  bool getDoVAttribs() const { return myDoVAttribs; }
654  void setDoVAttribs(bool val) { myDoVAttribs = val; }
655  bool opDoVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getDoVAttribs();
659  bool result;
660  OP_Utils::evalOpParm(result, thissop, "dovattribs", cookparms.getCookTime(), 0);
661  return result;
662  }
663  const UT_StringHolder & getVAttribs() const { return myVAttribs; }
664  void setVAttribs(const UT_StringHolder & val) { myVAttribs = val; }
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getVAttribs();
670  OP_Utils::evalOpParm(result, thissop, "vattribs", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getDoQAttribs() const { return myDoQAttribs; }
674  void setDoQAttribs(bool val) { myDoQAttribs = val; }
675  bool opDoQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getDoQAttribs();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "doqattribs", cookparms.getCookTime(), 0);
681  return result;
682  }
683  const UT_StringHolder & getQAttribs() const { return myQAttribs; }
684  void setQAttribs(const UT_StringHolder & val) { myQAttribs = val; }
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getQAttribs();
690  OP_Utils::evalOpParm(result, thissop, "qattribs", cookparms.getCookTime(), 0);
691  return result;
692  }
693  const UT_StringHolder & getMaskAttrib() const { return myMaskAttrib; }
694  void setMaskAttrib(const UT_StringHolder & val) { myMaskAttrib = val; }
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getMaskAttrib();
700  OP_Utils::evalOpParm(result, thissop, "maskattrib", cookparms.getCookTime(), 0);
701  return result;
702  }
703  fpreal64 getScaleMask() const { return myScaleMask; }
704  void setScaleMask(fpreal64 val) { myScaleMask = val; }
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getScaleMask();
710  OP_Utils::evalOpParm(result, thissop, "scalemask", cookparms.getCookTime(), 0);
711  return result;
712  }
713 
714 private:
715  int64 myDiffType;
716  UT_StringHolder myOrientAttrib;
717  UT_StringHolder mySkelRootPath;
718  UT_StringHolder myBoneTransformPath;
719  int64 mySkinType;
720  UT_StringHolder myBlendAttrib;
721  bool myDoNormal;
722  bool myDoVAttribs;
723  UT_StringHolder myVAttribs;
724  bool myDoQAttribs;
725  UT_StringHolder myQAttribs;
726  UT_StringHolder myMaskAttrib;
727  fpreal64 myScaleMask;
728 
729 };
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:62
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:613
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
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:296
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:277
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:92
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
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:361
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:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
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
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setDoVAttribs(bool val)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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