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