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