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 <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_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  return true;
136  }
138  {
139  return !operator==(src);
140  }
144 
145 
146 
147  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
148  {
149  myGroup = ""_UTsh;
150  if (true)
151  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
152  myRootpath = ""_UTsh;
153  if (true)
154  graph->evalOpParm(myRootpath, nodeidx, "rootpath", time, 0);
155  myExtraregions = ""_UTsh;
156  if (true)
157  graph->evalOpParm(myExtraregions, nodeidx, "extraregions", time, 0);
158  myResample = 1;
159  if (true)
160  graph->evalOpParm(myResample, nodeidx, "resample", time, 0);
161  myMaxaxisfraction = 0.01;
162  if (true && ( (true&&!(((int64(getResample())!=1))||((int64(getResample())!=1)))) ) )
163  graph->evalOpParm(myMaxaxisfraction, nodeidx, "maxaxisfraction", time, 0);
164  myMaxlength = 0.1;
165  if (true && ( (true&&!(((int64(getResample())!=2))||((int64(getResample())!=2)))) ) )
166  graph->evalOpParm(myMaxlength, nodeidx, "maxlength", time, 0);
167  myExcludeshortbones = true;
168  if (true)
169  graph->evalOpParm(myExcludeshortbones, nodeidx, "excludeshortbones", time, 0);
170  myExcludethreshold = 0.001;
171  if (true && ( (true&&!(((getExcludeshortbones()==0)))) ) )
172  graph->evalOpParm(myExcludethreshold, nodeidx, "excludethreshold", time, 0);
173  myFusethreshold = 0.001;
174  if (true)
175  graph->evalOpParm(myFusethreshold, nodeidx, "fusethreshold", time, 0);
176  myUsebonelink = false;
177  if (true)
178  graph->evalOpParm(myUsebonelink, nodeidx, "usebonelink", time, 0);
179  myUsecaptpose = true;
180  if (true)
181  graph->evalOpParm(myUsecaptpose, nodeidx, "usecaptpose", time, 0);
182  myCookat = 0;
183  if (true && ( (true&&!(((getUsecaptpose()!=0)))) ) )
184  graph->evalOpParm(myCookat, nodeidx, "cookat", time, 0);
185  myCaptframe = 0;
186  if (true && ( (true&&!(((getUsecaptpose()!=0))||((int64(getCookat())==1)))) ) )
187  graph->evalOpParm(myCaptframe, nodeidx, "captframe", time, 0);
188  myCaptureregionsop = 2;
189  if (true)
190  graph->evalOpParm(myCaptureregionsop, nodeidx, "captureregionsop", time, 0);
191  myDosubnets = false;
192  if (true)
193  graph->evalOpParm(myDosubnets, nodeidx, "dosubnets", time, 0);
194  myRelativeskel = true;
195  if (true)
196  graph->evalOpParm(myRelativeskel, nodeidx, "relativeskel", time, 0);
197 
198  }
199 
200 
201  void loadFromOpSubclass(const LoadParms &loadparms) override
202  {
203  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
204  }
205 
206 
207  void copyFrom(const OP_NodeParms *src) override
208  {
209  *this = *((const SOP_BoneCaptureLinesParms *)src);
210  }
211 
212  template <typename T>
213  void
214  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
215  {
216  if (idx.size() < 1)
217  return;
218  UT_ASSERT(idx.size() == instance.size()+1);
219  if (idx.size() != instance.size()+1)
220  return;
221  switch (idx[0])
222  {
223  case 0:
224  coerceValue(value, myGroup);
225  break;
226  case 1:
227  coerceValue(value, myRootpath);
228  break;
229  case 2:
230  coerceValue(value, myExtraregions);
231  break;
232  case 3:
233  coerceValue(value, myResample);
234  break;
235  case 4:
236  coerceValue(value, myMaxaxisfraction);
237  break;
238  case 5:
239  coerceValue(value, myMaxlength);
240  break;
241  case 6:
242  coerceValue(value, myExcludeshortbones);
243  break;
244  case 7:
245  coerceValue(value, myExcludethreshold);
246  break;
247  case 8:
248  coerceValue(value, myFusethreshold);
249  break;
250  case 9:
251  coerceValue(value, myUsebonelink);
252  break;
253  case 10:
254  coerceValue(value, myUsecaptpose);
255  break;
256  case 11:
257  coerceValue(value, myCookat);
258  break;
259  case 12:
260  coerceValue(value, myCaptframe);
261  break;
262  case 13:
263  coerceValue(value, myCaptureregionsop);
264  break;
265  case 14:
266  coerceValue(value, myDosubnets);
267  break;
268  case 15:
269  coerceValue(value, myRelativeskel);
270  break;
271 
272  }
273  }
274 
275  bool isParmColorRamp(exint idx) const override
276  {
277  switch (idx)
278  {
279 
280  }
281  return false;
282  }
283 
284  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
289  { doGetParmValue(idx, instance, value); }
290  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
291  { doGetParmValue(idx, instance, value); }
292  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
305  { doGetParmValue(idx, instance, value); }
306 
307  template <typename T>
308  void
309  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
310  {
311  if (idx.size() < 1)
312  return;
313  UT_ASSERT(idx.size() == instance.size()+1);
314  if (idx.size() != instance.size()+1)
315  return;
316  switch (idx[0])
317  {
318  case 0:
319  coerceValue(myGroup, ( ( value ) ));
320  break;
321  case 1:
322  coerceValue(myRootpath, ( ( value ) ));
323  break;
324  case 2:
325  coerceValue(myExtraregions, ( ( value ) ));
326  break;
327  case 3:
328  coerceValue(myResample, clampMinValue(0, clampMaxValue(2, value ) ));
329  break;
330  case 4:
331  coerceValue(myMaxaxisfraction, ( ( value ) ));
332  break;
333  case 5:
334  coerceValue(myMaxlength, ( ( value ) ));
335  break;
336  case 6:
337  coerceValue(myExcludeshortbones, ( ( value ) ));
338  break;
339  case 7:
340  coerceValue(myExcludethreshold, ( ( value ) ));
341  break;
342  case 8:
343  coerceValue(myFusethreshold, ( ( value ) ));
344  break;
345  case 9:
346  coerceValue(myUsebonelink, ( ( value ) ));
347  break;
348  case 10:
349  coerceValue(myUsecaptpose, ( ( value ) ));
350  break;
351  case 11:
352  coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
353  break;
354  case 12:
355  coerceValue(myCaptframe, ( ( value ) ));
356  break;
357  case 13:
358  coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
359  break;
360  case 14:
361  coerceValue(myDosubnets, ( ( value ) ));
362  break;
363  case 15:
364  coerceValue(myRelativeskel, ( ( value ) ));
365  break;
366 
367  }
368  }
369 
370  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
387  { doSetParmValue(idx, instance, value); }
388  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
389  { doSetParmValue(idx, instance, value); }
390  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
391  { doSetParmValue(idx, instance, value); }
392 
393  exint getNestNumParms(TempIndex idx) const override
394  {
395  if (idx.size() == 0)
396  return 16;
397  switch (idx[0])
398  {
399 
400  }
401  // Invalid
402  return 0;
403  }
404 
405  const char *getNestParmName(TempIndex fieldnum) const override
406  {
407  if (fieldnum.size() < 1)
408  return 0;
409  switch (fieldnum[0])
410  {
411  case 0:
412  return "group";
413  case 1:
414  return "rootpath";
415  case 2:
416  return "extraregions";
417  case 3:
418  return "resample";
419  case 4:
420  return "maxaxisfraction";
421  case 5:
422  return "maxlength";
423  case 6:
424  return "excludeshortbones";
425  case 7:
426  return "excludethreshold";
427  case 8:
428  return "fusethreshold";
429  case 9:
430  return "usebonelink";
431  case 10:
432  return "usecaptpose";
433  case 11:
434  return "cookat";
435  case 12:
436  return "captframe";
437  case 13:
438  return "captureregionsop";
439  case 14:
440  return "dosubnets";
441  case 15:
442  return "relativeskel";
443 
444  }
445  return 0;
446  }
447 
448  ParmType getNestParmType(TempIndex fieldnum) const override
449  {
450  if (fieldnum.size() < 1)
451  return PARM_UNSUPPORTED;
452  switch (fieldnum[0])
453  {
454  case 0:
455  return PARM_STRING;
456  case 1:
457  return PARM_STRING;
458  case 2:
459  return PARM_STRING;
460  case 3:
461  return PARM_INTEGER;
462  case 4:
463  return PARM_FLOAT;
464  case 5:
465  return PARM_FLOAT;
466  case 6:
467  return PARM_INTEGER;
468  case 7:
469  return PARM_FLOAT;
470  case 8:
471  return PARM_FLOAT;
472  case 9:
473  return PARM_INTEGER;
474  case 10:
475  return PARM_INTEGER;
476  case 11:
477  return PARM_INTEGER;
478  case 12:
479  return PARM_FLOAT;
480  case 13:
481  return PARM_INTEGER;
482  case 14:
483  return PARM_INTEGER;
484  case 15:
485  return PARM_INTEGER;
486 
487  }
488  return PARM_UNSUPPORTED;
489  }
490 
491  // Boiler plate to load individual types.
492  static void loadData(UT_IStream &is, int64 &v)
493  { is.bread(&v, 1); }
494  static void loadData(UT_IStream &is, bool &v)
495  { int64 iv; is.bread(&iv, 1); v = iv; }
496  static void loadData(UT_IStream &is, fpreal64 &v)
497  { is.bread<fpreal64>(&v, 1); }
498  static void loadData(UT_IStream &is, UT_Vector2D &v)
499  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
500  static void loadData(UT_IStream &is, UT_Vector3D &v)
501  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
502  is.bread<fpreal64>(&v.z(), 1); }
503  static void loadData(UT_IStream &is, UT_Vector4D &v)
504  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
505  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
506  static void loadData(UT_IStream &is, UT_Matrix2D &v)
507  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
508  static void loadData(UT_IStream &is, UT_Matrix3D &v)
509  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
510  static void loadData(UT_IStream &is, UT_Matrix4D &v)
511  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
512  static void loadData(UT_IStream &is, UT_Vector2I &v)
513  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
514  static void loadData(UT_IStream &is, UT_Vector3I &v)
515  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
516  is.bread<int64>(&v.z(), 1); }
517  static void loadData(UT_IStream &is, UT_Vector4I &v)
518  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
519  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
521  { is.bread(v); }
523  { UT_StringHolder rampdata;
524  loadData(is, rampdata);
525  if (rampdata.isstring())
526  {
527  v.reset(new UT_Ramp());
528  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
529  v->load(istr);
530  }
531  else v.reset();
532  }
535  loadData(is, data);
536  if (data.isstring())
537  {
538  // Find the data type.
539  const char *colon = UT_StringWrap(data).findChar(':');
540  if (colon)
541  {
542  int typelen = colon - data.buffer();
544  type.strncpy(data.buffer(), typelen);
545  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
546 
547  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
548  }
549  }
550  else v.reset();
551  }
552 
553  static void saveData(std::ostream &os, int64 v)
554  { UTwrite(os, &v); }
555  static void saveData(std::ostream &os, bool v)
556  { int64 iv = v; UTwrite(os, &iv); }
557  static void saveData(std::ostream &os, fpreal64 v)
558  { UTwrite<fpreal64>(os, &v); }
559  static void saveData(std::ostream &os, UT_Vector2D v)
560  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
561  static void saveData(std::ostream &os, UT_Vector3D v)
562  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
563  UTwrite<fpreal64>(os, &v.z()); }
564  static void saveData(std::ostream &os, UT_Vector4D v)
565  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
566  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
567  static void saveData(std::ostream &os, UT_Matrix2D v)
569  static void saveData(std::ostream &os, UT_Matrix3D v)
571  static void saveData(std::ostream &os, UT_Matrix4D v)
573  static void saveData(std::ostream &os, UT_StringHolder s)
574  { UT_StringWrap(s).saveBinary(os); }
575  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
577  UT_OStringStream ostr;
578  if (s) s->save(ostr);
579  result = ostr.str();
580  saveData(os, result);
581  }
582  static void saveData(std::ostream &os, PRM_DataItemHandle s)
584  UT_OStringStream ostr;
585  if (s)
586  {
587  ostr << s->getDataTypeToken();
588  ostr << ":";
589  s->saveBinary(ostr);
590  }
591  result = ostr.str();
592  saveData(os, result);
593  }
594 
595 
596  void save(std::ostream &os) const
597  {
598  int32 v = version();
599  UTwrite(os, &v);
600  saveData(os, myGroup);
601  saveData(os, myRootpath);
602  saveData(os, myExtraregions);
603  saveData(os, myResample);
604  saveData(os, myMaxaxisfraction);
605  saveData(os, myMaxlength);
606  saveData(os, myExcludeshortbones);
607  saveData(os, myExcludethreshold);
608  saveData(os, myFusethreshold);
609  saveData(os, myUsebonelink);
610  saveData(os, myUsecaptpose);
611  saveData(os, myCookat);
612  saveData(os, myCaptframe);
613  saveData(os, myCaptureregionsop);
614  saveData(os, myDosubnets);
615  saveData(os, myRelativeskel);
616 
617  }
618 
619  bool load(UT_IStream &is)
620  {
621  int32 v;
622  is.bread(&v, 1);
623  if (version() != v)
624  {
625  // Fail incompatible versions
626  return false;
627  }
628  loadData(is, myGroup);
629  loadData(is, myRootpath);
630  loadData(is, myExtraregions);
631  loadData(is, myResample);
632  loadData(is, myMaxaxisfraction);
633  loadData(is, myMaxlength);
634  loadData(is, myExcludeshortbones);
635  loadData(is, myExcludethreshold);
636  loadData(is, myFusethreshold);
637  loadData(is, myUsebonelink);
638  loadData(is, myUsecaptpose);
639  loadData(is, myCookat);
640  loadData(is, myCaptframe);
641  loadData(is, myCaptureregionsop);
642  loadData(is, myDosubnets);
643  loadData(is, myRelativeskel);
644 
645  return true;
646  }
647 
648  const UT_StringHolder & getGroup() const { return myGroup; }
649  void setGroup(const UT_StringHolder & val) { myGroup = val; }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getGroup();
655  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
656  return result;
657  }
658  const UT_StringHolder & getRootpath() const { return myRootpath; }
659  void setRootpath(const UT_StringHolder & val) { myRootpath = val; }
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getRootpath();
665  OP_Utils::evalOpParm(result, thissop, "rootpath", cookparms.getCookTime(), 0);
666  return result;
667  }
668  const UT_StringHolder & getExtraregions() const { return myExtraregions; }
669  void setExtraregions(const UT_StringHolder & val) { myExtraregions = val; }
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getExtraregions();
675  OP_Utils::evalOpParm(result, thissop, "extraregions", cookparms.getCookTime(), 0);
676  return result;
677  }
678  Resample getResample() const { return Resample(myResample); }
679  void setResample(Resample val) { myResample = int64(val); }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getResample();
684  int64 result;
685  OP_Utils::evalOpParm(result, thissop, "resample", cookparms.getCookTime(), 0);
686  return Resample(result);
687  }
688  fpreal64 getMaxaxisfraction() const { return myMaxaxisfraction; }
689  void setMaxaxisfraction(fpreal64 val) { myMaxaxisfraction = val; }
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getMaxaxisfraction();
695  OP_Utils::evalOpParm(result, thissop, "maxaxisfraction", cookparms.getCookTime(), 0);
696  return result;
697  }
698  fpreal64 getMaxlength() const { return myMaxlength; }
699  void setMaxlength(fpreal64 val) { myMaxlength = val; }
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getMaxlength();
705  OP_Utils::evalOpParm(result, thissop, "maxlength", cookparms.getCookTime(), 0);
706  return result;
707  }
708  bool getExcludeshortbones() const { return myExcludeshortbones; }
709  void setExcludeshortbones(bool val) { myExcludeshortbones = val; }
710  bool opExcludeshortbones(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getExcludeshortbones();
714  bool result;
715  OP_Utils::evalOpParm(result, thissop, "excludeshortbones", cookparms.getCookTime(), 0);
716  return result;
717  }
718  fpreal64 getExcludethreshold() const { return myExcludethreshold; }
719  void setExcludethreshold(fpreal64 val) { myExcludethreshold = val; }
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getExcludethreshold();
725  OP_Utils::evalOpParm(result, thissop, "excludethreshold", cookparms.getCookTime(), 0);
726  return result;
727  }
728  fpreal64 getFusethreshold() const { return myFusethreshold; }
729  void setFusethreshold(fpreal64 val) { myFusethreshold = val; }
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getFusethreshold();
735  OP_Utils::evalOpParm(result, thissop, "fusethreshold", cookparms.getCookTime(), 0);
736  return result;
737  }
738  bool getUsebonelink() const { return myUsebonelink; }
739  void setUsebonelink(bool val) { myUsebonelink = val; }
740  bool opUsebonelink(const SOP_NodeVerb::CookParms &cookparms) const
741  {
742  SOP_Node *thissop = cookparms.getNode();
743  if (!thissop) return getUsebonelink();
744  bool result;
745  OP_Utils::evalOpParm(result, thissop, "usebonelink", cookparms.getCookTime(), 0);
746  return result;
747  }
748  bool getUsecaptpose() const { return myUsecaptpose; }
749  void setUsecaptpose(bool val) { myUsecaptpose = val; }
750  bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
751  {
752  SOP_Node *thissop = cookparms.getNode();
753  if (!thissop) return getUsecaptpose();
754  bool result;
755  OP_Utils::evalOpParm(result, thissop, "usecaptpose", cookparms.getCookTime(), 0);
756  return result;
757  }
758  Cookat getCookat() const { return Cookat(myCookat); }
759  void setCookat(Cookat val) { myCookat = int64(val); }
760  Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
761  {
762  SOP_Node *thissop = cookparms.getNode();
763  if (!thissop) return getCookat();
764  int64 result;
765  OP_Utils::evalOpParm(result, thissop, "cookat", cookparms.getCookTime(), 0);
766  return Cookat(result);
767  }
768  fpreal64 getCaptframe() const { return myCaptframe; }
769  void setCaptframe(fpreal64 val) { myCaptframe = val; }
771  {
772  SOP_Node *thissop = cookparms.getNode();
773  if (!thissop) return getCaptframe();
775  OP_Utils::evalOpParm(result, thissop, "captframe", cookparms.getCookTime(), 0);
776  return result;
777  }
778  Captureregionsop getCaptureregionsop() const { return Captureregionsop(myCaptureregionsop); }
779  void setCaptureregionsop(Captureregionsop val) { myCaptureregionsop = int64(val); }
781  {
782  SOP_Node *thissop = cookparms.getNode();
783  if (!thissop) return getCaptureregionsop();
784  int64 result;
785  OP_Utils::evalOpParm(result, thissop, "captureregionsop", cookparms.getCookTime(), 0);
786  return Captureregionsop(result);
787  }
788  bool getDosubnets() const { return myDosubnets; }
789  void setDosubnets(bool val) { myDosubnets = val; }
790  bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
791  {
792  SOP_Node *thissop = cookparms.getNode();
793  if (!thissop) return getDosubnets();
794  bool result;
795  OP_Utils::evalOpParm(result, thissop, "dosubnets", cookparms.getCookTime(), 0);
796  return result;
797  }
798  bool getRelativeskel() const { return myRelativeskel; }
799  void setRelativeskel(bool val) { myRelativeskel = val; }
800  bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
801  {
802  SOP_Node *thissop = cookparms.getNode();
803  if (!thissop) return getRelativeskel();
804  bool result;
805  OP_Utils::evalOpParm(result, thissop, "relativeskel", cookparms.getCookTime(), 0);
806  return result;
807  }
808 
809 private:
810  UT_StringHolder myGroup;
811  UT_StringHolder myRootpath;
812  UT_StringHolder myExtraregions;
813  int64 myResample;
814  fpreal64 myMaxaxisfraction;
815  fpreal64 myMaxlength;
816  bool myExcludeshortbones;
817  fpreal64 myExcludethreshold;
818  fpreal64 myFusethreshold;
819  bool myUsebonelink;
820  bool myUsecaptpose;
821  int64 myCookat;
822  fpreal64 myCaptframe;
823  int64 myCaptureregionsop;
824  bool myDosubnets;
825  bool myRelativeskel;
826 
827 };
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:62
static void loadData(UT_IStream &is, UT_Vector2D &v)
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:613
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)
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:296
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:277
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:92
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
static void saveData(std::ostream &os, fpreal64 v)
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
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:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
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
type
Definition: core.h:1059
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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)