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