HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_TransformAxis.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_TransformAxisEnums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::GUESS: return "guess"_sh;
40  case Grouptype::BREAKPOINTS: return "breakpoints"_sh;
41  case Grouptype::EDGES: return "edges"_sh;
42  case Grouptype::POINTS: return "points"_sh;
43  case Grouptype::PRIMS: return "prims"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Outputmerge
49  {
50  REPLACE = 0,
51  PRE,
52  POST
53  };
54 
56  getToken(Outputmerge enum_value)
57  {
58  using namespace UT::Literal;
59  switch (enum_value) {
60  case Outputmerge::REPLACE: return "replace"_sh;
61  case Outputmerge::PRE: return "pre"_sh;
62  case Outputmerge::POST: return "post"_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  myGroup = ""_UTsh;
78  myGrouptype = 0;
79  myOrig = UT_Vector3D(0,0,0);
80  myDir = UT_Vector3D(0,1,0);
81  myTrans = 0;
82  myRot = 0;
83  myScale = 1;
84  myUpdatenmls = false;
85  myUpdateaffectednmls = true;
86  myVlength = true;
87  myInvertxform = false;
88  myAddattrib = false;
89  myOutputattrib = "xform"_UTsh;
90  myOutputmerge = 2;
91 
92  }
93 
94  explicit SOP_TransformAxisParms(const SOP_TransformAxisParms &) = default;
96  SOP_TransformAxisParms(SOP_TransformAxisParms &&) noexcept = default;
97  SOP_TransformAxisParms &operator=(SOP_TransformAxisParms &&) noexcept = default;
98 
99  ~SOP_TransformAxisParms() override {}
100 
102  {
103  if (myGroup != src.myGroup) return false;
104  if (myGrouptype != src.myGrouptype) return false;
105  if (myOrig != src.myOrig) return false;
106  if (myDir != src.myDir) return false;
107  if (myTrans != src.myTrans) return false;
108  if (myRot != src.myRot) return false;
109  if (myScale != src.myScale) return false;
110  if (myUpdatenmls != src.myUpdatenmls) return false;
111  if (myUpdateaffectednmls != src.myUpdateaffectednmls) return false;
112  if (myVlength != src.myVlength) return false;
113  if (myInvertxform != src.myInvertxform) return false;
114  if (myAddattrib != src.myAddattrib) return false;
115  if (myOutputattrib != src.myOutputattrib) return false;
116  if (myOutputmerge != src.myOutputmerge) return false;
117 
118 
119  if (baseGetSignature() != src.baseGetSignature()) return false;
120 
121  return true;
122  }
124  {
125  return !operator==(src);
126  }
129 
130 
131 
132  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
133  {
134  myGroup = ""_UTsh;
135  if (true)
136  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
137  myGrouptype = 0;
138  if (true)
139  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, graph->isDirect()?nullptr:depnode);
140  myOrig = UT_Vector3D(0,0,0);
141  if (true)
142  graph->evalOpParm(myOrig, nodeidx, "orig", time, graph->isDirect()?nullptr:depnode);
143  myDir = UT_Vector3D(0,1,0);
144  if (true)
145  graph->evalOpParm(myDir, nodeidx, "dir", time, graph->isDirect()?nullptr:depnode);
146  myTrans = 0;
147  if (true)
148  graph->evalOpParm(myTrans, nodeidx, "trans", time, graph->isDirect()?nullptr:depnode);
149  myRot = 0;
150  if (true)
151  graph->evalOpParm(myRot, nodeidx, "rot", time, graph->isDirect()?nullptr:depnode);
152  myScale = 1;
153  if (true)
154  graph->evalOpParm(myScale, nodeidx, "scale", time, graph->isDirect()?nullptr:depnode);
155  myUpdatenmls = false;
156  if (true)
157  graph->evalOpParm(myUpdatenmls, nodeidx, "updatenmls", time, graph->isDirect()?nullptr:depnode);
158  myUpdateaffectednmls = true;
159  if (true && ( (true&&!(((getUpdatenmls()==1)))) ) )
160  graph->evalOpParm(myUpdateaffectednmls, nodeidx, "updateaffectednmls", time, graph->isDirect()?nullptr:depnode);
161  myVlength = true;
162  if (true && ( (true&&!(((getUpdatenmls()==1)))) ) )
163  graph->evalOpParm(myVlength, nodeidx, "vlength", time, graph->isDirect()?nullptr:depnode);
164  myInvertxform = false;
165  if (true)
166  graph->evalOpParm(myInvertxform, nodeidx, "invertxform", time, graph->isDirect()?nullptr:depnode);
167  myAddattrib = false;
168  if (true)
169  graph->evalOpParm(myAddattrib, nodeidx, "addattrib", time, graph->isDirect()?nullptr:depnode);
170  myOutputattrib = "xform"_UTsh;
171  if (true && ( (true&&!(((getAddattrib()==0)))) ) )
172  graph->evalOpParm(myOutputattrib, nodeidx, "outputattrib", time, graph->isDirect()?nullptr:depnode);
173  myOutputmerge = 2;
174  if (true && ( (true&&!(((getAddattrib()==0)))) ) )
175  graph->evalOpParm(myOutputmerge, nodeidx, "outputmerge", time, graph->isDirect()?nullptr:depnode);
176 
177  }
178 
179 
180  void loadFromOpSubclass(const LoadParms &loadparms) override
181  {
182  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
183  }
184 
185 
186  void copyFrom(const OP_NodeParms *src) override
187  {
188  *this = *((const SOP_TransformAxisParms *)src);
189  }
190 
191  template <typename T>
192  void
193  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
194  {
195  if (idx.size() < 1)
196  return;
197  UT_ASSERT(idx.size() == instance.size()+1);
198  if (idx.size() != instance.size()+1)
199  return;
200  switch (idx[0])
201  {
202  case 0:
203  coerceValue(value, myGroup);
204  break;
205  case 1:
206  coerceValue(value, myGrouptype);
207  break;
208  case 2:
209  coerceValue(value, myOrig);
210  break;
211  case 3:
212  coerceValue(value, myDir);
213  break;
214  case 4:
215  coerceValue(value, myTrans);
216  break;
217  case 5:
218  coerceValue(value, myRot);
219  break;
220  case 6:
221  coerceValue(value, myScale);
222  break;
223  case 7:
224  coerceValue(value, myUpdatenmls);
225  break;
226  case 8:
227  coerceValue(value, myUpdateaffectednmls);
228  break;
229  case 9:
230  coerceValue(value, myVlength);
231  break;
232  case 10:
233  coerceValue(value, myInvertxform);
234  break;
235  case 11:
236  coerceValue(value, myAddattrib);
237  break;
238  case 12:
239  coerceValue(value, myOutputattrib);
240  break;
241  case 13:
242  coerceValue(value, myOutputmerge);
243  break;
244 
245  }
246  }
247 
248  bool isParmColorRamp(exint idx) const override
249  {
250  switch (idx)
251  {
252 
253  }
254  return false;
255  }
256 
257  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
270  { doGetParmValue(idx, instance, value); }
271  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
278  { doGetParmValue(idx, instance, value); }
279 
280  template <typename T>
281  void
282  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
283  {
284  if (idx.size() < 1)
285  return;
286  UT_ASSERT(idx.size() == instance.size()+1);
287  if (idx.size() != instance.size()+1)
288  return;
289  switch (idx[0])
290  {
291  case 0:
292  coerceValue(myGroup, ( ( value ) ));
293  break;
294  case 1:
295  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
296  break;
297  case 2:
298  coerceValue(myOrig, ( ( value ) ));
299  break;
300  case 3:
301  coerceValue(myDir, ( ( value ) ));
302  break;
303  case 4:
304  coerceValue(myTrans, ( ( value ) ));
305  break;
306  case 5:
307  coerceValue(myRot, ( ( value ) ));
308  break;
309  case 6:
310  coerceValue(myScale, ( ( value ) ));
311  break;
312  case 7:
313  coerceValue(myUpdatenmls, ( ( value ) ));
314  break;
315  case 8:
316  coerceValue(myUpdateaffectednmls, ( ( value ) ));
317  break;
318  case 9:
319  coerceValue(myVlength, ( ( value ) ));
320  break;
321  case 10:
322  coerceValue(myInvertxform, ( ( value ) ));
323  break;
324  case 11:
325  coerceValue(myAddattrib, ( ( value ) ));
326  break;
327  case 12:
328  coerceValue(myOutputattrib, ( ( value ) ));
329  break;
330  case 13:
331  coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
332  break;
333 
334  }
335  }
336 
337  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
348  { doSetParmValue(idx, instance, value); }
349  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
350  { doSetParmValue(idx, instance, value); }
351  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
352  { doSetParmValue(idx, instance, value); }
353  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
354  { doSetParmValue(idx, instance, value); }
355  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
356  { doSetParmValue(idx, instance, value); }
357  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
358  { doSetParmValue(idx, instance, value); }
359 
360  exint getNestNumParms(TempIndex idx) const override
361  {
362  if (idx.size() == 0)
363  return 14;
364  switch (idx[0])
365  {
366 
367  }
368  // Invalid
369  return 0;
370  }
371 
372  const char *getNestParmName(TempIndex fieldnum) const override
373  {
374  if (fieldnum.size() < 1)
375  return 0;
376  switch (fieldnum[0])
377  {
378  case 0:
379  return "group";
380  case 1:
381  return "grouptype";
382  case 2:
383  return "orig";
384  case 3:
385  return "dir";
386  case 4:
387  return "trans";
388  case 5:
389  return "rot";
390  case 6:
391  return "scale";
392  case 7:
393  return "updatenmls";
394  case 8:
395  return "updateaffectednmls";
396  case 9:
397  return "vlength";
398  case 10:
399  return "invertxform";
400  case 11:
401  return "addattrib";
402  case 12:
403  return "outputattrib";
404  case 13:
405  return "outputmerge";
406 
407  }
408  return 0;
409  }
410 
411  ParmType getNestParmType(TempIndex fieldnum) const override
412  {
413  if (fieldnum.size() < 1)
414  return PARM_UNSUPPORTED;
415  switch (fieldnum[0])
416  {
417  case 0:
418  return PARM_STRING;
419  case 1:
420  return PARM_INTEGER;
421  case 2:
422  return PARM_VECTOR3;
423  case 3:
424  return PARM_VECTOR3;
425  case 4:
426  return PARM_FLOAT;
427  case 5:
428  return PARM_FLOAT;
429  case 6:
430  return PARM_FLOAT;
431  case 7:
432  return PARM_INTEGER;
433  case 8:
434  return PARM_INTEGER;
435  case 9:
436  return PARM_INTEGER;
437  case 10:
438  return PARM_INTEGER;
439  case 11:
440  return PARM_INTEGER;
441  case 12:
442  return PARM_STRING;
443  case 13:
444  return PARM_INTEGER;
445 
446  }
447  return PARM_UNSUPPORTED;
448  }
449 
450  // Boiler plate to load individual types.
451  static void loadData(UT_IStream &is, int64 &v)
452  { is.bread(&v, 1); }
453  static void loadData(UT_IStream &is, bool &v)
454  { int64 iv; is.bread(&iv, 1); v = iv; }
455  static void loadData(UT_IStream &is, fpreal64 &v)
456  { is.bread<fpreal64>(&v, 1); }
457  static void loadData(UT_IStream &is, UT_Vector2D &v)
458  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
459  static void loadData(UT_IStream &is, UT_Vector3D &v)
460  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
461  is.bread<fpreal64>(&v.z(), 1); }
462  static void loadData(UT_IStream &is, UT_Vector4D &v)
463  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
464  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
465  static void loadData(UT_IStream &is, UT_Matrix2D &v)
466  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
467  static void loadData(UT_IStream &is, UT_Matrix3D &v)
468  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
469  static void loadData(UT_IStream &is, UT_Matrix4D &v)
470  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
471  static void loadData(UT_IStream &is, UT_Vector2I &v)
472  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
473  static void loadData(UT_IStream &is, UT_Vector3I &v)
474  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
475  is.bread<int64>(&v.z(), 1); }
476  static void loadData(UT_IStream &is, UT_Vector4I &v)
477  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
478  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
480  { is.bread(v); }
482  { UT_StringHolder rampdata;
483  loadData(is, rampdata);
484  if (rampdata.isstring())
485  {
486  v.reset(new UT_Ramp());
487  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
488  v->load(istr);
489  }
490  else v.reset();
491  }
494  loadData(is, data);
495  if (data.isstring())
496  {
497  // Find the data type.
498  const char *colon = UT_StringWrap(data).findChar(':');
499  if (colon)
500  {
501  int typelen = colon - data.buffer();
503  type.strncpy(data.buffer(), typelen);
504  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
505 
506  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
507  }
508  }
509  else v.reset();
510  }
511 
512  static void saveData(std::ostream &os, int64 v)
513  { UTwrite(os, &v); }
514  static void saveData(std::ostream &os, bool v)
515  { int64 iv = v; UTwrite(os, &iv); }
516  static void saveData(std::ostream &os, fpreal64 v)
517  { UTwrite<fpreal64>(os, &v); }
518  static void saveData(std::ostream &os, UT_Vector2D v)
519  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
520  static void saveData(std::ostream &os, UT_Vector3D v)
521  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
522  UTwrite<fpreal64>(os, &v.z()); }
523  static void saveData(std::ostream &os, UT_Vector4D v)
524  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
525  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
526  static void saveData(std::ostream &os, UT_Matrix2D v)
528  static void saveData(std::ostream &os, UT_Matrix3D v)
530  static void saveData(std::ostream &os, UT_Matrix4D v)
532  static void saveData(std::ostream &os, UT_StringHolder s)
533  { UT_StringWrap(s).saveBinary(os); }
534  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
536  UT_OStringStream ostr;
537  if (s) s->save(ostr);
538  result = ostr.str();
539  saveData(os, result);
540  }
541  static void saveData(std::ostream &os, PRM_DataItemHandle s)
543  UT_OStringStream ostr;
544  if (s)
545  {
546  ostr << s->getDataTypeToken();
547  ostr << ":";
548  s->saveBinary(ostr);
549  }
550  result = ostr.str();
551  saveData(os, result);
552  }
553 
554 
555  void save(std::ostream &os) const
556  {
557  int32 v = version();
558  UTwrite(os, &v);
559  saveData(os, myGroup);
560  saveData(os, myGrouptype);
561  saveData(os, myOrig);
562  saveData(os, myDir);
563  saveData(os, myTrans);
564  saveData(os, myRot);
565  saveData(os, myScale);
566  saveData(os, myUpdatenmls);
567  saveData(os, myUpdateaffectednmls);
568  saveData(os, myVlength);
569  saveData(os, myInvertxform);
570  saveData(os, myAddattrib);
571  saveData(os, myOutputattrib);
572  saveData(os, myOutputmerge);
573 
574  }
575 
576  bool load(UT_IStream &is)
577  {
578  int32 v;
579  is.bread(&v, 1);
580  if (version() != v)
581  {
582  // Fail incompatible versions
583  return false;
584  }
585  loadData(is, myGroup);
586  loadData(is, myGrouptype);
587  loadData(is, myOrig);
588  loadData(is, myDir);
589  loadData(is, myTrans);
590  loadData(is, myRot);
591  loadData(is, myScale);
592  loadData(is, myUpdatenmls);
593  loadData(is, myUpdateaffectednmls);
594  loadData(is, myVlength);
595  loadData(is, myInvertxform);
596  loadData(is, myAddattrib);
597  loadData(is, myOutputattrib);
598  loadData(is, myOutputmerge);
599 
600  return true;
601  }
602 
603  const UT_StringHolder & getGroup() const { return myGroup; }
604  void setGroup(const UT_StringHolder & val) { myGroup = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getGroup();
610  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
611  return result;
612  }
613  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
614  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getGrouptype();
619  int64 result;
620  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
621  return Grouptype(result);
622  }
623  UT_Vector3D getOrig() const { return myOrig; }
624  void setOrig(UT_Vector3D val) { myOrig = val; }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getOrig();
630  OP_Utils::evalOpParm(result, thissop, "orig", cookparms.getCookTime(), 0);
631  return result;
632  }
633  UT_Vector3D getDir() const { return myDir; }
634  void setDir(UT_Vector3D val) { myDir = val; }
635  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getDir();
640  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
641  return result;
642  }
643  fpreal64 getTrans() const { return myTrans; }
644  void setTrans(fpreal64 val) { myTrans = val; }
645  fpreal64 opTrans(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getTrans();
650  OP_Utils::evalOpParm(result, thissop, "trans", cookparms.getCookTime(), 0);
651  return result;
652  }
653  fpreal64 getRot() const { return myRot; }
654  void setRot(fpreal64 val) { myRot = val; }
655  fpreal64 opRot(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getRot();
660  OP_Utils::evalOpParm(result, thissop, "rot", cookparms.getCookTime(), 0);
661  return result;
662  }
663  fpreal64 getScale() const { return myScale; }
664  void setScale(fpreal64 val) { myScale = val; }
665  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getScale();
670  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getUpdatenmls() const { return myUpdatenmls; }
674  void setUpdatenmls(bool val) { myUpdatenmls = val; }
675  bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getUpdatenmls();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
681  return result;
682  }
683  bool getUpdateaffectednmls() const { return myUpdateaffectednmls; }
684  void setUpdateaffectednmls(bool val) { myUpdateaffectednmls = val; }
685  bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getUpdateaffectednmls();
689  bool result;
690  OP_Utils::evalOpParm(result, thissop, "updateaffectednmls", cookparms.getCookTime(), 0);
691  return result;
692  }
693  bool getVlength() const { return myVlength; }
694  void setVlength(bool val) { myVlength = val; }
695  bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getVlength();
699  bool result;
700  OP_Utils::evalOpParm(result, thissop, "vlength", cookparms.getCookTime(), 0);
701  return result;
702  }
703  bool getInvertxform() const { return myInvertxform; }
704  void setInvertxform(bool val) { myInvertxform = val; }
705  bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getInvertxform();
709  bool result;
710  OP_Utils::evalOpParm(result, thissop, "invertxform", cookparms.getCookTime(), 0);
711  return result;
712  }
713  bool getAddattrib() const { return myAddattrib; }
714  void setAddattrib(bool val) { myAddattrib = val; }
715  bool opAddattrib(const SOP_NodeVerb::CookParms &cookparms) const
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getAddattrib();
719  bool result;
720  OP_Utils::evalOpParm(result, thissop, "addattrib", cookparms.getCookTime(), 0);
721  return result;
722  }
723  const UT_StringHolder & getOutputattrib() const { return myOutputattrib; }
724  void setOutputattrib(const UT_StringHolder & val) { myOutputattrib = val; }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getOutputattrib();
730  OP_Utils::evalOpParm(result, thissop, "outputattrib", cookparms.getCookTime(), 0);
731  return result;
732  }
733  Outputmerge getOutputmerge() const { return Outputmerge(myOutputmerge); }
734  void setOutputmerge(Outputmerge val) { myOutputmerge = int64(val); }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getOutputmerge();
739  int64 result;
740  OP_Utils::evalOpParm(result, thissop, "outputmerge", cookparms.getCookTime(), 0);
741  return Outputmerge(result);
742  }
743 
744 private:
745  UT_StringHolder myGroup;
746  int64 myGrouptype;
747  UT_Vector3D myOrig;
748  UT_Vector3D myDir;
749  fpreal64 myTrans;
750  fpreal64 myRot;
751  fpreal64 myScale;
752  bool myUpdatenmls;
753  bool myUpdateaffectednmls;
754  bool myVlength;
755  bool myInvertxform;
756  bool myAddattrib;
757  UT_StringHolder myOutputattrib;
758  int64 myOutputmerge;
759 
760 };
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:556
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector2D v)
void setGrouptype(Grouptype val)
static void loadData(UT_IStream &is, bool &v)
bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
UT_Vector3D getOrig() const
SYS_FORCE_INLINE const char * buffer() const
UT_Vector3D opOrig(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
GLdouble s
Definition: glad.h:3009
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setOutputattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
An output stream object that owns its own string buffer storage.
bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
bool operator!=(const SOP_TransformAxisParms &src) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Outputmerge opOutputmerge(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator==(const SOP_TransformAxisParms &src) const
exint length() const
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setOrig(UT_Vector3D val)
UT_StringHolder opOutputattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
const char * getNestParmName(TempIndex fieldnum) const override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_StringHolder & getOutputattrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void copyFrom(const OP_NodeParms *src) override
bool opAddattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
Outputmerge getOutputmerge() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Matrix4D v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, bool v)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setOutputmerge(Outputmerge val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:633
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
fpreal64 opRot(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setDir(UT_Vector3D val)
fpreal64 opTrans(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void saveData(std::ostream &os, UT_StringHolder s)