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