HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_BoneCaptureLines.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 <OP/OP_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_BoneCaptureLinesEnums
24 {
25  enum class Resample
26  {
27  OFF = 0,
28  MAXAXIS,
29  MAXLENGTH
30  };
31 
33  getToken(Resample enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case Resample::OFF: return "off"_sh;
38  case Resample::MAXAXIS: return "maxaxis"_sh;
39  case Resample::MAXLENGTH: return "maxlength"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class Cookat
45  {
46  CAPTUREFRAME = 0,
48  };
49 
51  getToken(Cookat enum_value)
52  {
53  using namespace UT::Literal;
54  switch (enum_value) {
55  case Cookat::CAPTUREFRAME: return "captureframe"_sh;
56  case Cookat::EVERYFRAME: return "everyframe"_sh;
57  default: UT_ASSERT(false); return ""_sh;
58  }
59  }
60 
61  enum class Captureregionsop
62  {
63  DISPLAY = 0,
64  RENDER,
65  CAPTURE
66  };
67 
70  {
71  using namespace UT::Literal;
72  switch (enum_value) {
73  case Captureregionsop::DISPLAY: return "display"_sh;
74  case Captureregionsop::RENDER: return "render"_sh;
75  case Captureregionsop::CAPTURE: return "capture"_sh;
76  default: UT_ASSERT(false); return ""_sh;
77  }
78  }
79 
80 }
81 
82 
84 {
85 public:
86  static int version() { return 1; }
87 
89  {
90  myGroup = ""_UTsh;
91  myRootpath = ""_UTsh;
92  myExtraregions = ""_UTsh;
93  myResample = 1;
94  myMaxaxisfraction = 0.01;
95  myMaxlength = 0.1;
96  myExcludeshortbones = true;
97  myExcludethreshold = 0.001;
98  myFusethreshold = 0.001;
99  myUsebonelink = false;
100  myUsecaptpose = true;
101  myCookat = 0;
102  myCaptframe = 0;
103  myCaptureregionsop = 2;
104  myDosubnets = false;
105  myRelativeskel = true;
106 
107  }
108 
109  explicit SOP_BoneCaptureLinesParms(const SOP_BoneCaptureLinesParms &) = default;
112  SOP_BoneCaptureLinesParms &operator=(SOP_BoneCaptureLinesParms &&) noexcept = default;
113 
115 
117  {
118  if (myGroup != src.myGroup) return false;
119  if (myRootpath != src.myRootpath) return false;
120  if (myExtraregions != src.myExtraregions) return false;
121  if (myResample != src.myResample) return false;
122  if (myMaxaxisfraction != src.myMaxaxisfraction) return false;
123  if (myMaxlength != src.myMaxlength) return false;
124  if (myExcludeshortbones != src.myExcludeshortbones) return false;
125  if (myExcludethreshold != src.myExcludethreshold) return false;
126  if (myFusethreshold != src.myFusethreshold) return false;
127  if (myUsebonelink != src.myUsebonelink) return false;
128  if (myUsecaptpose != src.myUsecaptpose) return false;
129  if (myCookat != src.myCookat) return false;
130  if (myCaptframe != src.myCaptframe) return false;
131  if (myCaptureregionsop != src.myCaptureregionsop) return false;
132  if (myDosubnets != src.myDosubnets) return false;
133  if (myRelativeskel != src.myRelativeskel) return false;
134 
135 
136  if (baseGetSignature() != src.baseGetSignature()) return false;
137 
138  return true;
139  }
141  {
142  return !operator==(src);
143  }
147 
148 
149 
150  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
151  {
152  myGroup = ""_UTsh;
153  if (true)
154  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
155  myRootpath = ""_UTsh;
156  if (true)
157  graph->evalOpParm(myRootpath, nodeidx, "rootpath", time, graph->isDirect()?nullptr:depnode);
158  myExtraregions = ""_UTsh;
159  if (true)
160  graph->evalOpParm(myExtraregions, nodeidx, "extraregions", time, graph->isDirect()?nullptr:depnode);
161  myResample = 1;
162  if (true)
163  graph->evalOpParm(myResample, nodeidx, "resample", time, graph->isDirect()?nullptr:depnode);
164  myMaxaxisfraction = 0.01;
165  if (true && ( (true&&!(((int64(getResample())!=1))||((int64(getResample())!=1)))) ) )
166  graph->evalOpParm(myMaxaxisfraction, nodeidx, "maxaxisfraction", time, graph->isDirect()?nullptr:depnode);
167  myMaxlength = 0.1;
168  if (true && ( (true&&!(((int64(getResample())!=2))||((int64(getResample())!=2)))) ) )
169  graph->evalOpParm(myMaxlength, nodeidx, "maxlength", time, graph->isDirect()?nullptr:depnode);
170  myExcludeshortbones = true;
171  if (true)
172  graph->evalOpParm(myExcludeshortbones, nodeidx, "excludeshortbones", time, graph->isDirect()?nullptr:depnode);
173  myExcludethreshold = 0.001;
174  if (true && ( (true&&!(((getExcludeshortbones()==0)))) ) )
175  graph->evalOpParm(myExcludethreshold, nodeidx, "excludethreshold", time, graph->isDirect()?nullptr:depnode);
176  myFusethreshold = 0.001;
177  if (true)
178  graph->evalOpParm(myFusethreshold, nodeidx, "fusethreshold", time, graph->isDirect()?nullptr:depnode);
179  myUsebonelink = false;
180  if (true)
181  graph->evalOpParm(myUsebonelink, nodeidx, "usebonelink", time, graph->isDirect()?nullptr:depnode);
182  myUsecaptpose = true;
183  if (true)
184  graph->evalOpParm(myUsecaptpose, nodeidx, "usecaptpose", time, graph->isDirect()?nullptr:depnode);
185  myCookat = 0;
186  if (true && ( (true&&!(((getUsecaptpose()!=0)))) ) )
187  graph->evalOpParm(myCookat, nodeidx, "cookat", time, graph->isDirect()?nullptr:depnode);
188  myCaptframe = 0;
189  if (true && ( (true&&!(((getUsecaptpose()!=0))||((int64(getCookat())==1)))) ) )
190  graph->evalOpParm(myCaptframe, nodeidx, "captframe", time, graph->isDirect()?nullptr:depnode);
191  myCaptureregionsop = 2;
192  if (true)
193  graph->evalOpParm(myCaptureregionsop, nodeidx, "captureregionsop", time, graph->isDirect()?nullptr:depnode);
194  myDosubnets = false;
195  if (true)
196  graph->evalOpParm(myDosubnets, nodeidx, "dosubnets", time, graph->isDirect()?nullptr:depnode);
197  myRelativeskel = true;
198  if (true)
199  graph->evalOpParm(myRelativeskel, nodeidx, "relativeskel", time, graph->isDirect()?nullptr:depnode);
200 
201  }
202 
203 
204  void loadFromOpSubclass(const LoadParms &loadparms) override
205  {
206  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
207  }
208 
209 
210  void copyFrom(const OP_NodeParms *src) override
211  {
212  *this = *((const SOP_BoneCaptureLinesParms *)src);
213  }
214 
215  template <typename T>
216  void
217  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
218  {
219  if (idx.size() < 1)
220  return;
221  UT_ASSERT(idx.size() == instance.size()+1);
222  if (idx.size() != instance.size()+1)
223  return;
224  switch (idx[0])
225  {
226  case 0:
227  coerceValue(value, myGroup);
228  break;
229  case 1:
230  coerceValue(value, myRootpath);
231  break;
232  case 2:
233  coerceValue(value, myExtraregions);
234  break;
235  case 3:
236  coerceValue(value, myResample);
237  break;
238  case 4:
239  coerceValue(value, myMaxaxisfraction);
240  break;
241  case 5:
242  coerceValue(value, myMaxlength);
243  break;
244  case 6:
245  coerceValue(value, myExcludeshortbones);
246  break;
247  case 7:
248  coerceValue(value, myExcludethreshold);
249  break;
250  case 8:
251  coerceValue(value, myFusethreshold);
252  break;
253  case 9:
254  coerceValue(value, myUsebonelink);
255  break;
256  case 10:
257  coerceValue(value, myUsecaptpose);
258  break;
259  case 11:
260  coerceValue(value, myCookat);
261  break;
262  case 12:
263  coerceValue(value, myCaptframe);
264  break;
265  case 13:
266  coerceValue(value, myCaptureregionsop);
267  break;
268  case 14:
269  coerceValue(value, myDosubnets);
270  break;
271  case 15:
272  coerceValue(value, myRelativeskel);
273  break;
274 
275  }
276  }
277 
278  bool isParmColorRamp(exint idx) const override
279  {
280  switch (idx)
281  {
282 
283  }
284  return false;
285  }
286 
287  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
292  { doGetParmValue(idx, instance, value); }
293  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
294  { doGetParmValue(idx, instance, value); }
295  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
296  { doGetParmValue(idx, instance, value); }
297  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
298  { doGetParmValue(idx, instance, value); }
299  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
300  { doGetParmValue(idx, instance, value); }
301  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
302  { doGetParmValue(idx, instance, value); }
303  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
304  { doGetParmValue(idx, instance, value); }
305  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
306  { doGetParmValue(idx, instance, value); }
307  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
308  { doGetParmValue(idx, instance, value); }
309 
310  template <typename T>
311  void
312  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
313  {
314  if (idx.size() < 1)
315  return;
316  UT_ASSERT(idx.size() == instance.size()+1);
317  if (idx.size() != instance.size()+1)
318  return;
319  switch (idx[0])
320  {
321  case 0:
322  coerceValue(myGroup, ( ( value ) ));
323  break;
324  case 1:
325  coerceValue(myRootpath, ( ( value ) ));
326  break;
327  case 2:
328  coerceValue(myExtraregions, ( ( value ) ));
329  break;
330  case 3:
331  coerceValue(myResample, clampMinValue(0, clampMaxValue(2, value ) ));
332  break;
333  case 4:
334  coerceValue(myMaxaxisfraction, ( ( value ) ));
335  break;
336  case 5:
337  coerceValue(myMaxlength, ( ( value ) ));
338  break;
339  case 6:
340  coerceValue(myExcludeshortbones, ( ( value ) ));
341  break;
342  case 7:
343  coerceValue(myExcludethreshold, ( ( value ) ));
344  break;
345  case 8:
346  coerceValue(myFusethreshold, ( ( value ) ));
347  break;
348  case 9:
349  coerceValue(myUsebonelink, ( ( value ) ));
350  break;
351  case 10:
352  coerceValue(myUsecaptpose, ( ( value ) ));
353  break;
354  case 11:
355  coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
356  break;
357  case 12:
358  coerceValue(myCaptframe, ( ( value ) ));
359  break;
360  case 13:
361  coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
362  break;
363  case 14:
364  coerceValue(myDosubnets, ( ( value ) ));
365  break;
366  case 15:
367  coerceValue(myRelativeskel, ( ( value ) ));
368  break;
369 
370  }
371  }
372 
373  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
392  { doSetParmValue(idx, instance, value); }
393  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
394  { doSetParmValue(idx, instance, value); }
395 
396  exint getNestNumParms(TempIndex idx) const override
397  {
398  if (idx.size() == 0)
399  return 16;
400  switch (idx[0])
401  {
402 
403  }
404  // Invalid
405  return 0;
406  }
407 
408  const char *getNestParmName(TempIndex fieldnum) const override
409  {
410  if (fieldnum.size() < 1)
411  return 0;
412  switch (fieldnum[0])
413  {
414  case 0:
415  return "group";
416  case 1:
417  return "rootpath";
418  case 2:
419  return "extraregions";
420  case 3:
421  return "resample";
422  case 4:
423  return "maxaxisfraction";
424  case 5:
425  return "maxlength";
426  case 6:
427  return "excludeshortbones";
428  case 7:
429  return "excludethreshold";
430  case 8:
431  return "fusethreshold";
432  case 9:
433  return "usebonelink";
434  case 10:
435  return "usecaptpose";
436  case 11:
437  return "cookat";
438  case 12:
439  return "captframe";
440  case 13:
441  return "captureregionsop";
442  case 14:
443  return "dosubnets";
444  case 15:
445  return "relativeskel";
446 
447  }
448  return 0;
449  }
450 
451  ParmType getNestParmType(TempIndex fieldnum) const override
452  {
453  if (fieldnum.size() < 1)
454  return PARM_UNSUPPORTED;
455  switch (fieldnum[0])
456  {
457  case 0:
458  return PARM_STRING;
459  case 1:
460  return PARM_STRING;
461  case 2:
462  return PARM_STRING;
463  case 3:
464  return PARM_INTEGER;
465  case 4:
466  return PARM_FLOAT;
467  case 5:
468  return PARM_FLOAT;
469  case 6:
470  return PARM_INTEGER;
471  case 7:
472  return PARM_FLOAT;
473  case 8:
474  return PARM_FLOAT;
475  case 9:
476  return PARM_INTEGER;
477  case 10:
478  return PARM_INTEGER;
479  case 11:
480  return PARM_INTEGER;
481  case 12:
482  return PARM_FLOAT;
483  case 13:
484  return PARM_INTEGER;
485  case 14:
486  return PARM_INTEGER;
487  case 15:
488  return PARM_INTEGER;
489 
490  }
491  return PARM_UNSUPPORTED;
492  }
493 
494  // Boiler plate to load individual types.
495  static void loadData(UT_IStream &is, int64 &v)
496  { is.bread(&v, 1); }
497  static void loadData(UT_IStream &is, bool &v)
498  { int64 iv; is.bread(&iv, 1); v = iv; }
499  static void loadData(UT_IStream &is, fpreal64 &v)
500  { is.bread<fpreal64>(&v, 1); }
501  static void loadData(UT_IStream &is, UT_Vector2D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
503  static void loadData(UT_IStream &is, UT_Vector3D &v)
504  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
505  is.bread<fpreal64>(&v.z(), 1); }
506  static void loadData(UT_IStream &is, UT_Vector4D &v)
507  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
508  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
509  static void loadData(UT_IStream &is, UT_Matrix2D &v)
510  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
511  static void loadData(UT_IStream &is, UT_Matrix3D &v)
512  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
513  static void loadData(UT_IStream &is, UT_Matrix4D &v)
514  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
515  static void loadData(UT_IStream &is, UT_Vector2I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
517  static void loadData(UT_IStream &is, UT_Vector3I &v)
518  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
519  is.bread<int64>(&v.z(), 1); }
520  static void loadData(UT_IStream &is, UT_Vector4I &v)
521  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
522  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
524  { is.bread(v); }
526  { UT_StringHolder rampdata;
527  loadData(is, rampdata);
528  if (rampdata.isstring())
529  {
530  v.reset(new UT_Ramp());
531  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
532  v->load(istr);
533  }
534  else v.reset();
535  }
538  loadData(is, data);
539  if (data.isstring())
540  {
541  // Find the data type.
542  const char *colon = UT_StringWrap(data).findChar(':');
543  if (colon)
544  {
545  int typelen = colon - data.buffer();
547  type.strncpy(data.buffer(), typelen);
548  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
549 
550  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
551  }
552  }
553  else v.reset();
554  }
555 
556  static void saveData(std::ostream &os, int64 v)
557  { UTwrite(os, &v); }
558  static void saveData(std::ostream &os, bool v)
559  { int64 iv = v; UTwrite(os, &iv); }
560  static void saveData(std::ostream &os, fpreal64 v)
561  { UTwrite<fpreal64>(os, &v); }
562  static void saveData(std::ostream &os, UT_Vector2D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
564  static void saveData(std::ostream &os, UT_Vector3D v)
565  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
566  UTwrite<fpreal64>(os, &v.z()); }
567  static void saveData(std::ostream &os, UT_Vector4D v)
568  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
569  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
570  static void saveData(std::ostream &os, UT_Matrix2D v)
572  static void saveData(std::ostream &os, UT_Matrix3D v)
574  static void saveData(std::ostream &os, UT_Matrix4D v)
576  static void saveData(std::ostream &os, UT_StringHolder s)
577  { UT_StringWrap(s).saveBinary(os); }
578  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
580  UT_OStringStream ostr;
581  if (s) s->save(ostr);
582  result = ostr.str();
583  saveData(os, result);
584  }
585  static void saveData(std::ostream &os, PRM_DataItemHandle s)
587  UT_OStringStream ostr;
588  if (s)
589  {
590  ostr << s->getDataTypeToken();
591  ostr << ":";
592  s->saveBinary(ostr);
593  }
594  result = ostr.str();
595  saveData(os, result);
596  }
597 
598 
599  void save(std::ostream &os) const
600  {
601  int32 v = version();
602  UTwrite(os, &v);
603  saveData(os, myGroup);
604  saveData(os, myRootpath);
605  saveData(os, myExtraregions);
606  saveData(os, myResample);
607  saveData(os, myMaxaxisfraction);
608  saveData(os, myMaxlength);
609  saveData(os, myExcludeshortbones);
610  saveData(os, myExcludethreshold);
611  saveData(os, myFusethreshold);
612  saveData(os, myUsebonelink);
613  saveData(os, myUsecaptpose);
614  saveData(os, myCookat);
615  saveData(os, myCaptframe);
616  saveData(os, myCaptureregionsop);
617  saveData(os, myDosubnets);
618  saveData(os, myRelativeskel);
619 
620  }
621 
622  bool load(UT_IStream &is)
623  {
624  int32 v;
625  is.bread(&v, 1);
626  if (version() != v)
627  {
628  // Fail incompatible versions
629  return false;
630  }
631  loadData(is, myGroup);
632  loadData(is, myRootpath);
633  loadData(is, myExtraregions);
634  loadData(is, myResample);
635  loadData(is, myMaxaxisfraction);
636  loadData(is, myMaxlength);
637  loadData(is, myExcludeshortbones);
638  loadData(is, myExcludethreshold);
639  loadData(is, myFusethreshold);
640  loadData(is, myUsebonelink);
641  loadData(is, myUsecaptpose);
642  loadData(is, myCookat);
643  loadData(is, myCaptframe);
644  loadData(is, myCaptureregionsop);
645  loadData(is, myDosubnets);
646  loadData(is, myRelativeskel);
647 
648  return true;
649  }
650 
651  const UT_StringHolder & getGroup() const { return myGroup; }
652  void setGroup(const UT_StringHolder & val) { myGroup = val; }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getGroup();
658  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
659  return result;
660  }
661  const UT_StringHolder & getRootpath() const { return myRootpath; }
662  void setRootpath(const UT_StringHolder & val) { myRootpath = val; }
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getRootpath();
668  OP_Utils::evalOpParm(result, thissop, "rootpath", cookparms.getCookTime(), 0);
669  return result;
670  }
671  const UT_StringHolder & getExtraregions() const { return myExtraregions; }
672  void setExtraregions(const UT_StringHolder & val) { myExtraregions = val; }
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getExtraregions();
678  OP_Utils::evalOpParm(result, thissop, "extraregions", cookparms.getCookTime(), 0);
679  return result;
680  }
681  Resample getResample() const { return Resample(myResample); }
682  void setResample(Resample val) { myResample = int64(val); }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getResample();
687  int64 result;
688  OP_Utils::evalOpParm(result, thissop, "resample", cookparms.getCookTime(), 0);
689  return Resample(result);
690  }
691  fpreal64 getMaxaxisfraction() const { return myMaxaxisfraction; }
692  void setMaxaxisfraction(fpreal64 val) { myMaxaxisfraction = val; }
694  {
695  SOP_Node *thissop = cookparms.getNode();
696  if (!thissop) return getMaxaxisfraction();
698  OP_Utils::evalOpParm(result, thissop, "maxaxisfraction", cookparms.getCookTime(), 0);
699  return result;
700  }
701  fpreal64 getMaxlength() const { return myMaxlength; }
702  void setMaxlength(fpreal64 val) { myMaxlength = val; }
704  {
705  SOP_Node *thissop = cookparms.getNode();
706  if (!thissop) return getMaxlength();
708  OP_Utils::evalOpParm(result, thissop, "maxlength", cookparms.getCookTime(), 0);
709  return result;
710  }
711  bool getExcludeshortbones() const { return myExcludeshortbones; }
712  void setExcludeshortbones(bool val) { myExcludeshortbones = val; }
713  bool opExcludeshortbones(const SOP_NodeVerb::CookParms &cookparms) const
714  {
715  SOP_Node *thissop = cookparms.getNode();
716  if (!thissop) return getExcludeshortbones();
717  bool result;
718  OP_Utils::evalOpParm(result, thissop, "excludeshortbones", cookparms.getCookTime(), 0);
719  return result;
720  }
721  fpreal64 getExcludethreshold() const { return myExcludethreshold; }
722  void setExcludethreshold(fpreal64 val) { myExcludethreshold = val; }
724  {
725  SOP_Node *thissop = cookparms.getNode();
726  if (!thissop) return getExcludethreshold();
728  OP_Utils::evalOpParm(result, thissop, "excludethreshold", cookparms.getCookTime(), 0);
729  return result;
730  }
731  fpreal64 getFusethreshold() const { return myFusethreshold; }
732  void setFusethreshold(fpreal64 val) { myFusethreshold = val; }
734  {
735  SOP_Node *thissop = cookparms.getNode();
736  if (!thissop) return getFusethreshold();
738  OP_Utils::evalOpParm(result, thissop, "fusethreshold", cookparms.getCookTime(), 0);
739  return result;
740  }
741  bool getUsebonelink() const { return myUsebonelink; }
742  void setUsebonelink(bool val) { myUsebonelink = val; }
743  bool opUsebonelink(const SOP_NodeVerb::CookParms &cookparms) const
744  {
745  SOP_Node *thissop = cookparms.getNode();
746  if (!thissop) return getUsebonelink();
747  bool result;
748  OP_Utils::evalOpParm(result, thissop, "usebonelink", cookparms.getCookTime(), 0);
749  return result;
750  }
751  bool getUsecaptpose() const { return myUsecaptpose; }
752  void setUsecaptpose(bool val) { myUsecaptpose = val; }
753  bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
754  {
755  SOP_Node *thissop = cookparms.getNode();
756  if (!thissop) return getUsecaptpose();
757  bool result;
758  OP_Utils::evalOpParm(result, thissop, "usecaptpose", cookparms.getCookTime(), 0);
759  return result;
760  }
761  Cookat getCookat() const { return Cookat(myCookat); }
762  void setCookat(Cookat val) { myCookat = int64(val); }
763  Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
764  {
765  SOP_Node *thissop = cookparms.getNode();
766  if (!thissop) return getCookat();
767  int64 result;
768  OP_Utils::evalOpParm(result, thissop, "cookat", cookparms.getCookTime(), 0);
769  return Cookat(result);
770  }
771  fpreal64 getCaptframe() const { return myCaptframe; }
772  void setCaptframe(fpreal64 val) { myCaptframe = val; }
774  {
775  SOP_Node *thissop = cookparms.getNode();
776  if (!thissop) return getCaptframe();
778  OP_Utils::evalOpParm(result, thissop, "captframe", cookparms.getCookTime(), 0);
779  return result;
780  }
781  Captureregionsop getCaptureregionsop() const { return Captureregionsop(myCaptureregionsop); }
782  void setCaptureregionsop(Captureregionsop val) { myCaptureregionsop = int64(val); }
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return getCaptureregionsop();
787  int64 result;
788  OP_Utils::evalOpParm(result, thissop, "captureregionsop", cookparms.getCookTime(), 0);
789  return Captureregionsop(result);
790  }
791  bool getDosubnets() const { return myDosubnets; }
792  void setDosubnets(bool val) { myDosubnets = val; }
793  bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
794  {
795  SOP_Node *thissop = cookparms.getNode();
796  if (!thissop) return getDosubnets();
797  bool result;
798  OP_Utils::evalOpParm(result, thissop, "dosubnets", cookparms.getCookTime(), 0);
799  return result;
800  }
801  bool getRelativeskel() const { return myRelativeskel; }
802  void setRelativeskel(bool val) { myRelativeskel = val; }
803  bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
804  {
805  SOP_Node *thissop = cookparms.getNode();
806  if (!thissop) return getRelativeskel();
807  bool result;
808  OP_Utils::evalOpParm(result, thissop, "relativeskel", cookparms.getCookTime(), 0);
809  return result;
810  }
811 
812 private:
813  UT_StringHolder myGroup;
814  UT_StringHolder myRootpath;
815  UT_StringHolder myExtraregions;
816  int64 myResample;
817  fpreal64 myMaxaxisfraction;
818  fpreal64 myMaxlength;
819  bool myExcludeshortbones;
820  fpreal64 myExcludethreshold;
821  fpreal64 myFusethreshold;
822  bool myUsebonelink;
823  bool myUsecaptpose;
824  int64 myCookat;
825  fpreal64 myCaptframe;
826  int64 myCaptureregionsop;
827  bool myDosubnets;
828  bool myRelativeskel;
829 
830 };
type
Definition: core.h:556
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator!=(const SOP_BoneCaptureLinesParms &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setCaptureregionsop(Captureregionsop val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
Captureregionsop getCaptureregionsop() const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
static void saveData(std::ostream &os, UT_Matrix4D v)
An output stream object that owns its own string buffer storage.
Resample opResample(const SOP_NodeVerb::CookParms &cookparms) const
bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
fpreal64 opFusethreshold(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
fpreal64 opMaxlength(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
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 loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
double fpreal64
Definition: SYS_Types.h:201
static void loadData(UT_IStream &is, int64 &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
UT_StringHolder opRootpath(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setExtraregions(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint length() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
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 copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opUsebonelink(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getExtraregions() const
static void saveData(std::ostream &os, int64 v)
bool isParmColorRamp(exint idx) const override
long long int64
Definition: SYS_Types.h:116
Captureregionsop opCaptureregionsop(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opExtraregions(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExcludethreshold(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const SOP_BoneCaptureLinesParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GT_API const UT_StringHolder version
SYS_FORCE_INLINE UT_StringHolder getToken(Resample enum_value)
void save(std::ostream &os) const
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_StringHolder & getRootpath() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
static void saveData(std::ostream &os, fpreal64 v)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setRootpath(const UT_StringHolder &val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
bool opExcludeshortbones(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
fpreal64 opMaxaxisfraction(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opCaptframe(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void saveData(std::ostream &os, bool v)