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 <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_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  return true;
119  }
121  {
122  return !operator==(src);
123  }
126 
127 
128 
129  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
130  {
131  myGroup = ""_UTsh;
132  if (true)
133  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
134  myGrouptype = 0;
135  if (true)
136  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
137  myOrig = UT_Vector3D(0,0,0);
138  if (true)
139  graph->evalOpParm(myOrig, nodeidx, "orig", time, 0);
140  myDir = UT_Vector3D(0,1,0);
141  if (true)
142  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
143  myTrans = 0;
144  if (true)
145  graph->evalOpParm(myTrans, nodeidx, "trans", time, 0);
146  myRot = 0;
147  if (true)
148  graph->evalOpParm(myRot, nodeidx, "rot", time, 0);
149  myScale = 1;
150  if (true)
151  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
152  myUpdatenmls = false;
153  if (true)
154  graph->evalOpParm(myUpdatenmls, nodeidx, "updatenmls", time, 0);
155  myUpdateaffectednmls = true;
156  if (true && ( (true&&!(((getUpdatenmls()==1)))) ) )
157  graph->evalOpParm(myUpdateaffectednmls, nodeidx, "updateaffectednmls", time, 0);
158  myVlength = true;
159  if (true && ( (true&&!(((getUpdatenmls()==1)))) ) )
160  graph->evalOpParm(myVlength, nodeidx, "vlength", time, 0);
161  myInvertxform = false;
162  if (true)
163  graph->evalOpParm(myInvertxform, nodeidx, "invertxform", time, 0);
164  myAddattrib = false;
165  if (true)
166  graph->evalOpParm(myAddattrib, nodeidx, "addattrib", time, 0);
167  myOutputattrib = "xform"_UTsh;
168  if (true && ( (true&&!(((getAddattrib()==0)))) ) )
169  graph->evalOpParm(myOutputattrib, nodeidx, "outputattrib", time, 0);
170  myOutputmerge = 2;
171  if (true && ( (true&&!(((getAddattrib()==0)))) ) )
172  graph->evalOpParm(myOutputmerge, nodeidx, "outputmerge", time, 0);
173 
174  }
175 
176 
177  void loadFromOpSubclass(const LoadParms &loadparms) override
178  {
179  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
180  }
181 
182 
183  void copyFrom(const OP_NodeParms *src) override
184  {
185  *this = *((const SOP_TransformAxisParms *)src);
186  }
187 
188  template <typename T>
189  void
190  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
191  {
192  if (idx.size() < 1)
193  return;
194  UT_ASSERT(idx.size() == instance.size()+1);
195  if (idx.size() != instance.size()+1)
196  return;
197  switch (idx[0])
198  {
199  case 0:
200  coerceValue(value, myGroup);
201  break;
202  case 1:
203  coerceValue(value, myGrouptype);
204  break;
205  case 2:
206  coerceValue(value, myOrig);
207  break;
208  case 3:
209  coerceValue(value, myDir);
210  break;
211  case 4:
212  coerceValue(value, myTrans);
213  break;
214  case 5:
215  coerceValue(value, myRot);
216  break;
217  case 6:
218  coerceValue(value, myScale);
219  break;
220  case 7:
221  coerceValue(value, myUpdatenmls);
222  break;
223  case 8:
224  coerceValue(value, myUpdateaffectednmls);
225  break;
226  case 9:
227  coerceValue(value, myVlength);
228  break;
229  case 10:
230  coerceValue(value, myInvertxform);
231  break;
232  case 11:
233  coerceValue(value, myAddattrib);
234  break;
235  case 12:
236  coerceValue(value, myOutputattrib);
237  break;
238  case 13:
239  coerceValue(value, myOutputmerge);
240  break;
241 
242  }
243  }
244 
245  bool isParmColorRamp(exint idx) const override
246  {
247  switch (idx)
248  {
249 
250  }
251  return false;
252  }
253 
254  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
275  { doGetParmValue(idx, instance, value); }
276 
277  template <typename T>
278  void
279  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
280  {
281  if (idx.size() < 1)
282  return;
283  UT_ASSERT(idx.size() == instance.size()+1);
284  if (idx.size() != instance.size()+1)
285  return;
286  switch (idx[0])
287  {
288  case 0:
289  coerceValue(myGroup, ( ( value ) ));
290  break;
291  case 1:
292  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
293  break;
294  case 2:
295  coerceValue(myOrig, ( ( value ) ));
296  break;
297  case 3:
298  coerceValue(myDir, ( ( value ) ));
299  break;
300  case 4:
301  coerceValue(myTrans, ( ( value ) ));
302  break;
303  case 5:
304  coerceValue(myRot, ( ( value ) ));
305  break;
306  case 6:
307  coerceValue(myScale, ( ( value ) ));
308  break;
309  case 7:
310  coerceValue(myUpdatenmls, ( ( value ) ));
311  break;
312  case 8:
313  coerceValue(myUpdateaffectednmls, ( ( value ) ));
314  break;
315  case 9:
316  coerceValue(myVlength, ( ( value ) ));
317  break;
318  case 10:
319  coerceValue(myInvertxform, ( ( value ) ));
320  break;
321  case 11:
322  coerceValue(myAddattrib, ( ( value ) ));
323  break;
324  case 12:
325  coerceValue(myOutputattrib, ( ( value ) ));
326  break;
327  case 13:
328  coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
329  break;
330 
331  }
332  }
333 
334  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
355  { doSetParmValue(idx, instance, value); }
356 
357  exint getNestNumParms(TempIndex idx) const override
358  {
359  if (idx.size() == 0)
360  return 14;
361  switch (idx[0])
362  {
363 
364  }
365  // Invalid
366  return 0;
367  }
368 
369  const char *getNestParmName(TempIndex fieldnum) const override
370  {
371  if (fieldnum.size() < 1)
372  return 0;
373  switch (fieldnum[0])
374  {
375  case 0:
376  return "group";
377  case 1:
378  return "grouptype";
379  case 2:
380  return "orig";
381  case 3:
382  return "dir";
383  case 4:
384  return "trans";
385  case 5:
386  return "rot";
387  case 6:
388  return "scale";
389  case 7:
390  return "updatenmls";
391  case 8:
392  return "updateaffectednmls";
393  case 9:
394  return "vlength";
395  case 10:
396  return "invertxform";
397  case 11:
398  return "addattrib";
399  case 12:
400  return "outputattrib";
401  case 13:
402  return "outputmerge";
403 
404  }
405  return 0;
406  }
407 
408  ParmType getNestParmType(TempIndex fieldnum) const override
409  {
410  if (fieldnum.size() < 1)
411  return PARM_UNSUPPORTED;
412  switch (fieldnum[0])
413  {
414  case 0:
415  return PARM_STRING;
416  case 1:
417  return PARM_INTEGER;
418  case 2:
419  return PARM_VECTOR3;
420  case 3:
421  return PARM_VECTOR3;
422  case 4:
423  return PARM_FLOAT;
424  case 5:
425  return PARM_FLOAT;
426  case 6:
427  return PARM_FLOAT;
428  case 7:
429  return PARM_INTEGER;
430  case 8:
431  return PARM_INTEGER;
432  case 9:
433  return PARM_INTEGER;
434  case 10:
435  return PARM_INTEGER;
436  case 11:
437  return PARM_INTEGER;
438  case 12:
439  return PARM_STRING;
440  case 13:
441  return PARM_INTEGER;
442 
443  }
444  return PARM_UNSUPPORTED;
445  }
446 
447  // Boiler plate to load individual types.
448  static void loadData(UT_IStream &is, int64 &v)
449  { is.bread(&v, 1); }
450  static void loadData(UT_IStream &is, bool &v)
451  { int64 iv; is.bread(&iv, 1); v = iv; }
452  static void loadData(UT_IStream &is, fpreal64 &v)
453  { is.bread<fpreal64>(&v, 1); }
454  static void loadData(UT_IStream &is, UT_Vector2D &v)
455  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
456  static void loadData(UT_IStream &is, UT_Vector3D &v)
457  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
458  is.bread<fpreal64>(&v.z(), 1); }
459  static void loadData(UT_IStream &is, UT_Vector4D &v)
460  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
461  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
462  static void loadData(UT_IStream &is, UT_Matrix2D &v)
463  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
464  static void loadData(UT_IStream &is, UT_Matrix3D &v)
465  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
466  static void loadData(UT_IStream &is, UT_Matrix4D &v)
467  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
468  static void loadData(UT_IStream &is, UT_Vector2I &v)
469  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
470  static void loadData(UT_IStream &is, UT_Vector3I &v)
471  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
472  is.bread<int64>(&v.z(), 1); }
473  static void loadData(UT_IStream &is, UT_Vector4I &v)
474  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
475  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
477  { is.bread(v); }
479  { UT_StringHolder rampdata;
480  loadData(is, rampdata);
481  if (rampdata.isstring())
482  {
483  v.reset(new UT_Ramp());
484  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
485  v->load(istr);
486  }
487  else v.reset();
488  }
491  loadData(is, data);
492  if (data.isstring())
493  {
494  // Find the data type.
495  const char *colon = UT_StringWrap(data).findChar(':');
496  if (colon)
497  {
498  int typelen = colon - data.buffer();
500  type.strncpy(data.buffer(), typelen);
501  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
502 
503  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
504  }
505  }
506  else v.reset();
507  }
508 
509  static void saveData(std::ostream &os, int64 v)
510  { UTwrite(os, &v); }
511  static void saveData(std::ostream &os, bool v)
512  { int64 iv = v; UTwrite(os, &iv); }
513  static void saveData(std::ostream &os, fpreal64 v)
514  { UTwrite<fpreal64>(os, &v); }
515  static void saveData(std::ostream &os, UT_Vector2D v)
516  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
517  static void saveData(std::ostream &os, UT_Vector3D v)
518  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
519  UTwrite<fpreal64>(os, &v.z()); }
520  static void saveData(std::ostream &os, UT_Vector4D v)
521  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
522  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
523  static void saveData(std::ostream &os, UT_Matrix2D v)
525  static void saveData(std::ostream &os, UT_Matrix3D v)
527  static void saveData(std::ostream &os, UT_Matrix4D v)
529  static void saveData(std::ostream &os, UT_StringHolder s)
530  { UT_StringWrap(s).saveBinary(os); }
531  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
533  UT_OStringStream ostr;
534  if (s) s->save(ostr);
535  result = ostr.str();
536  saveData(os, result);
537  }
538  static void saveData(std::ostream &os, PRM_DataItemHandle s)
540  UT_OStringStream ostr;
541  if (s)
542  {
543  ostr << s->getDataTypeToken();
544  ostr << ":";
545  s->saveBinary(ostr);
546  }
547  result = ostr.str();
548  saveData(os, result);
549  }
550 
551 
552  void save(std::ostream &os) const
553  {
554  int32 v = version();
555  UTwrite(os, &v);
556  saveData(os, myGroup);
557  saveData(os, myGrouptype);
558  saveData(os, myOrig);
559  saveData(os, myDir);
560  saveData(os, myTrans);
561  saveData(os, myRot);
562  saveData(os, myScale);
563  saveData(os, myUpdatenmls);
564  saveData(os, myUpdateaffectednmls);
565  saveData(os, myVlength);
566  saveData(os, myInvertxform);
567  saveData(os, myAddattrib);
568  saveData(os, myOutputattrib);
569  saveData(os, myOutputmerge);
570 
571  }
572 
573  bool load(UT_IStream &is)
574  {
575  int32 v;
576  is.bread(&v, 1);
577  if (version() != v)
578  {
579  // Fail incompatible versions
580  return false;
581  }
582  loadData(is, myGroup);
583  loadData(is, myGrouptype);
584  loadData(is, myOrig);
585  loadData(is, myDir);
586  loadData(is, myTrans);
587  loadData(is, myRot);
588  loadData(is, myScale);
589  loadData(is, myUpdatenmls);
590  loadData(is, myUpdateaffectednmls);
591  loadData(is, myVlength);
592  loadData(is, myInvertxform);
593  loadData(is, myAddattrib);
594  loadData(is, myOutputattrib);
595  loadData(is, myOutputmerge);
596 
597  return true;
598  }
599 
600  const UT_StringHolder & getGroup() const { return myGroup; }
601  void setGroup(const UT_StringHolder & val) { myGroup = val; }
603  {
604  SOP_Node *thissop = cookparms.getNode();
605  if (!thissop) return getGroup();
607  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
608  return result;
609  }
610  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
611  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
613  {
614  SOP_Node *thissop = cookparms.getNode();
615  if (!thissop) return getGrouptype();
616  int64 result;
617  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
618  return Grouptype(result);
619  }
620  UT_Vector3D getOrig() const { return myOrig; }
621  void setOrig(UT_Vector3D val) { myOrig = val; }
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getOrig();
627  OP_Utils::evalOpParm(result, thissop, "orig", cookparms.getCookTime(), 0);
628  return result;
629  }
630  UT_Vector3D getDir() const { return myDir; }
631  void setDir(UT_Vector3D val) { myDir = val; }
632  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getDir();
637  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
638  return result;
639  }
640  fpreal64 getTrans() const { return myTrans; }
641  void setTrans(fpreal64 val) { myTrans = val; }
642  fpreal64 opTrans(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getTrans();
647  OP_Utils::evalOpParm(result, thissop, "trans", cookparms.getCookTime(), 0);
648  return result;
649  }
650  fpreal64 getRot() const { return myRot; }
651  void setRot(fpreal64 val) { myRot = val; }
652  fpreal64 opRot(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getRot();
657  OP_Utils::evalOpParm(result, thissop, "rot", cookparms.getCookTime(), 0);
658  return result;
659  }
660  fpreal64 getScale() const { return myScale; }
661  void setScale(fpreal64 val) { myScale = val; }
662  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getScale();
667  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
668  return result;
669  }
670  bool getUpdatenmls() const { return myUpdatenmls; }
671  void setUpdatenmls(bool val) { myUpdatenmls = val; }
672  bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getUpdatenmls();
676  bool result;
677  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
678  return result;
679  }
680  bool getUpdateaffectednmls() const { return myUpdateaffectednmls; }
681  void setUpdateaffectednmls(bool val) { myUpdateaffectednmls = val; }
682  bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getUpdateaffectednmls();
686  bool result;
687  OP_Utils::evalOpParm(result, thissop, "updateaffectednmls", cookparms.getCookTime(), 0);
688  return result;
689  }
690  bool getVlength() const { return myVlength; }
691  void setVlength(bool val) { myVlength = val; }
692  bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getVlength();
696  bool result;
697  OP_Utils::evalOpParm(result, thissop, "vlength", cookparms.getCookTime(), 0);
698  return result;
699  }
700  bool getInvertxform() const { return myInvertxform; }
701  void setInvertxform(bool val) { myInvertxform = val; }
702  bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getInvertxform();
706  bool result;
707  OP_Utils::evalOpParm(result, thissop, "invertxform", cookparms.getCookTime(), 0);
708  return result;
709  }
710  bool getAddattrib() const { return myAddattrib; }
711  void setAddattrib(bool val) { myAddattrib = val; }
712  bool opAddattrib(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getAddattrib();
716  bool result;
717  OP_Utils::evalOpParm(result, thissop, "addattrib", cookparms.getCookTime(), 0);
718  return result;
719  }
720  const UT_StringHolder & getOutputattrib() const { return myOutputattrib; }
721  void setOutputattrib(const UT_StringHolder & val) { myOutputattrib = val; }
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getOutputattrib();
727  OP_Utils::evalOpParm(result, thissop, "outputattrib", cookparms.getCookTime(), 0);
728  return result;
729  }
730  Outputmerge getOutputmerge() const { return Outputmerge(myOutputmerge); }
731  void setOutputmerge(Outputmerge val) { myOutputmerge = int64(val); }
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getOutputmerge();
736  int64 result;
737  OP_Utils::evalOpParm(result, thissop, "outputmerge", cookparms.getCookTime(), 0);
738  return Outputmerge(result);
739  }
740 
741 private:
742  UT_StringHolder myGroup;
743  int64 myGrouptype;
744  UT_Vector3D myOrig;
745  UT_Vector3D myDir;
746  fpreal64 myTrans;
747  fpreal64 myRot;
748  fpreal64 myScale;
749  bool myUpdatenmls;
750  bool myUpdateaffectednmls;
751  bool myVlength;
752  bool myInvertxform;
753  bool myAddattrib;
754  UT_StringHolder myOutputattrib;
755  int64 myOutputmerge;
756 
757 };
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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:62
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:613
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
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:296
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:277
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:92
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
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:361
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
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)
type
Definition: core.h:1059
fpreal64 opTrans(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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)