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