HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyFrame.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_PolyFrameEnums
24 {
25  enum class Entity
26  {
27  PRIMITIVE = 0,
28  POINT
29  };
30 
32  getToken(Entity enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Entity::PRIMITIVE: return "primitive"_sh;
37  case Entity::POINT: return "point"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myEntity = 0;
54  myStyle = "edge2"_UTsh;
55  myAttribname = ""_UTsh;
56  myNon = true;
57  myN = "N"_UTsh;
58  myTangentuon = true;
59  myTangentu = "tangentu"_UTsh;
60  myTangentvon = false;
61  myTangentv = "tangentv"_UTsh;
62  mySignson = false;
63  mySigns = "signs"_UTsh;
64  myOrtho = false;
65  myLeftHanded = false;
66 
67  }
68 
69  explicit SOP_PolyFrameParms(const SOP_PolyFrameParms &) = default;
71  SOP_PolyFrameParms(SOP_PolyFrameParms &&) noexcept = default;
72  SOP_PolyFrameParms &operator=(SOP_PolyFrameParms &&) noexcept = default;
73 
74  ~SOP_PolyFrameParms() override {}
75 
76  bool operator==(const SOP_PolyFrameParms &src) const
77  {
78  if (myGroup != src.myGroup) return false;
79  if (myEntity != src.myEntity) return false;
80  if (myStyle != src.myStyle) return false;
81  if (myAttribname != src.myAttribname) return false;
82  if (myNon != src.myNon) return false;
83  if (myN != src.myN) return false;
84  if (myTangentuon != src.myTangentuon) return false;
85  if (myTangentu != src.myTangentu) return false;
86  if (myTangentvon != src.myTangentvon) return false;
87  if (myTangentv != src.myTangentv) return false;
88  if (mySignson != src.mySignson) return false;
89  if (mySigns != src.mySigns) return false;
90  if (myOrtho != src.myOrtho) return false;
91  if (myLeftHanded != src.myLeftHanded) return false;
92 
93  return true;
94  }
95  bool operator!=(const SOP_PolyFrameParms &src) const
96  {
97  return !operator==(src);
98  }
100 
101 
102 
103  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
104  {
105  myGroup = ""_UTsh;
106  if (true)
107  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
108  myEntity = 0;
109  if (true)
110  graph->evalOpParm(myEntity, nodeidx, "entity", time, 0);
111  myStyle = "edge2"_UTsh;
112  if (true)
113  graph->evalOpParm(myStyle, nodeidx, "style", time, 0);
114  myAttribname = ""_UTsh;
115  if (true && ( (true&&!(((getStyle()!="attrib")&&(getStyle()!="texuv")&&(getStyle()!="mikkt")))) ) )
116  graph->evalOpParm(myAttribname, nodeidx, "attribname", time, 0);
117  myNon = true;
118  if (true && ( (true&&!(((getStyle()=="mikkt")))) ) )
119  graph->evalOpParm(myNon, nodeidx, "Non", time, 0);
120  myN = "N"_UTsh;
121  if (true && ( (true&&!(((getNon()==0))||((getStyle()=="mikkt")))) ) )
122  graph->evalOpParm(myN, nodeidx, "N", time, 0);
123  myTangentuon = true;
124  if (true)
125  graph->evalOpParm(myTangentuon, nodeidx, "tangentuon", time, 0);
126  myTangentu = "tangentu"_UTsh;
127  if (true && ( (true&&!(((getTangentuon()==0)))) ) )
128  graph->evalOpParm(myTangentu, nodeidx, "tangentu", time, 0);
129  myTangentvon = false;
130  if (true)
131  graph->evalOpParm(myTangentvon, nodeidx, "tangentvon", time, 0);
132  myTangentv = "tangentv"_UTsh;
133  if (true && ( (true&&!(((getTangentvon()==0)))) ) )
134  graph->evalOpParm(myTangentv, nodeidx, "tangentv", time, 0);
135  mySignson = false;
136  if (true && ( (true&&!(((getStyle()!="mikkt")))) ) )
137  graph->evalOpParm(mySignson, nodeidx, "signson", time, 0);
138  mySigns = "signs"_UTsh;
139  if (true && ( (true&&!(((getSignson()==0))||((getStyle()!="mikkt")))) ) )
140  graph->evalOpParm(mySigns, nodeidx, "signs", time, 0);
141  myOrtho = false;
142  if (true && ( (true&&!(((getStyle()=="mikkt")))) ) )
143  graph->evalOpParm(myOrtho, nodeidx, "ortho", time, 0);
144  myLeftHanded = false;
145  if (true && ( (true&&!(((getOrtho()==0))||((getStyle()=="mikkt")))) ) )
146  graph->evalOpParm(myLeftHanded, nodeidx, "lefthanded", time, 0);
147 
148  }
149 
150 
151  void loadFromOpSubclass(const LoadParms &loadparms) override
152  {
153  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
154  }
155 
156 
157  void copyFrom(const OP_NodeParms *src) override
158  {
159  *this = *((const SOP_PolyFrameParms *)src);
160  }
161 
162  template <typename T>
163  void
164  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
165  {
166  if (idx.size() < 1)
167  return;
168  UT_ASSERT(idx.size() == instance.size()+1);
169  if (idx.size() != instance.size()+1)
170  return;
171  switch (idx[0])
172  {
173  case 0:
174  coerceValue(value, myGroup);
175  break;
176  case 1:
177  coerceValue(value, myEntity);
178  break;
179  case 2:
180  coerceValue(value, myStyle);
181  break;
182  case 3:
183  coerceValue(value, myAttribname);
184  break;
185  case 4:
186  coerceValue(value, myNon);
187  break;
188  case 5:
189  coerceValue(value, myN);
190  break;
191  case 6:
192  coerceValue(value, myTangentuon);
193  break;
194  case 7:
195  coerceValue(value, myTangentu);
196  break;
197  case 8:
198  coerceValue(value, myTangentvon);
199  break;
200  case 9:
201  coerceValue(value, myTangentv);
202  break;
203  case 10:
204  coerceValue(value, mySignson);
205  break;
206  case 11:
207  coerceValue(value, mySigns);
208  break;
209  case 12:
210  coerceValue(value, myOrtho);
211  break;
212  case 13:
213  coerceValue(value, myLeftHanded);
214  break;
215 
216  }
217  }
218 
219  bool isParmColorRamp(exint idx) const override
220  {
221  switch (idx)
222  {
223 
224  }
225  return false;
226  }
227 
228  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
249  { doGetParmValue(idx, instance, value); }
250 
251  template <typename T>
252  void
253  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
254  {
255  if (idx.size() < 1)
256  return;
257  UT_ASSERT(idx.size() == instance.size()+1);
258  if (idx.size() != instance.size()+1)
259  return;
260  switch (idx[0])
261  {
262  case 0:
263  coerceValue(myGroup, ( ( value ) ));
264  break;
265  case 1:
266  coerceValue(myEntity, clampMinValue(0, clampMaxValue(1, value ) ));
267  break;
268  case 2:
269  coerceValue(myStyle, ( ( value ) ));
270  break;
271  case 3:
272  coerceValue(myAttribname, ( ( value ) ));
273  break;
274  case 4:
275  coerceValue(myNon, ( ( value ) ));
276  break;
277  case 5:
278  coerceValue(myN, ( ( value ) ));
279  break;
280  case 6:
281  coerceValue(myTangentuon, ( ( value ) ));
282  break;
283  case 7:
284  coerceValue(myTangentu, ( ( value ) ));
285  break;
286  case 8:
287  coerceValue(myTangentvon, ( ( value ) ));
288  break;
289  case 9:
290  coerceValue(myTangentv, ( ( value ) ));
291  break;
292  case 10:
293  coerceValue(mySignson, ( ( value ) ));
294  break;
295  case 11:
296  coerceValue(mySigns, ( ( value ) ));
297  break;
298  case 12:
299  coerceValue(myOrtho, ( ( value ) ));
300  break;
301  case 13:
302  coerceValue(myLeftHanded, ( ( value ) ));
303  break;
304 
305  }
306  }
307 
308  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
329  { doSetParmValue(idx, instance, value); }
330 
331  exint getNestNumParms(TempIndex idx) const override
332  {
333  if (idx.size() == 0)
334  return 14;
335  switch (idx[0])
336  {
337 
338  }
339  // Invalid
340  return 0;
341  }
342 
343  const char *getNestParmName(TempIndex fieldnum) const override
344  {
345  if (fieldnum.size() < 1)
346  return 0;
347  switch (fieldnum[0])
348  {
349  case 0:
350  return "group";
351  case 1:
352  return "entity";
353  case 2:
354  return "style";
355  case 3:
356  return "attribname";
357  case 4:
358  return "Non";
359  case 5:
360  return "N";
361  case 6:
362  return "tangentuon";
363  case 7:
364  return "tangentu";
365  case 8:
366  return "tangentvon";
367  case 9:
368  return "tangentv";
369  case 10:
370  return "signson";
371  case 11:
372  return "signs";
373  case 12:
374  return "ortho";
375  case 13:
376  return "lefthanded";
377 
378  }
379  return 0;
380  }
381 
382  ParmType getNestParmType(TempIndex fieldnum) const override
383  {
384  if (fieldnum.size() < 1)
385  return PARM_UNSUPPORTED;
386  switch (fieldnum[0])
387  {
388  case 0:
389  return PARM_STRING;
390  case 1:
391  return PARM_INTEGER;
392  case 2:
393  return PARM_STRING;
394  case 3:
395  return PARM_STRING;
396  case 4:
397  return PARM_INTEGER;
398  case 5:
399  return PARM_STRING;
400  case 6:
401  return PARM_INTEGER;
402  case 7:
403  return PARM_STRING;
404  case 8:
405  return PARM_INTEGER;
406  case 9:
407  return PARM_STRING;
408  case 10:
409  return PARM_INTEGER;
410  case 11:
411  return PARM_STRING;
412  case 12:
413  return PARM_INTEGER;
414  case 13:
415  return PARM_INTEGER;
416 
417  }
418  return PARM_UNSUPPORTED;
419  }
420 
421  // Boiler plate to load individual types.
422  static void loadData(UT_IStream &is, int64 &v)
423  { is.bread(&v, 1); }
424  static void loadData(UT_IStream &is, bool &v)
425  { int64 iv; is.bread(&iv, 1); v = iv; }
426  static void loadData(UT_IStream &is, fpreal64 &v)
427  { is.bread<fpreal64>(&v, 1); }
428  static void loadData(UT_IStream &is, UT_Vector2D &v)
429  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector3D &v)
431  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
432  is.bread<fpreal64>(&v.z(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector4D &v)
434  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
435  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
436  static void loadData(UT_IStream &is, UT_Matrix2D &v)
437  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
438  static void loadData(UT_IStream &is, UT_Matrix3D &v)
439  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
440  static void loadData(UT_IStream &is, UT_Matrix4D &v)
441  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
442  static void loadData(UT_IStream &is, UT_Vector2I &v)
443  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector3I &v)
445  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
446  is.bread<int64>(&v.z(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector4I &v)
448  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
449  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
451  { is.bread(v); }
453  { UT_StringHolder rampdata;
454  loadData(is, rampdata);
455  if (rampdata.isstring())
456  {
457  v.reset(new UT_Ramp());
458  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
459  v->load(istr);
460  }
461  else v.reset();
462  }
465  loadData(is, data);
466  if (data.isstring())
467  {
468  // Find the data type.
469  const char *colon = UT_StringWrap(data).findChar(':');
470  if (colon)
471  {
472  int typelen = colon - data.buffer();
474  type.strncpy(data.buffer(), typelen);
475  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
476 
477  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
478  }
479  }
480  else v.reset();
481  }
482 
483  static void saveData(std::ostream &os, int64 v)
484  { UTwrite(os, &v); }
485  static void saveData(std::ostream &os, bool v)
486  { int64 iv = v; UTwrite(os, &iv); }
487  static void saveData(std::ostream &os, fpreal64 v)
488  { UTwrite<fpreal64>(os, &v); }
489  static void saveData(std::ostream &os, UT_Vector2D v)
490  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
491  static void saveData(std::ostream &os, UT_Vector3D v)
492  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
493  UTwrite<fpreal64>(os, &v.z()); }
494  static void saveData(std::ostream &os, UT_Vector4D v)
495  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
496  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
497  static void saveData(std::ostream &os, UT_Matrix2D v)
499  static void saveData(std::ostream &os, UT_Matrix3D v)
501  static void saveData(std::ostream &os, UT_Matrix4D v)
503  static void saveData(std::ostream &os, UT_StringHolder s)
504  { UT_StringWrap(s).saveBinary(os); }
505  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
507  UT_OStringStream ostr;
508  if (s) s->save(ostr);
509  result = ostr.str();
510  saveData(os, result);
511  }
512  static void saveData(std::ostream &os, PRM_DataItemHandle s)
514  UT_OStringStream ostr;
515  if (s)
516  {
517  ostr << s->getDataTypeToken();
518  ostr << ":";
519  s->saveBinary(ostr);
520  }
521  result = ostr.str();
522  saveData(os, result);
523  }
524 
525 
526  void save(std::ostream &os) const
527  {
528  int32 v = version();
529  UTwrite(os, &v);
530  saveData(os, myGroup);
531  saveData(os, myEntity);
532  saveData(os, myStyle);
533  saveData(os, myAttribname);
534  saveData(os, myNon);
535  saveData(os, myN);
536  saveData(os, myTangentuon);
537  saveData(os, myTangentu);
538  saveData(os, myTangentvon);
539  saveData(os, myTangentv);
540  saveData(os, mySignson);
541  saveData(os, mySigns);
542  saveData(os, myOrtho);
543  saveData(os, myLeftHanded);
544 
545  }
546 
547  bool load(UT_IStream &is)
548  {
549  int32 v;
550  is.bread(&v, 1);
551  if (version() != v)
552  {
553  // Fail incompatible versions
554  return false;
555  }
556  loadData(is, myGroup);
557  loadData(is, myEntity);
558  loadData(is, myStyle);
559  loadData(is, myAttribname);
560  loadData(is, myNon);
561  loadData(is, myN);
562  loadData(is, myTangentuon);
563  loadData(is, myTangentu);
564  loadData(is, myTangentvon);
565  loadData(is, myTangentv);
566  loadData(is, mySignson);
567  loadData(is, mySigns);
568  loadData(is, myOrtho);
569  loadData(is, myLeftHanded);
570 
571  return true;
572  }
573 
574  const UT_StringHolder & getGroup() const { return myGroup; }
575  void setGroup(const UT_StringHolder & val) { myGroup = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getGroup();
581  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
582  return result;
583  }
584  Entity getEntity() const { return Entity(myEntity); }
585  void setEntity(Entity val) { myEntity = int64(val); }
586  Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getEntity();
590  int64 result;
591  OP_Utils::evalOpParm(result, thissop, "entity", cookparms.getCookTime(), 0);
592  return Entity(result);
593  }
594  const UT_StringHolder & getStyle() const { return myStyle; }
595  void setStyle(const UT_StringHolder & val) { myStyle = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getStyle();
601  OP_Utils::evalOpParm(result, thissop, "style", cookparms.getCookTime(), 0);
602  return result;
603  }
604  const UT_StringHolder & getAttribname() const { return myAttribname; }
605  void setAttribname(const UT_StringHolder & val) { myAttribname = val; }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getAttribname();
611  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
612  return result;
613  }
614  bool getNon() const { return myNon; }
615  void setNon(bool val) { myNon = val; }
616  bool opNon(const SOP_NodeVerb::CookParms &cookparms) const
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getNon();
620  bool result;
621  OP_Utils::evalOpParm(result, thissop, "Non", cookparms.getCookTime(), 0);
622  return result;
623  }
624  const UT_StringHolder & getN() const { return myN; }
625  void setN(const UT_StringHolder & val) { myN = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getN();
631  OP_Utils::evalOpParm(result, thissop, "N", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getTangentuon() const { return myTangentuon; }
635  void setTangentuon(bool val) { myTangentuon = val; }
636  bool opTangentuon(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getTangentuon();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "tangentuon", cookparms.getCookTime(), 0);
642  return result;
643  }
644  const UT_StringHolder & getTangentu() const { return myTangentu; }
645  void setTangentu(const UT_StringHolder & val) { myTangentu = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getTangentu();
651  OP_Utils::evalOpParm(result, thissop, "tangentu", cookparms.getCookTime(), 0);
652  return result;
653  }
654  bool getTangentvon() const { return myTangentvon; }
655  void setTangentvon(bool val) { myTangentvon = val; }
656  bool opTangentvon(const SOP_NodeVerb::CookParms &cookparms) const
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getTangentvon();
660  bool result;
661  OP_Utils::evalOpParm(result, thissop, "tangentvon", cookparms.getCookTime(), 0);
662  return result;
663  }
664  const UT_StringHolder & getTangentv() const { return myTangentv; }
665  void setTangentv(const UT_StringHolder & val) { myTangentv = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getTangentv();
671  OP_Utils::evalOpParm(result, thissop, "tangentv", cookparms.getCookTime(), 0);
672  return result;
673  }
674  bool getSignson() const { return mySignson; }
675  void setSignson(bool val) { mySignson = val; }
676  bool opSignson(const SOP_NodeVerb::CookParms &cookparms) const
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getSignson();
680  bool result;
681  OP_Utils::evalOpParm(result, thissop, "signson", cookparms.getCookTime(), 0);
682  return result;
683  }
684  const UT_StringHolder & getSigns() const { return mySigns; }
685  void setSigns(const UT_StringHolder & val) { mySigns = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getSigns();
691  OP_Utils::evalOpParm(result, thissop, "signs", cookparms.getCookTime(), 0);
692  return result;
693  }
694  bool getOrtho() const { return myOrtho; }
695  void setOrtho(bool val) { myOrtho = val; }
696  bool opOrtho(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getOrtho();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "ortho", cookparms.getCookTime(), 0);
702  return result;
703  }
704  bool getLeftHanded() const { return myLeftHanded; }
705  void setLeftHanded(bool val) { myLeftHanded = val; }
706  bool opLeftHanded(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getLeftHanded();
710  bool result;
711  OP_Utils::evalOpParm(result, thissop, "lefthanded", cookparms.getCookTime(), 0);
712  return result;
713  }
714 
715 private:
716  UT_StringHolder myGroup;
717  int64 myEntity;
718  UT_StringHolder myStyle;
719  UT_StringHolder myAttribname;
720  bool myNon;
721  UT_StringHolder myN;
722  bool myTangentuon;
723  UT_StringHolder myTangentu;
724  bool myTangentvon;
725  UT_StringHolder myTangentv;
726  bool mySignson;
727  UT_StringHolder mySigns;
728  bool myOrtho;
729  bool myLeftHanded;
730 
731 };
UT_StringHolder opTangentv(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSigns() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_PolyFrameParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setTangentuon(bool val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_PolyFrameParms &src) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setN(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const 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
void setSigns(const UT_StringHolder &val)
fpreal getTime() const
Definition: OP_Context.h:62
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setGroup(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getN() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
static void loadData(UT_IStream &is, UT_Matrix3D &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
**But if you need a result
Definition: thread.h:613
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setAttribname(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opTangentu(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getLeftHanded() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool opTangentvon(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opNon(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
bool getTangentvon() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setTangentvon(bool val)
void setTangentv(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint length() const
void setTangentu(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setStyle(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, fpreal64 &v)
bool opLeftHanded(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opOrtho(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opStyle(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTangentv() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_StringHolder & getGroup() const
UT_StringHolder opN(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
const UT_StringHolder & getTangentu() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, fpreal64 v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Entity enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
bool getTangentuon() const
bool load(UT_IStream &is)
Entity getEntity() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
const UT_StringHolder & getAttribname() const
const UT_StringHolder & getStyle() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opTangentuon(const SOP_NodeVerb::CookParms &cookparms) const
void setSignson(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setEntity(Entity val)
void setLeftHanded(bool val)
UT_StringHolder opSigns(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:1059
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opSignson(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663