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 }
31 
32 
34 {
35 public:
36  static int version() { return 1; }
37 
39  {
40  myGroup = ""_UTsh;
41  myBarbattribs = "P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
42  myIdentifierattrib = "templatenames"_UTsh;
43  myWeightsattrib = "templateweights"_UTsh;
44  myBlendattrib = "blendattrib"_UTsh;
45  myShaftsubd = false;
46  myShaftbasesegs = 1;
47  myUseshaftbasesegsattrib = false;
48  myShaftbasesegsattrib = "shaft_base_segs"_UTsh;
49  myBarbsegmode = 0;
50  myBarbsegs = 0;
51  myBarbmirror = true;
52 
53  }
54 
59 
61 
63  {
64  if (myGroup != src.myGroup) return false;
65  if (myBarbattribs != src.myBarbattribs) return false;
66  if (myIdentifierattrib != src.myIdentifierattrib) return false;
67  if (myWeightsattrib != src.myWeightsattrib) return false;
68  if (myBlendattrib != src.myBlendattrib) return false;
69  if (myShaftsubd != src.myShaftsubd) return false;
70  if (myShaftbasesegs != src.myShaftbasesegs) return false;
71  if (myUseshaftbasesegsattrib != src.myUseshaftbasesegsattrib) return false;
72  if (myShaftbasesegsattrib != src.myShaftbasesegsattrib) return false;
73  if (myBarbsegmode != src.myBarbsegmode) return false;
74  if (myBarbsegs != src.myBarbsegs) return false;
75  if (myBarbmirror != src.myBarbmirror) return false;
76 
77  return true;
78  }
80  {
81  return !operator==(src);
82  }
84 
85 
86 
87  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
88  {
89  myGroup = ""_UTsh;
90  if (true)
91  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
92  myBarbattribs = "P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
93  if (true)
94  graph->evalOpParm(myBarbattribs, nodeidx, "barbattribs", time, 0);
95  myIdentifierattrib = "templatenames"_UTsh;
96  if (true)
97  graph->evalOpParm(myIdentifierattrib, nodeidx, "identifierattrib", time, 0);
98  myWeightsattrib = "templateweights"_UTsh;
99  if (true)
100  graph->evalOpParm(myWeightsattrib, nodeidx, "weightsattrib", time, 0);
101  myBlendattrib = "blendattrib"_UTsh;
102  if (true)
103  graph->evalOpParm(myBlendattrib, nodeidx, "blendattrib", time, 0);
104  myShaftsubd = false;
105  if (true)
106  graph->evalOpParm(myShaftsubd, nodeidx, "shaftsubd", time, 0);
107  myShaftbasesegs = 1;
108  if (true)
109  graph->evalOpParm(myShaftbasesegs, nodeidx, "shaftbasesegs", time, 0);
110  myUseshaftbasesegsattrib = false;
111  if (true)
112  graph->evalOpParm(myUseshaftbasesegsattrib, nodeidx, "useshaftbasesegsattrib", time, 0);
113  myShaftbasesegsattrib = "shaft_base_segs"_UTsh;
114  if (true && ( (true&&!(((getUseshaftbasesegsattrib()==0)))) ) )
115  graph->evalOpParm(myShaftbasesegsattrib, nodeidx, "shaftbasesegsattrib", time, 0);
116  myBarbsegmode = 0;
117  if (true)
118  graph->evalOpParm(myBarbsegmode, nodeidx, "barbsegmode", time, 0);
119  myBarbsegs = 0;
120  if (true && ( (true&&!(((int64(getBarbsegmode())!=0)))) ) )
121  graph->evalOpParm(myBarbsegs, nodeidx, "barbsegs", time, 0);
122  myBarbmirror = true;
123  if (true)
124  graph->evalOpParm(myBarbmirror, nodeidx, "barbmirror", time, 0);
125 
126  }
127 
128 
129  void loadFromOpSubclass(const LoadParms &loadparms) override
130  {
131  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
132  }
133 
134 
135  void copyFrom(const OP_NodeParms *src) override
136  {
137  *this = *((const SOP_FeatherAttribInterpolateParms *)src);
138  }
139 
140  template <typename T>
141  void
142  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
143  {
144  if (idx.size() < 1)
145  return;
146  UT_ASSERT(idx.size() == instance.size()+1);
147  if (idx.size() != instance.size()+1)
148  return;
149  switch (idx[0])
150  {
151  case 0:
152  coerceValue(value, myGroup);
153  break;
154  case 1:
155  coerceValue(value, myBarbattribs);
156  break;
157  case 2:
158  coerceValue(value, myIdentifierattrib);
159  break;
160  case 3:
161  coerceValue(value, myWeightsattrib);
162  break;
163  case 4:
164  coerceValue(value, myBlendattrib);
165  break;
166  case 5:
167  coerceValue(value, myShaftsubd);
168  break;
169  case 6:
170  coerceValue(value, myShaftbasesegs);
171  break;
172  case 7:
173  coerceValue(value, myUseshaftbasesegsattrib);
174  break;
175  case 8:
176  coerceValue(value, myShaftbasesegsattrib);
177  break;
178  case 9:
179  coerceValue(value, myBarbsegmode);
180  break;
181  case 10:
182  coerceValue(value, myBarbsegs);
183  break;
184  case 11:
185  coerceValue(value, myBarbmirror);
186  break;
187 
188  }
189  }
190 
191  bool isParmColorRamp(exint idx) const override
192  {
193  switch (idx)
194  {
195 
196  }
197  return false;
198  }
199 
200  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
201  { doGetParmValue(idx, instance, value); }
202  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
203  { doGetParmValue(idx, instance, value); }
204  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
221  { doGetParmValue(idx, instance, value); }
222 
223  template <typename T>
224  void
225  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
226  {
227  if (idx.size() < 1)
228  return;
229  UT_ASSERT(idx.size() == instance.size()+1);
230  if (idx.size() != instance.size()+1)
231  return;
232  switch (idx[0])
233  {
234  case 0:
235  coerceValue(myGroup, ( ( value ) ));
236  break;
237  case 1:
238  coerceValue(myBarbattribs, ( ( value ) ));
239  break;
240  case 2:
241  coerceValue(myIdentifierattrib, ( ( value ) ));
242  break;
243  case 3:
244  coerceValue(myWeightsattrib, ( ( value ) ));
245  break;
246  case 4:
247  coerceValue(myBlendattrib, ( ( value ) ));
248  break;
249  case 5:
250  coerceValue(myShaftsubd, ( ( value ) ));
251  break;
252  case 6:
253  coerceValue(myShaftbasesegs, ( ( value ) ));
254  break;
255  case 7:
256  coerceValue(myUseshaftbasesegsattrib, ( ( value ) ));
257  break;
258  case 8:
259  coerceValue(myShaftbasesegsattrib, ( ( value ) ));
260  break;
261  case 9:
262  coerceValue(myBarbsegmode, clampMinValue(0, clampMaxValue(1, value ) ));
263  break;
264  case 10:
265  coerceValue(myBarbsegs, clampMinValue(1, ( value ) ));
266  break;
267  case 11:
268  coerceValue(myBarbmirror, ( ( value ) ));
269  break;
270 
271  }
272  }
273 
274  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
275  { doSetParmValue(idx, instance, value); }
276  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
277  { doSetParmValue(idx, instance, value); }
278  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
279  { doSetParmValue(idx, instance, value); }
280  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
281  { doSetParmValue(idx, instance, value); }
282  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
283  { doSetParmValue(idx, instance, value); }
284  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
285  { doSetParmValue(idx, instance, value); }
286  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
295  { doSetParmValue(idx, instance, value); }
296 
297  exint getNestNumParms(TempIndex idx) const override
298  {
299  if (idx.size() == 0)
300  return 12;
301  switch (idx[0])
302  {
303 
304  }
305  // Invalid
306  return 0;
307  }
308 
309  const char *getNestParmName(TempIndex fieldnum) const override
310  {
311  if (fieldnum.size() < 1)
312  return 0;
313  switch (fieldnum[0])
314  {
315  case 0:
316  return "group";
317  case 1:
318  return "barbattribs";
319  case 2:
320  return "identifierattrib";
321  case 3:
322  return "weightsattrib";
323  case 4:
324  return "blendattrib";
325  case 5:
326  return "shaftsubd";
327  case 6:
328  return "shaftbasesegs";
329  case 7:
330  return "useshaftbasesegsattrib";
331  case 8:
332  return "shaftbasesegsattrib";
333  case 9:
334  return "barbsegmode";
335  case 10:
336  return "barbsegs";
337  case 11:
338  return "barbmirror";
339 
340  }
341  return 0;
342  }
343 
344  ParmType getNestParmType(TempIndex fieldnum) const override
345  {
346  if (fieldnum.size() < 1)
347  return PARM_UNSUPPORTED;
348  switch (fieldnum[0])
349  {
350  case 0:
351  return PARM_STRING;
352  case 1:
353  return PARM_STRING;
354  case 2:
355  return PARM_STRING;
356  case 3:
357  return PARM_STRING;
358  case 4:
359  return PARM_STRING;
360  case 5:
361  return PARM_INTEGER;
362  case 6:
363  return PARM_INTEGER;
364  case 7:
365  return PARM_INTEGER;
366  case 8:
367  return PARM_STRING;
368  case 9:
369  return PARM_INTEGER;
370  case 10:
371  return PARM_INTEGER;
372  case 11:
373  return PARM_INTEGER;
374 
375  }
376  return PARM_UNSUPPORTED;
377  }
378 
379  // Boiler plate to load individual types.
380  static void loadData(UT_IStream &is, int64 &v)
381  { is.bread(&v, 1); }
382  static void loadData(UT_IStream &is, bool &v)
383  { int64 iv; is.bread(&iv, 1); v = iv; }
384  static void loadData(UT_IStream &is, fpreal64 &v)
385  { is.bread<fpreal64>(&v, 1); }
386  static void loadData(UT_IStream &is, UT_Vector2D &v)
387  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
388  static void loadData(UT_IStream &is, UT_Vector3D &v)
389  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
390  is.bread<fpreal64>(&v.z(), 1); }
391  static void loadData(UT_IStream &is, UT_Vector4D &v)
392  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
393  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
394  static void loadData(UT_IStream &is, UT_Matrix2D &v)
395  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
396  static void loadData(UT_IStream &is, UT_Matrix3D &v)
397  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
398  static void loadData(UT_IStream &is, UT_Matrix4D &v)
399  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
400  static void loadData(UT_IStream &is, UT_Vector2I &v)
401  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
402  static void loadData(UT_IStream &is, UT_Vector3I &v)
403  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
404  is.bread<int64>(&v.z(), 1); }
405  static void loadData(UT_IStream &is, UT_Vector4I &v)
406  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
407  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
409  { is.bread(v); }
411  { UT_StringHolder rampdata;
412  loadData(is, rampdata);
413  if (rampdata.isstring())
414  {
415  v.reset(new UT_Ramp());
416  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
417  v->load(istr);
418  }
419  else v.reset();
420  }
423  loadData(is, data);
424  if (data.isstring())
425  {
426  // Find the data type.
427  const char *colon = UT_StringWrap(data).findChar(':');
428  if (colon)
429  {
430  int typelen = colon - data.buffer();
432  type.strncpy(data.buffer(), typelen);
433  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
434 
435  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
436  }
437  }
438  else v.reset();
439  }
440 
441  static void saveData(std::ostream &os, int64 v)
442  { UTwrite(os, &v); }
443  static void saveData(std::ostream &os, bool v)
444  { int64 iv = v; UTwrite(os, &iv); }
445  static void saveData(std::ostream &os, fpreal64 v)
446  { UTwrite<fpreal64>(os, &v); }
447  static void saveData(std::ostream &os, UT_Vector2D v)
448  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
449  static void saveData(std::ostream &os, UT_Vector3D v)
450  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
451  UTwrite<fpreal64>(os, &v.z()); }
452  static void saveData(std::ostream &os, UT_Vector4D v)
453  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
454  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
455  static void saveData(std::ostream &os, UT_Matrix2D v)
457  static void saveData(std::ostream &os, UT_Matrix3D v)
459  static void saveData(std::ostream &os, UT_Matrix4D v)
461  static void saveData(std::ostream &os, UT_StringHolder s)
462  { UT_StringWrap(s).saveBinary(os); }
463  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
465  UT_OStringStream ostr;
466  if (s) s->save(ostr);
467  result = ostr.str();
468  saveData(os, result);
469  }
470  static void saveData(std::ostream &os, PRM_DataItemHandle s)
472  UT_OStringStream ostr;
473  if (s)
474  {
475  ostr << s->getDataTypeToken();
476  ostr << ":";
477  s->saveBinary(ostr);
478  }
479  result = ostr.str();
480  saveData(os, result);
481  }
482 
483 
484  void save(std::ostream &os) const
485  {
486  int32 v = version();
487  UTwrite(os, &v);
488  saveData(os, myGroup);
489  saveData(os, myBarbattribs);
490  saveData(os, myIdentifierattrib);
491  saveData(os, myWeightsattrib);
492  saveData(os, myBlendattrib);
493  saveData(os, myShaftsubd);
494  saveData(os, myShaftbasesegs);
495  saveData(os, myUseshaftbasesegsattrib);
496  saveData(os, myShaftbasesegsattrib);
497  saveData(os, myBarbsegmode);
498  saveData(os, myBarbsegs);
499  saveData(os, myBarbmirror);
500 
501  }
502 
503  bool load(UT_IStream &is)
504  {
505  int32 v;
506  is.bread(&v, 1);
507  if (version() != v)
508  {
509  // Fail incompatible versions
510  return false;
511  }
512  loadData(is, myGroup);
513  loadData(is, myBarbattribs);
514  loadData(is, myIdentifierattrib);
515  loadData(is, myWeightsattrib);
516  loadData(is, myBlendattrib);
517  loadData(is, myShaftsubd);
518  loadData(is, myShaftbasesegs);
519  loadData(is, myUseshaftbasesegsattrib);
520  loadData(is, myShaftbasesegsattrib);
521  loadData(is, myBarbsegmode);
522  loadData(is, myBarbsegs);
523  loadData(is, myBarbmirror);
524 
525  return true;
526  }
527 
528  const UT_StringHolder & getGroup() const { return myGroup; }
529  void setGroup(const UT_StringHolder & val) { myGroup = val; }
531  {
532  SOP_Node *thissop = cookparms.getNode();
533  if (!thissop) return getGroup();
535  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
536  return result;
537  }
538  const UT_StringHolder & getBarbattribs() const { return myBarbattribs; }
539  void setBarbattribs(const UT_StringHolder & val) { myBarbattribs = val; }
541  {
542  SOP_Node *thissop = cookparms.getNode();
543  if (!thissop) return getBarbattribs();
545  OP_Utils::evalOpParm(result, thissop, "barbattribs", cookparms.getCookTime(), 0);
546  return result;
547  }
548  const UT_StringHolder & getIdentifierattrib() const { return myIdentifierattrib; }
549  void setIdentifierattrib(const UT_StringHolder & val) { myIdentifierattrib = val; }
551  {
552  SOP_Node *thissop = cookparms.getNode();
553  if (!thissop) return getIdentifierattrib();
555  OP_Utils::evalOpParm(result, thissop, "identifierattrib", cookparms.getCookTime(), 0);
556  return result;
557  }
558  const UT_StringHolder & getWeightsattrib() const { return myWeightsattrib; }
559  void setWeightsattrib(const UT_StringHolder & val) { myWeightsattrib = val; }
561  {
562  SOP_Node *thissop = cookparms.getNode();
563  if (!thissop) return getWeightsattrib();
565  OP_Utils::evalOpParm(result, thissop, "weightsattrib", cookparms.getCookTime(), 0);
566  return result;
567  }
568  const UT_StringHolder & getBlendattrib() const { return myBlendattrib; }
569  void setBlendattrib(const UT_StringHolder & val) { myBlendattrib = val; }
571  {
572  SOP_Node *thissop = cookparms.getNode();
573  if (!thissop) return getBlendattrib();
575  OP_Utils::evalOpParm(result, thissop, "blendattrib", cookparms.getCookTime(), 0);
576  return result;
577  }
578  bool getShaftsubd() const { return myShaftsubd; }
579  void setShaftsubd(bool val) { myShaftsubd = val; }
580  bool opShaftsubd(const SOP_NodeVerb::CookParms &cookparms) const
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getShaftsubd();
584  bool result;
585  OP_Utils::evalOpParm(result, thissop, "shaftsubd", cookparms.getCookTime(), 0);
586  return result;
587  }
588  int64 getShaftbasesegs() const { return myShaftbasesegs; }
589  void setShaftbasesegs(int64 val) { myShaftbasesegs = val; }
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getShaftbasesegs();
594  int64 result;
595  OP_Utils::evalOpParm(result, thissop, "shaftbasesegs", cookparms.getCookTime(), 0);
596  return result;
597  }
598  bool getUseshaftbasesegsattrib() const { return myUseshaftbasesegsattrib; }
599  void setUseshaftbasesegsattrib(bool val) { myUseshaftbasesegsattrib = val; }
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getUseshaftbasesegsattrib();
604  bool result;
605  OP_Utils::evalOpParm(result, thissop, "useshaftbasesegsattrib", cookparms.getCookTime(), 0);
606  return result;
607  }
608  const UT_StringHolder & getShaftbasesegsattrib() const { return myShaftbasesegsattrib; }
609  void setShaftbasesegsattrib(const UT_StringHolder & val) { myShaftbasesegsattrib = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getShaftbasesegsattrib();
615  OP_Utils::evalOpParm(result, thissop, "shaftbasesegsattrib", cookparms.getCookTime(), 0);
616  return result;
617  }
618  Barbsegmode getBarbsegmode() const { return Barbsegmode(myBarbsegmode); }
619  void setBarbsegmode(Barbsegmode val) { myBarbsegmode = int64(val); }
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getBarbsegmode();
624  int64 result;
625  OP_Utils::evalOpParm(result, thissop, "barbsegmode", cookparms.getCookTime(), 0);
626  return Barbsegmode(result);
627  }
628  int64 getBarbsegs() const { return myBarbsegs; }
629  void setBarbsegs(int64 val) { myBarbsegs = val; }
630  int64 opBarbsegs(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getBarbsegs();
634  int64 result;
635  OP_Utils::evalOpParm(result, thissop, "barbsegs", cookparms.getCookTime(), 0);
636  return result;
637  }
638  bool getBarbmirror() const { return myBarbmirror; }
639  void setBarbmirror(bool val) { myBarbmirror = val; }
640  bool opBarbmirror(const SOP_NodeVerb::CookParms &cookparms) const
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getBarbmirror();
644  bool result;
645  OP_Utils::evalOpParm(result, thissop, "barbmirror", cookparms.getCookTime(), 0);
646  return result;
647  }
648 
649 private:
650  UT_StringHolder myGroup;
651  UT_StringHolder myBarbattribs;
652  UT_StringHolder myIdentifierattrib;
653  UT_StringHolder myWeightsattrib;
654  UT_StringHolder myBlendattrib;
655  bool myShaftsubd;
656  int64 myShaftbasesegs;
657  bool myUseshaftbasesegsattrib;
658  UT_StringHolder myShaftbasesegsattrib;
659  int64 myBarbsegmode;
660  int64 myBarbsegs;
661  bool myBarbmirror;
662 
663 };
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)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
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
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
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
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:1385
#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:89
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)
OP_NodeParms & operator=(const OP_NodeParms &)=default
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