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