HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_ProximityCapture.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 using namespace UT::Literal;
23 
24 class DEP_MicroNode;
25 namespace SOP_ProximityCaptureEnums
26 {
27  enum class Captureregionsop
28  {
29  DISPLAY = 0,
30  RENDER,
31  CAPTURE
32  };
33  enum class Cookat
34  {
35  CAPTUREFRAME = 0,
36  EVERYFRAME
37  };
38  enum class Weightmethod
39  {
42  };
43  enum class Weightfrom
44  {
45  CV = 0,
46  SURFACE
47  };
48  enum class Color
49  {
50  COLDEFAULT = 0,
51  COLREGION
52  };
53 }
54 
55 
57 {
58 public:
59  static int version() { return 1; }
60 
62  {
63  myGroup = ""_sh;
64  myCapturegroup = ""_sh;
65  myRootpath = ""_sh;
66  myExtraregions = ""_sh;
67  myCaptureregionsop = 2;
68  myDosubnets = false;
69  myRelativeskel = true;
70  myUsecaptpose = false;
71  myCookat = 0;
72  myCaptframe = 0;
73  myWeightmethod = 0;
74  myWeightfrom = 0;
75  myDropoff = 1;
76  myMaxinfluences = 2;
77  myNormweights = true;
78  myDestroyweights = true;
79  myBlendfactor = 1;
80  myColor = 0;
81  myZeroweightcolor = UT_Vector3D(1,1,1);
82 
83  }
84 
85  explicit SOP_ProximityCaptureParms(const SOP_ProximityCaptureParms &) = default;
86 
88 
90  {
91  if (myGroup != src.myGroup) return false;
92  if (myCapturegroup != src.myCapturegroup) return false;
93  if (myRootpath != src.myRootpath) return false;
94  if (myExtraregions != src.myExtraregions) return false;
95  if (myCaptureregionsop != src.myCaptureregionsop) return false;
96  if (myDosubnets != src.myDosubnets) return false;
97  if (myRelativeskel != src.myRelativeskel) return false;
98  if (myUsecaptpose != src.myUsecaptpose) return false;
99  if (myCookat != src.myCookat) return false;
100  if (myCaptframe != src.myCaptframe) return false;
101  if (myWeightmethod != src.myWeightmethod) return false;
102  if (myWeightfrom != src.myWeightfrom) return false;
103  if (myDropoff != src.myDropoff) return false;
104  if (myMaxinfluences != src.myMaxinfluences) return false;
105  if (myNormweights != src.myNormweights) return false;
106  if (myDestroyweights != src.myDestroyweights) return false;
107  if (myBlendfactor != src.myBlendfactor) return false;
108  if (myColor != src.myColor) return false;
109  if (myZeroweightcolor != src.myZeroweightcolor) return false;
110 
111  return true;
112  }
114  {
115  return !operator==(src);
116  }
122 
123 
124 
125  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
126  {
127  myGroup = ""_sh;
128  if (true)
129  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
130  myCapturegroup = ""_sh;
131  if (true)
132  graph->evalOpParm(myCapturegroup, nodeidx, "capturegroup", time, 0);
133  myRootpath = ""_sh;
134  if (true)
135  graph->evalOpParm(myRootpath, nodeidx, "rootpath", time, 0);
136  myExtraregions = ""_sh;
137  if (true)
138  graph->evalOpParm(myExtraregions, nodeidx, "extraregions", time, 0);
139  myCaptureregionsop = 2;
140  if (true)
141  graph->evalOpParm(myCaptureregionsop, nodeidx, "captureregionsop", time, 0);
142  myDosubnets = false;
143  if (true)
144  graph->evalOpParm(myDosubnets, nodeidx, "dosubnets", time, 0);
145  myRelativeskel = true;
146  if (true)
147  graph->evalOpParm(myRelativeskel, nodeidx, "relativeskel", time, 0);
148  myUsecaptpose = false;
149  if (true)
150  graph->evalOpParm(myUsecaptpose, nodeidx, "usecaptpose", time, 0);
151  myCookat = 0;
152  if (true && ( (true&&!(((getUsecaptpose()!=0)))) ) )
153  graph->evalOpParm(myCookat, nodeidx, "cookat", time, 0);
154  myCaptframe = 0;
155  if (true && ( (true&&!(((getUsecaptpose()!=0))||((int64(getCookat())==1)))) ) )
156  graph->evalOpParm(myCaptframe, nodeidx, "captframe", time, 0);
157  myWeightmethod = 0;
158  if (true)
159  graph->evalOpParm(myWeightmethod, nodeidx, "weightmethod", time, 0);
160  myWeightfrom = 0;
161  if (true)
162  graph->evalOpParm(myWeightfrom, nodeidx, "weightFrom", time, 0);
163  myDropoff = 1;
164  if (true)
165  graph->evalOpParm(myDropoff, nodeidx, "dropoff", time, 0);
166  myMaxinfluences = 2;
167  if (true)
168  graph->evalOpParm(myMaxinfluences, nodeidx, "maxinfluences", time, 0);
169  myNormweights = true;
170  if (true)
171  graph->evalOpParm(myNormweights, nodeidx, "normweights", time, 0);
172  myDestroyweights = true;
173  if (true)
174  graph->evalOpParm(myDestroyweights, nodeidx, "destroyweights", time, 0);
175  myBlendfactor = 1;
176  if (true && ( (true&&!(((getDestroyweights()!=0)))) ) )
177  graph->evalOpParm(myBlendfactor, nodeidx, "blendfactor", time, 0);
178  myColor = 0;
179  if (true)
180  graph->evalOpParm(myColor, nodeidx, "color", time, 0);
181  myZeroweightcolor = UT_Vector3D(1,1,1);
182  if (true)
183  graph->evalOpParm(myZeroweightcolor, nodeidx, "zeroweightcolor", time, 0);
184 
185  }
186 
187 
188  void loadFromOpSubclass(const LoadParms &loadparms) override
189  {
190  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
191  }
192 
193 
194  void copyFrom(const SOP_NodeParms *src) override
195  {
196  *this = *((const SOP_ProximityCaptureParms *)src);
197  }
198 
199  template <typename T>
200  void
201  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
202  {
203  if (idx.size() < 1)
204  return;
205  UT_ASSERT(idx.size() == instance.size()+1);
206  if (idx.size() != instance.size()+1)
207  return;
208  switch (idx[0])
209  {
210  case 0:
211  coerceValue(value, myGroup);
212  break;
213  case 1:
214  coerceValue(value, myCapturegroup);
215  break;
216  case 2:
217  coerceValue(value, myRootpath);
218  break;
219  case 3:
220  coerceValue(value, myExtraregions);
221  break;
222  case 4:
223  coerceValue(value, myCaptureregionsop);
224  break;
225  case 5:
226  coerceValue(value, myDosubnets);
227  break;
228  case 6:
229  coerceValue(value, myRelativeskel);
230  break;
231  case 7:
232  coerceValue(value, myUsecaptpose);
233  break;
234  case 8:
235  coerceValue(value, myCookat);
236  break;
237  case 9:
238  coerceValue(value, myCaptframe);
239  break;
240  case 10:
241  coerceValue(value, myWeightmethod);
242  break;
243  case 11:
244  coerceValue(value, myWeightfrom);
245  break;
246  case 12:
247  coerceValue(value, myDropoff);
248  break;
249  case 13:
250  coerceValue(value, myMaxinfluences);
251  break;
252  case 14:
253  coerceValue(value, myNormweights);
254  break;
255  case 15:
256  coerceValue(value, myDestroyweights);
257  break;
258  case 16:
259  coerceValue(value, myBlendfactor);
260  break;
261  case 17:
262  coerceValue(value, myColor);
263  break;
264  case 18:
265  coerceValue(value, myZeroweightcolor);
266  break;
267 
268  }
269  }
270 
271  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
288  { doGetParmValue(idx, instance, value); }
289  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
290  { doGetParmValue(idx, instance, value); }
291  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
292  { doGetParmValue(idx, instance, value); }
293 
294  template <typename T>
295  void
296  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
297  {
298  if (idx.size() < 1)
299  return;
300  UT_ASSERT(idx.size() == instance.size()+1);
301  if (idx.size() != instance.size()+1)
302  return;
303  switch (idx[0])
304  {
305  case 0:
306  coerceValue(myGroup, ( ( value ) ));
307  break;
308  case 1:
309  coerceValue(myCapturegroup, ( ( value ) ));
310  break;
311  case 2:
312  coerceValue(myRootpath, ( ( value ) ));
313  break;
314  case 3:
315  coerceValue(myExtraregions, ( ( value ) ));
316  break;
317  case 4:
318  coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
319  break;
320  case 5:
321  coerceValue(myDosubnets, ( ( value ) ));
322  break;
323  case 6:
324  coerceValue(myRelativeskel, ( ( value ) ));
325  break;
326  case 7:
327  coerceValue(myUsecaptpose, ( ( value ) ));
328  break;
329  case 8:
330  coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
331  break;
332  case 9:
333  coerceValue(myCaptframe, ( ( value ) ));
334  break;
335  case 10:
336  coerceValue(myWeightmethod, clampMinValue(0, clampMaxValue(1, value ) ));
337  break;
338  case 11:
339  coerceValue(myWeightfrom, clampMinValue(0, clampMaxValue(1, value ) ));
340  break;
341  case 12:
342  coerceValue(myDropoff, clampMinValue(0.001, ( value ) ));
343  break;
344  case 13:
345  coerceValue(myMaxinfluences, clampMinValue(1, ( value ) ));
346  break;
347  case 14:
348  coerceValue(myNormweights, ( ( value ) ));
349  break;
350  case 15:
351  coerceValue(myDestroyweights, ( ( value ) ));
352  break;
353  case 16:
354  coerceValue(myBlendfactor, ( ( value ) ));
355  break;
356  case 17:
357  coerceValue(myColor, clampMinValue(0, clampMaxValue(1, value ) ));
358  break;
359  case 18:
360  coerceValue(myZeroweightcolor, ( ( value ) ));
361  break;
362 
363  }
364  }
365 
366  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
367  { doSetParmValue(idx, instance, value); }
368  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
383  { doSetParmValue(idx, instance, value); }
384  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
385  { doSetParmValue(idx, instance, value); }
386  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
387  { doSetParmValue(idx, instance, value); }
388 
389  exint getNestNumParms(TempIndex idx) const override
390  {
391  if (idx.size() == 0)
392  return 19;
393  switch (idx[0])
394  {
395 
396  }
397  // Invalid
398  return 0;
399  }
400 
401  const char *getNestParmName(TempIndex fieldnum) const override
402  {
403  if (fieldnum.size() < 1)
404  return 0;
405  switch (fieldnum[0])
406  {
407  case 0:
408  return "group";
409  case 1:
410  return "capturegroup";
411  case 2:
412  return "rootpath";
413  case 3:
414  return "extraregions";
415  case 4:
416  return "captureregionsop";
417  case 5:
418  return "dosubnets";
419  case 6:
420  return "relativeskel";
421  case 7:
422  return "usecaptpose";
423  case 8:
424  return "cookat";
425  case 9:
426  return "captframe";
427  case 10:
428  return "weightmethod";
429  case 11:
430  return "weightFrom";
431  case 12:
432  return "dropoff";
433  case 13:
434  return "maxinfluences";
435  case 14:
436  return "normweights";
437  case 15:
438  return "destroyweights";
439  case 16:
440  return "blendfactor";
441  case 17:
442  return "color";
443  case 18:
444  return "zeroweightcolor";
445 
446  }
447  return 0;
448  }
449 
450  ParmType getNestParmType(TempIndex fieldnum) const override
451  {
452  if (fieldnum.size() < 1)
453  return PARM_UNSUPPORTED;
454  switch (fieldnum[0])
455  {
456  case 0:
457  return PARM_STRING;
458  case 1:
459  return PARM_STRING;
460  case 2:
461  return PARM_STRING;
462  case 3:
463  return PARM_STRING;
464  case 4:
465  return PARM_INTEGER;
466  case 5:
467  return PARM_INTEGER;
468  case 6:
469  return PARM_INTEGER;
470  case 7:
471  return PARM_INTEGER;
472  case 8:
473  return PARM_INTEGER;
474  case 9:
475  return PARM_FLOAT;
476  case 10:
477  return PARM_INTEGER;
478  case 11:
479  return PARM_INTEGER;
480  case 12:
481  return PARM_FLOAT;
482  case 13:
483  return PARM_INTEGER;
484  case 14:
485  return PARM_INTEGER;
486  case 15:
487  return PARM_INTEGER;
488  case 16:
489  return PARM_FLOAT;
490  case 17:
491  return PARM_INTEGER;
492  case 18:
493  return PARM_VECTOR3;
494 
495  }
496  return PARM_UNSUPPORTED;
497  }
498 
499  // Boiler plate to load individual types.
500  static void loadData(UT_IStream &is, int64 &v)
501  { is.bread(&v, 1); }
502  static void loadData(UT_IStream &is, bool &v)
503  { int64 iv; is.bread(&iv, 1); v = iv; }
504  static void loadData(UT_IStream &is, fpreal64 &v)
505  { is.bread<fpreal64>(&v, 1); }
506  static void loadData(UT_IStream &is, UT_Vector2D &v)
507  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
508  static void loadData(UT_IStream &is, UT_Vector3D &v)
509  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
510  is.bread<fpreal64>(&v.z(), 1); }
511  static void loadData(UT_IStream &is, UT_Vector4D &v)
512  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
513  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
514  static void loadData(UT_IStream &is, UT_Matrix2D &v)
515  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
516  static void loadData(UT_IStream &is, UT_Matrix3D &v)
517  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
518  static void loadData(UT_IStream &is, UT_Matrix4D &v)
519  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
520  static void loadData(UT_IStream &is, UT_Vector2I &v)
521  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
522  static void loadData(UT_IStream &is, UT_Vector3I &v)
523  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
524  is.bread<int64>(&v.z(), 1); }
525  static void loadData(UT_IStream &is, UT_Vector4I &v)
526  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
527  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
529  { is.bread(v); }
531  { UT_StringHolder rampdata;
532  loadData(is, rampdata);
533  if (rampdata.isstring())
534  {
535  v.reset(new UT_Ramp());
536  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
537  v->load(istr);
538  }
539  else v.reset();
540  }
543  loadData(is, data);
544  if (data.isstring())
545  {
546  // Find the data type.
547  const char *colon = UT_StringWrap(data).findChar(':');
548  if (colon)
549  {
550  int typelen = colon - data.buffer();
552  type.strncpy(data.buffer(), typelen);
553  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
554 
555  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
556  }
557  }
558  else v.reset();
559  }
560 
561  static void saveData(std::ostream &os, int64 v)
562  { UTwrite(os, &v); }
563  static void saveData(std::ostream &os, bool v)
564  { int64 iv = v; UTwrite(os, &iv); }
565  static void saveData(std::ostream &os, fpreal64 v)
566  { UTwrite<fpreal64>(os, &v); }
567  static void saveData(std::ostream &os, UT_Vector2D v)
568  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
569  static void saveData(std::ostream &os, UT_Vector3D v)
570  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
571  UTwrite<fpreal64>(os, &v.z()); }
572  static void saveData(std::ostream &os, UT_Vector4D v)
573  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
574  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
575  static void saveData(std::ostream &os, UT_Matrix2D v)
577  static void saveData(std::ostream &os, UT_Matrix3D v)
579  static void saveData(std::ostream &os, UT_Matrix4D v)
581  static void saveData(std::ostream &os, UT_StringHolder s)
582  { UT_StringWrap(s).saveBinary(os); }
583  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
585  UT_OStringStream ostr;
586  if (s) s->save(ostr);
587  result = ostr.str();
588  saveData(os, result);
589  }
590  static void saveData(std::ostream &os, PRM_DataItemHandle s)
592  UT_OStringStream ostr;
593  if (s)
594  {
595  ostr << s->getDataTypeToken();
596  ostr << ":";
597  s->saveBinary(ostr);
598  }
599  result = ostr.str();
600  saveData(os, result);
601  }
602 
603 
604  void save(std::ostream &os) const
605  {
606  int32 v = version();
607  UTwrite(os, &v);
608  saveData(os, myGroup);
609  saveData(os, myCapturegroup);
610  saveData(os, myRootpath);
611  saveData(os, myExtraregions);
612  saveData(os, myCaptureregionsop);
613  saveData(os, myDosubnets);
614  saveData(os, myRelativeskel);
615  saveData(os, myUsecaptpose);
616  saveData(os, myCookat);
617  saveData(os, myCaptframe);
618  saveData(os, myWeightmethod);
619  saveData(os, myWeightfrom);
620  saveData(os, myDropoff);
621  saveData(os, myMaxinfluences);
622  saveData(os, myNormweights);
623  saveData(os, myDestroyweights);
624  saveData(os, myBlendfactor);
625  saveData(os, myColor);
626  saveData(os, myZeroweightcolor);
627 
628  }
629 
630  bool load(UT_IStream &is)
631  {
632  int32 v;
633  is.bread(&v, 1);
634  if (version() != v)
635  {
636  // Fail incompatible versions
637  return false;
638  }
639  loadData(is, myGroup);
640  loadData(is, myCapturegroup);
641  loadData(is, myRootpath);
642  loadData(is, myExtraregions);
643  loadData(is, myCaptureregionsop);
644  loadData(is, myDosubnets);
645  loadData(is, myRelativeskel);
646  loadData(is, myUsecaptpose);
647  loadData(is, myCookat);
648  loadData(is, myCaptframe);
649  loadData(is, myWeightmethod);
650  loadData(is, myWeightfrom);
651  loadData(is, myDropoff);
652  loadData(is, myMaxinfluences);
653  loadData(is, myNormweights);
654  loadData(is, myDestroyweights);
655  loadData(is, myBlendfactor);
656  loadData(is, myColor);
657  loadData(is, myZeroweightcolor);
658 
659  return true;
660  }
661 
662  const UT_StringHolder & getGroup() const { return myGroup; }
663  void setGroup(const UT_StringHolder & val) { myGroup = val; }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getGroup();
669  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
670  return result;
671  }
672  const UT_StringHolder & getCapturegroup() const { return myCapturegroup; }
673  void setCapturegroup(const UT_StringHolder & val) { myCapturegroup = val; }
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getCapturegroup();
679  OP_Utils::evalOpParm(result, thissop, "capturegroup", cookparms.getCookTime(), 0);
680  return result;
681  }
682  const UT_StringHolder & getRootpath() const { return myRootpath; }
683  void setRootpath(const UT_StringHolder & val) { myRootpath = val; }
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getRootpath();
689  OP_Utils::evalOpParm(result, thissop, "rootpath", cookparms.getCookTime(), 0);
690  return result;
691  }
692  const UT_StringHolder & getExtraregions() const { return myExtraregions; }
693  void setExtraregions(const UT_StringHolder & val) { myExtraregions = val; }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getExtraregions();
699  OP_Utils::evalOpParm(result, thissop, "extraregions", cookparms.getCookTime(), 0);
700  return result;
701  }
702  Captureregionsop getCaptureregionsop() const { return Captureregionsop(myCaptureregionsop); }
703  void setCaptureregionsop(Captureregionsop val) { myCaptureregionsop = int64(val); }
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getCaptureregionsop();
708  int64 result;
709  OP_Utils::evalOpParm(result, thissop, "captureregionsop", cookparms.getCookTime(), 0);
710  return Captureregionsop(result);
711  }
712  bool getDosubnets() const { return myDosubnets; }
713  void setDosubnets(bool val) { myDosubnets = val; }
714  bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getDosubnets();
718  bool result;
719  OP_Utils::evalOpParm(result, thissop, "dosubnets", cookparms.getCookTime(), 0);
720  return result;
721  }
722  bool getRelativeskel() const { return myRelativeskel; }
723  void setRelativeskel(bool val) { myRelativeskel = val; }
724  bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getRelativeskel();
728  bool result;
729  OP_Utils::evalOpParm(result, thissop, "relativeskel", cookparms.getCookTime(), 0);
730  return result;
731  }
732  bool getUsecaptpose() const { return myUsecaptpose; }
733  void setUsecaptpose(bool val) { myUsecaptpose = val; }
734  bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getUsecaptpose();
738  bool result;
739  OP_Utils::evalOpParm(result, thissop, "usecaptpose", cookparms.getCookTime(), 0);
740  return result;
741  }
742  Cookat getCookat() const { return Cookat(myCookat); }
743  void setCookat(Cookat val) { myCookat = int64(val); }
744  Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getCookat();
748  int64 result;
749  OP_Utils::evalOpParm(result, thissop, "cookat", cookparms.getCookTime(), 0);
750  return Cookat(result);
751  }
752  fpreal64 getCaptframe() const { return myCaptframe; }
753  void setCaptframe(fpreal64 val) { myCaptframe = val; }
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getCaptframe();
759  OP_Utils::evalOpParm(result, thissop, "captframe", cookparms.getCookTime(), 0);
760  return result;
761  }
762  Weightmethod getWeightmethod() const { return Weightmethod(myWeightmethod); }
763  void setWeightmethod(Weightmethod val) { myWeightmethod = int64(val); }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getWeightmethod();
768  int64 result;
769  OP_Utils::evalOpParm(result, thissop, "weightmethod", cookparms.getCookTime(), 0);
770  return Weightmethod(result);
771  }
772  Weightfrom getWeightfrom() const { return Weightfrom(myWeightfrom); }
773  void setWeightfrom(Weightfrom val) { myWeightfrom = int64(val); }
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getWeightfrom();
778  int64 result;
779  OP_Utils::evalOpParm(result, thissop, "weightFrom", cookparms.getCookTime(), 0);
780  return Weightfrom(result);
781  }
782  fpreal64 getDropoff() const { return myDropoff; }
783  void setDropoff(fpreal64 val) { myDropoff = val; }
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getDropoff();
789  OP_Utils::evalOpParm(result, thissop, "dropoff", cookparms.getCookTime(), 0);
790  return result;
791  }
792  int64 getMaxinfluences() const { return myMaxinfluences; }
793  void setMaxinfluences(int64 val) { myMaxinfluences = val; }
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getMaxinfluences();
798  int64 result;
799  OP_Utils::evalOpParm(result, thissop, "maxinfluences", cookparms.getCookTime(), 0);
800  return result;
801  }
802  bool getNormweights() const { return myNormweights; }
803  void setNormweights(bool val) { myNormweights = val; }
804  bool opNormweights(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getNormweights();
808  bool result;
809  OP_Utils::evalOpParm(result, thissop, "normweights", cookparms.getCookTime(), 0);
810  return result;
811  }
812  bool getDestroyweights() const { return myDestroyweights; }
813  void setDestroyweights(bool val) { myDestroyweights = val; }
814  bool opDestroyweights(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getDestroyweights();
818  bool result;
819  OP_Utils::evalOpParm(result, thissop, "destroyweights", cookparms.getCookTime(), 0);
820  return result;
821  }
822  fpreal64 getBlendfactor() const { return myBlendfactor; }
823  void setBlendfactor(fpreal64 val) { myBlendfactor = val; }
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getBlendfactor();
829  OP_Utils::evalOpParm(result, thissop, "blendfactor", cookparms.getCookTime(), 0);
830  return result;
831  }
832  Color getColor() const { return Color(myColor); }
833  void setColor(Color val) { myColor = int64(val); }
834  Color opColor(const SOP_NodeVerb::CookParms &cookparms) const
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getColor();
838  int64 result;
839  OP_Utils::evalOpParm(result, thissop, "color", cookparms.getCookTime(), 0);
840  return Color(result);
841  }
842  UT_Vector3D getZeroweightcolor() const { return myZeroweightcolor; }
843  void setZeroweightcolor(UT_Vector3D val) { myZeroweightcolor = val; }
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return getZeroweightcolor();
849  OP_Utils::evalOpParm(result, thissop, "zeroweightcolor", cookparms.getCookTime(), 0);
850  return result;
851  }
852 
853 private:
854  UT_StringHolder myGroup;
855  UT_StringHolder myCapturegroup;
856  UT_StringHolder myRootpath;
857  UT_StringHolder myExtraregions;
858  int64 myCaptureregionsop;
859  bool myDosubnets;
860  bool myRelativeskel;
861  bool myUsecaptpose;
862  int64 myCookat;
863  fpreal64 myCaptframe;
864  int64 myWeightmethod;
865  int64 myWeightfrom;
866  fpreal64 myDropoff;
867  int64 myMaxinfluences;
868  bool myNormweights;
869  bool myDestroyweights;
870  fpreal64 myBlendfactor;
871  int64 myColor;
872  UT_Vector3D myZeroweightcolor;
873 
874 };
UT_StringHolder opRootpath(const SOP_NodeVerb::CookParms &cookparms) const
bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
type
Definition: core.h:977
static void saveData(std::ostream &os, fpreal64 v)
int64 opMaxinfluences(const SOP_NodeVerb::CookParms &cookparms) const
void setExtraregions(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Color opColor(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setWeightmethod(Weightmethod val)
bool opNormweights(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_ProximityCaptureParms &src) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal getTime() const
Definition: OP_Context.h:60
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opCaptframe(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opBlendfactor(const SOP_NodeVerb::CookParms &cookparms) const
const GLfloat * c
Definition: glew.h:16631
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
const UT_StringHolder & getExtraregions() const
void setZeroweightcolor(UT_Vector3D val)
An output stream object that owns its own string buffer storage.
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLenum src
Definition: glcorearb.h:1792
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const 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.
void setCaptureregionsop(Captureregionsop val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector3D opZeroweightcolor(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector2D v)
void save(std::ostream &os) const
const UT_StringHolder & getRootpath() const
static void saveData(std::ostream &os, UT_Vector3D v)
UT_StringHolder opExtraregions(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint length() const
Captureregionsop getCaptureregionsop() const
SYS_FORCE_INLINE const char * buffer() const
bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
Captureregionsop opCaptureregionsop(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, bool &v)
void setRootpath(const UT_StringHolder &val)
static void saveData(std::ostream &os, bool v)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
GT_API const UT_StringHolder version
const UT_StringHolder & getCapturegroup() const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
GLboolean * data
Definition: glcorearb.h:130
void setCapturegroup(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
Weightfrom opWeightfrom(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool opDestroyweights(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
bool operator!=(const SOP_ProximityCaptureParms &src) const
fpreal64 opDropoff(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
Weightmethod opWeightmethod(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1371
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:171
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLboolean r
Definition: glcorearb.h:1221
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opCapturegroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLdouble s
Definition: glew.h:1395
const char * getNestParmName(TempIndex fieldnum) const override
void copyFrom(const SOP_NodeParms *src) override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override