HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_FeatherAttribInterpolate.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_FeatherAttribInterpolateEnums
24 {
25  enum class Barbsegmode
26  {
27  CONSTANT = 0,
29  };
30 
32  getToken(Barbsegmode enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Barbsegmode::CONSTANT: return "constant"_sh;
37  case Barbsegmode::MATCHSOURCE: return "matchsource"_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  myBarbattribs = "P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
54  myIdentifierattrib = "templatenames"_UTsh;
55  myWeightsattrib = "templateweights"_UTsh;
56  myBlendattrib = "blendattrib"_UTsh;
57  myShaftsubd = false;
58  myShaftbasesegs = 1;
59  myUseshaftbasesegsattrib = false;
60  myShaftbasesegsattrib = "shaft_base_segs"_UTsh;
61  myBarbsegmode = 0;
62  myBarbsegs = 0;
63  myBarbmirror = true;
64 
65  }
66 
71 
73 
75  {
76  if (myGroup != src.myGroup) return false;
77  if (myBarbattribs != src.myBarbattribs) return false;
78  if (myIdentifierattrib != src.myIdentifierattrib) return false;
79  if (myWeightsattrib != src.myWeightsattrib) return false;
80  if (myBlendattrib != src.myBlendattrib) return false;
81  if (myShaftsubd != src.myShaftsubd) return false;
82  if (myShaftbasesegs != src.myShaftbasesegs) return false;
83  if (myUseshaftbasesegsattrib != src.myUseshaftbasesegsattrib) return false;
84  if (myShaftbasesegsattrib != src.myShaftbasesegsattrib) return false;
85  if (myBarbsegmode != src.myBarbsegmode) return false;
86  if (myBarbsegs != src.myBarbsegs) return false;
87  if (myBarbmirror != src.myBarbmirror) return false;
88 
89  return true;
90  }
92  {
93  return !operator==(src);
94  }
96 
97 
98 
99  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
100  {
101  myGroup = ""_UTsh;
102  if (true)
103  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
104  myBarbattribs = "P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
105  if (true)
106  graph->evalOpParm(myBarbattribs, nodeidx, "barbattribs", time, 0);
107  myIdentifierattrib = "templatenames"_UTsh;
108  if (true)
109  graph->evalOpParm(myIdentifierattrib, nodeidx, "identifierattrib", time, 0);
110  myWeightsattrib = "templateweights"_UTsh;
111  if (true)
112  graph->evalOpParm(myWeightsattrib, nodeidx, "weightsattrib", time, 0);
113  myBlendattrib = "blendattrib"_UTsh;
114  if (true)
115  graph->evalOpParm(myBlendattrib, nodeidx, "blendattrib", time, 0);
116  myShaftsubd = false;
117  if (true)
118  graph->evalOpParm(myShaftsubd, nodeidx, "shaftsubd", time, 0);
119  myShaftbasesegs = 1;
120  if (true)
121  graph->evalOpParm(myShaftbasesegs, nodeidx, "shaftbasesegs", time, 0);
122  myUseshaftbasesegsattrib = false;
123  if (true)
124  graph->evalOpParm(myUseshaftbasesegsattrib, nodeidx, "useshaftbasesegsattrib", time, 0);
125  myShaftbasesegsattrib = "shaft_base_segs"_UTsh;
126  if (true && ( (true&&!(((getUseshaftbasesegsattrib()==0)))) ) )
127  graph->evalOpParm(myShaftbasesegsattrib, nodeidx, "shaftbasesegsattrib", time, 0);
128  myBarbsegmode = 0;
129  if (true)
130  graph->evalOpParm(myBarbsegmode, nodeidx, "barbsegmode", time, 0);
131  myBarbsegs = 0;
132  if (true && ( (true&&!(((int64(getBarbsegmode())!=0)))) ) )
133  graph->evalOpParm(myBarbsegs, nodeidx, "barbsegs", time, 0);
134  myBarbmirror = true;
135  if (true)
136  graph->evalOpParm(myBarbmirror, nodeidx, "barbmirror", time, 0);
137 
138  }
139 
140 
141  void loadFromOpSubclass(const LoadParms &loadparms) override
142  {
143  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
144  }
145 
146 
147  void copyFrom(const OP_NodeParms *src) override
148  {
149  *this = *((const SOP_FeatherAttribInterpolateParms *)src);
150  }
151 
152  template <typename T>
153  void
154  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
155  {
156  if (idx.size() < 1)
157  return;
158  UT_ASSERT(idx.size() == instance.size()+1);
159  if (idx.size() != instance.size()+1)
160  return;
161  switch (idx[0])
162  {
163  case 0:
164  coerceValue(value, myGroup);
165  break;
166  case 1:
167  coerceValue(value, myBarbattribs);
168  break;
169  case 2:
170  coerceValue(value, myIdentifierattrib);
171  break;
172  case 3:
173  coerceValue(value, myWeightsattrib);
174  break;
175  case 4:
176  coerceValue(value, myBlendattrib);
177  break;
178  case 5:
179  coerceValue(value, myShaftsubd);
180  break;
181  case 6:
182  coerceValue(value, myShaftbasesegs);
183  break;
184  case 7:
185  coerceValue(value, myUseshaftbasesegsattrib);
186  break;
187  case 8:
188  coerceValue(value, myShaftbasesegsattrib);
189  break;
190  case 9:
191  coerceValue(value, myBarbsegmode);
192  break;
193  case 10:
194  coerceValue(value, myBarbsegs);
195  break;
196  case 11:
197  coerceValue(value, myBarbmirror);
198  break;
199 
200  }
201  }
202 
203  bool isParmColorRamp(exint idx) const override
204  {
205  switch (idx)
206  {
207 
208  }
209  return false;
210  }
211 
212  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
233  { doGetParmValue(idx, instance, value); }
234 
235  template <typename T>
236  void
237  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
238  {
239  if (idx.size() < 1)
240  return;
241  UT_ASSERT(idx.size() == instance.size()+1);
242  if (idx.size() != instance.size()+1)
243  return;
244  switch (idx[0])
245  {
246  case 0:
247  coerceValue(myGroup, ( ( value ) ));
248  break;
249  case 1:
250  coerceValue(myBarbattribs, ( ( value ) ));
251  break;
252  case 2:
253  coerceValue(myIdentifierattrib, ( ( value ) ));
254  break;
255  case 3:
256  coerceValue(myWeightsattrib, ( ( value ) ));
257  break;
258  case 4:
259  coerceValue(myBlendattrib, ( ( value ) ));
260  break;
261  case 5:
262  coerceValue(myShaftsubd, ( ( value ) ));
263  break;
264  case 6:
265  coerceValue(myShaftbasesegs, ( ( value ) ));
266  break;
267  case 7:
268  coerceValue(myUseshaftbasesegsattrib, ( ( value ) ));
269  break;
270  case 8:
271  coerceValue(myShaftbasesegsattrib, ( ( value ) ));
272  break;
273  case 9:
274  coerceValue(myBarbsegmode, clampMinValue(0, clampMaxValue(1, value ) ));
275  break;
276  case 10:
277  coerceValue(myBarbsegs, clampMinValue(1, ( value ) ));
278  break;
279  case 11:
280  coerceValue(myBarbmirror, ( ( value ) ));
281  break;
282 
283  }
284  }
285 
286  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
307  { doSetParmValue(idx, instance, value); }
308 
309  exint getNestNumParms(TempIndex idx) const override
310  {
311  if (idx.size() == 0)
312  return 12;
313  switch (idx[0])
314  {
315 
316  }
317  // Invalid
318  return 0;
319  }
320 
321  const char *getNestParmName(TempIndex fieldnum) const override
322  {
323  if (fieldnum.size() < 1)
324  return 0;
325  switch (fieldnum[0])
326  {
327  case 0:
328  return "group";
329  case 1:
330  return "barbattribs";
331  case 2:
332  return "identifierattrib";
333  case 3:
334  return "weightsattrib";
335  case 4:
336  return "blendattrib";
337  case 5:
338  return "shaftsubd";
339  case 6:
340  return "shaftbasesegs";
341  case 7:
342  return "useshaftbasesegsattrib";
343  case 8:
344  return "shaftbasesegsattrib";
345  case 9:
346  return "barbsegmode";
347  case 10:
348  return "barbsegs";
349  case 11:
350  return "barbmirror";
351 
352  }
353  return 0;
354  }
355 
356  ParmType getNestParmType(TempIndex fieldnum) const override
357  {
358  if (fieldnum.size() < 1)
359  return PARM_UNSUPPORTED;
360  switch (fieldnum[0])
361  {
362  case 0:
363  return PARM_STRING;
364  case 1:
365  return PARM_STRING;
366  case 2:
367  return PARM_STRING;
368  case 3:
369  return PARM_STRING;
370  case 4:
371  return PARM_STRING;
372  case 5:
373  return PARM_INTEGER;
374  case 6:
375  return PARM_INTEGER;
376  case 7:
377  return PARM_INTEGER;
378  case 8:
379  return PARM_STRING;
380  case 9:
381  return PARM_INTEGER;
382  case 10:
383  return PARM_INTEGER;
384  case 11:
385  return PARM_INTEGER;
386 
387  }
388  return PARM_UNSUPPORTED;
389  }
390 
391  // Boiler plate to load individual types.
392  static void loadData(UT_IStream &is, int64 &v)
393  { is.bread(&v, 1); }
394  static void loadData(UT_IStream &is, bool &v)
395  { int64 iv; is.bread(&iv, 1); v = iv; }
396  static void loadData(UT_IStream &is, fpreal64 &v)
397  { is.bread<fpreal64>(&v, 1); }
398  static void loadData(UT_IStream &is, UT_Vector2D &v)
399  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
400  static void loadData(UT_IStream &is, UT_Vector3D &v)
401  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
402  is.bread<fpreal64>(&v.z(), 1); }
403  static void loadData(UT_IStream &is, UT_Vector4D &v)
404  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
405  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
406  static void loadData(UT_IStream &is, UT_Matrix2D &v)
407  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
408  static void loadData(UT_IStream &is, UT_Matrix3D &v)
409  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
410  static void loadData(UT_IStream &is, UT_Matrix4D &v)
411  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
412  static void loadData(UT_IStream &is, UT_Vector2I &v)
413  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
414  static void loadData(UT_IStream &is, UT_Vector3I &v)
415  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
416  is.bread<int64>(&v.z(), 1); }
417  static void loadData(UT_IStream &is, UT_Vector4I &v)
418  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
419  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
421  { is.bread(v); }
423  { UT_StringHolder rampdata;
424  loadData(is, rampdata);
425  if (rampdata.isstring())
426  {
427  v.reset(new UT_Ramp());
428  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
429  v->load(istr);
430  }
431  else v.reset();
432  }
435  loadData(is, data);
436  if (data.isstring())
437  {
438  // Find the data type.
439  const char *colon = UT_StringWrap(data).findChar(':');
440  if (colon)
441  {
442  int typelen = colon - data.buffer();
444  type.strncpy(data.buffer(), typelen);
445  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
446 
447  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
448  }
449  }
450  else v.reset();
451  }
452 
453  static void saveData(std::ostream &os, int64 v)
454  { UTwrite(os, &v); }
455  static void saveData(std::ostream &os, bool v)
456  { int64 iv = v; UTwrite(os, &iv); }
457  static void saveData(std::ostream &os, fpreal64 v)
458  { UTwrite<fpreal64>(os, &v); }
459  static void saveData(std::ostream &os, UT_Vector2D v)
460  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
461  static void saveData(std::ostream &os, UT_Vector3D v)
462  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
463  UTwrite<fpreal64>(os, &v.z()); }
464  static void saveData(std::ostream &os, UT_Vector4D v)
465  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
466  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
467  static void saveData(std::ostream &os, UT_Matrix2D v)
469  static void saveData(std::ostream &os, UT_Matrix3D v)
471  static void saveData(std::ostream &os, UT_Matrix4D v)
473  static void saveData(std::ostream &os, UT_StringHolder s)
474  { UT_StringWrap(s).saveBinary(os); }
475  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
477  UT_OStringStream ostr;
478  if (s) s->save(ostr);
479  result = ostr.str();
480  saveData(os, result);
481  }
482  static void saveData(std::ostream &os, PRM_DataItemHandle s)
484  UT_OStringStream ostr;
485  if (s)
486  {
487  ostr << s->getDataTypeToken();
488  ostr << ":";
489  s->saveBinary(ostr);
490  }
491  result = ostr.str();
492  saveData(os, result);
493  }
494 
495 
496  void save(std::ostream &os) const
497  {
498  int32 v = version();
499  UTwrite(os, &v);
500  saveData(os, myGroup);
501  saveData(os, myBarbattribs);
502  saveData(os, myIdentifierattrib);
503  saveData(os, myWeightsattrib);
504  saveData(os, myBlendattrib);
505  saveData(os, myShaftsubd);
506  saveData(os, myShaftbasesegs);
507  saveData(os, myUseshaftbasesegsattrib);
508  saveData(os, myShaftbasesegsattrib);
509  saveData(os, myBarbsegmode);
510  saveData(os, myBarbsegs);
511  saveData(os, myBarbmirror);
512 
513  }
514 
515  bool load(UT_IStream &is)
516  {
517  int32 v;
518  is.bread(&v, 1);
519  if (version() != v)
520  {
521  // Fail incompatible versions
522  return false;
523  }
524  loadData(is, myGroup);
525  loadData(is, myBarbattribs);
526  loadData(is, myIdentifierattrib);
527  loadData(is, myWeightsattrib);
528  loadData(is, myBlendattrib);
529  loadData(is, myShaftsubd);
530  loadData(is, myShaftbasesegs);
531  loadData(is, myUseshaftbasesegsattrib);
532  loadData(is, myShaftbasesegsattrib);
533  loadData(is, myBarbsegmode);
534  loadData(is, myBarbsegs);
535  loadData(is, myBarbmirror);
536 
537  return true;
538  }
539 
540  const UT_StringHolder & getGroup() const { return myGroup; }
541  void setGroup(const UT_StringHolder & val) { myGroup = val; }
543  {
544  SOP_Node *thissop = cookparms.getNode();
545  if (!thissop) return getGroup();
547  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
548  return result;
549  }
550  const UT_StringHolder & getBarbattribs() const { return myBarbattribs; }
551  void setBarbattribs(const UT_StringHolder & val) { myBarbattribs = val; }
553  {
554  SOP_Node *thissop = cookparms.getNode();
555  if (!thissop) return getBarbattribs();
557  OP_Utils::evalOpParm(result, thissop, "barbattribs", cookparms.getCookTime(), 0);
558  return result;
559  }
560  const UT_StringHolder & getIdentifierattrib() const { return myIdentifierattrib; }
561  void setIdentifierattrib(const UT_StringHolder & val) { myIdentifierattrib = val; }
563  {
564  SOP_Node *thissop = cookparms.getNode();
565  if (!thissop) return getIdentifierattrib();
567  OP_Utils::evalOpParm(result, thissop, "identifierattrib", cookparms.getCookTime(), 0);
568  return result;
569  }
570  const UT_StringHolder & getWeightsattrib() const { return myWeightsattrib; }
571  void setWeightsattrib(const UT_StringHolder & val) { myWeightsattrib = val; }
573  {
574  SOP_Node *thissop = cookparms.getNode();
575  if (!thissop) return getWeightsattrib();
577  OP_Utils::evalOpParm(result, thissop, "weightsattrib", cookparms.getCookTime(), 0);
578  return result;
579  }
580  const UT_StringHolder & getBlendattrib() const { return myBlendattrib; }
581  void setBlendattrib(const UT_StringHolder & val) { myBlendattrib = val; }
583  {
584  SOP_Node *thissop = cookparms.getNode();
585  if (!thissop) return getBlendattrib();
587  OP_Utils::evalOpParm(result, thissop, "blendattrib", cookparms.getCookTime(), 0);
588  return result;
589  }
590  bool getShaftsubd() const { return myShaftsubd; }
591  void setShaftsubd(bool val) { myShaftsubd = val; }
592  bool opShaftsubd(const SOP_NodeVerb::CookParms &cookparms) const
593  {
594  SOP_Node *thissop = cookparms.getNode();
595  if (!thissop) return getShaftsubd();
596  bool result;
597  OP_Utils::evalOpParm(result, thissop, "shaftsubd", cookparms.getCookTime(), 0);
598  return result;
599  }
600  int64 getShaftbasesegs() const { return myShaftbasesegs; }
601  void setShaftbasesegs(int64 val) { myShaftbasesegs = val; }
603  {
604  SOP_Node *thissop = cookparms.getNode();
605  if (!thissop) return getShaftbasesegs();
606  int64 result;
607  OP_Utils::evalOpParm(result, thissop, "shaftbasesegs", cookparms.getCookTime(), 0);
608  return result;
609  }
610  bool getUseshaftbasesegsattrib() const { return myUseshaftbasesegsattrib; }
611  void setUseshaftbasesegsattrib(bool val) { myUseshaftbasesegsattrib = val; }
613  {
614  SOP_Node *thissop = cookparms.getNode();
615  if (!thissop) return getUseshaftbasesegsattrib();
616  bool result;
617  OP_Utils::evalOpParm(result, thissop, "useshaftbasesegsattrib", cookparms.getCookTime(), 0);
618  return result;
619  }
620  const UT_StringHolder & getShaftbasesegsattrib() const { return myShaftbasesegsattrib; }
621  void setShaftbasesegsattrib(const UT_StringHolder & val) { myShaftbasesegsattrib = val; }
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getShaftbasesegsattrib();
627  OP_Utils::evalOpParm(result, thissop, "shaftbasesegsattrib", cookparms.getCookTime(), 0);
628  return result;
629  }
630  Barbsegmode getBarbsegmode() const { return Barbsegmode(myBarbsegmode); }
631  void setBarbsegmode(Barbsegmode val) { myBarbsegmode = int64(val); }
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getBarbsegmode();
636  int64 result;
637  OP_Utils::evalOpParm(result, thissop, "barbsegmode", cookparms.getCookTime(), 0);
638  return Barbsegmode(result);
639  }
640  int64 getBarbsegs() const { return myBarbsegs; }
641  void setBarbsegs(int64 val) { myBarbsegs = val; }
642  int64 opBarbsegs(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getBarbsegs();
646  int64 result;
647  OP_Utils::evalOpParm(result, thissop, "barbsegs", cookparms.getCookTime(), 0);
648  return result;
649  }
650  bool getBarbmirror() const { return myBarbmirror; }
651  void setBarbmirror(bool val) { myBarbmirror = val; }
652  bool opBarbmirror(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getBarbmirror();
656  bool result;
657  OP_Utils::evalOpParm(result, thissop, "barbmirror", cookparms.getCookTime(), 0);
658  return result;
659  }
660 
661 private:
662  UT_StringHolder myGroup;
663  UT_StringHolder myBarbattribs;
664  UT_StringHolder myIdentifierattrib;
665  UT_StringHolder myWeightsattrib;
666  UT_StringHolder myBlendattrib;
667  bool myShaftsubd;
668  int64 myShaftbasesegs;
669  bool myUseshaftbasesegsattrib;
670  UT_StringHolder myShaftbasesegsattrib;
671  int64 myBarbsegmode;
672  int64 myBarbsegs;
673  bool myBarbmirror;
674 
675 };
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
UT_StringHolder opWeightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_FeatherAttribInterpolateParms &src) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opBarbmirror(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &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
static void loadData(UT_IStream &is, int64 &v)
fpreal getTime() const
Definition: OP_Context.h:62
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_StringHolder s)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void loadFromOpSubclass(const LoadParms &loadparms) override
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
const UT_StringHolder & getWeightsattrib() const
GLdouble s
Definition: glad.h:3009
UT_StringHolder opBlendattrib(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
int64 opShaftbasesegs(const SOP_NodeVerb::CookParms &cookparms) const
void setIdentifierattrib(const UT_StringHolder &val)
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(Barbsegmode enum_value)
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.
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
UT_StringHolder opIdentifierattrib(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getIdentifierattrib() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint length() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) 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
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setShaftbasesegsattrib(const UT_StringHolder &val)
Barbsegmode opBarbsegmode(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBarbattribs(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
bool opUseshaftbasesegsattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_FeatherAttribInterpolateParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getShaftbasesegsattrib() const
UT_StringHolder opShaftbasesegsattrib(const SOP_NodeVerb::CookParms &cookparms) const
int64 opBarbsegs(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setWeightsattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void copyFrom(const OP_NodeParms *src) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
Definition: core.h:1131
bool opShaftsubd(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663