HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AgentUnpack.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_AgentUnpackEnums
24 {
25  enum class GroupType
26  {
27  GUESS = 0,
28  POINTS,
29  PRIMS
30  };
31 
33  getToken(GroupType enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case GroupType::GUESS: return "guess"_sh;
38  case GroupType::POINTS: return "points"_sh;
39  case GroupType::PRIMS: return "prims"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class Output
45  {
46  DEFORMED = 0,
47  REST,
48  JOINTS,
49  SKELETON,
51  };
52 
54  getToken(Output enum_value)
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case Output::DEFORMED: return "deformed"_sh;
59  case Output::REST: return "rest"_sh;
60  case Output::JOINTS: return "joints"_sh;
61  case Output::SKELETON: return "skeleton"_sh;
62  case Output::MOTIONCLIPS: return "motionclips"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67  enum class RestShapesMode
68  {
69  CURRENTLAYERS = 0,
71  ALLLAYERS,
72  SHAPELIB
73  };
74 
76  getToken(RestShapesMode enum_value)
77  {
78  using namespace UT::Literal;
79  switch (enum_value) {
80  case RestShapesMode::CURRENTLAYERS: return "currentlayers"_sh;
81  case RestShapesMode::COLLISIONLAYERS: return "collisionlayers"_sh;
82  case RestShapesMode::ALLLAYERS: return "alllayers"_sh;
83  case RestShapesMode::SHAPELIB: return "shapelib"_sh;
84  default: UT_ASSERT(false); return ""_sh;
85  }
86  }
87 
88 }
89 
90 
92 {
93 public:
94  static int version() { return 1; }
95  struct Filters
96  {
100 
101 
103  {
104  jointnames = ""_UTsh;
105  percentage = 100;
106  seed = 1;
107 
108  }
109 
110  bool operator==(const Filters &src) const
111  {
112  if (jointnames != src.jointnames) return false;
113  if (percentage != src.percentage) return false;
114  if (seed != src.seed) return false;
115 
116  return true;
117  }
118  bool operator!=(const Filters &src) const
119  {
120  return !operator==(src);
121  }
122 
123  };
124 
126  {
128 
129  buf.strcat("[ ");
130  for (int i = 0; i < list.entries(); i++)
131  {
132  if (i)
133  buf.strcat(", ");
134  buf.strcat("( ");
135  buf.append("");
136  { UT_String tmp; tmp = UT_StringWrap(list(i).jointnames).makeQuotedString('"'); buf.strcat(tmp); }
137  buf.append(", ");
138  buf.appendSprintf("%f", (list(i).percentage));
139  buf.append(", ");
140  buf.appendSprintf("%f", (list(i).seed));
141 
142  buf.strcat(" )");
143  }
144  buf.strcat(" ]");
145 
147  return result;
148  }
149 
151  {
152  myGroup = ""_UTsh;
153  myGroupType = 0;
154  myOutput = 0;
155  myUniqueAgentDefinitions = false;
156  myApplyAgentXform = true;
157  myRestShapesMode = 0;
158  myLayerFilter = "*"_UTsh;
159  myShapeFilter = "*"_UTsh;
160  myLimitIterations = true;
161  myIterations = 1;
162  myAddShapeDeformerAttrib = false;
163  myShapeDeformerAttrib = "agentshapedeformer"_UTsh;
164  myAddXformNameAttrib = false;
165  myXformNameAttrib = "agenttransformname"_UTsh;
166  myAddLayerNameAttrib = false;
167  myLayerNameAttrib = "agentlayername"_UTsh;
168  myClipNames = ""_UTsh;
169  myTransferAttributes = ""_UTsh;
170  myTransferGroups = ""_UTsh;
171  myFilters.setSize(0);
172  mySkeletonColor = UT_Vector3D(0.0,0.09,1.0);
173  myApplyJointXforms = true;
174 
175  }
176 
177  explicit SOP_AgentUnpackParms(const SOP_AgentUnpackParms &) = default;
179  SOP_AgentUnpackParms(SOP_AgentUnpackParms &&) noexcept = default;
180  SOP_AgentUnpackParms &operator=(SOP_AgentUnpackParms &&) noexcept = default;
181 
182  ~SOP_AgentUnpackParms() override {}
183 
185  {
186  if (myGroup != src.myGroup) return false;
187  if (myGroupType != src.myGroupType) return false;
188  if (myOutput != src.myOutput) return false;
189  if (myUniqueAgentDefinitions != src.myUniqueAgentDefinitions) return false;
190  if (myApplyAgentXform != src.myApplyAgentXform) return false;
191  if (myRestShapesMode != src.myRestShapesMode) return false;
192  if (myLayerFilter != src.myLayerFilter) return false;
193  if (myShapeFilter != src.myShapeFilter) return false;
194  if (myLimitIterations != src.myLimitIterations) return false;
195  if (myIterations != src.myIterations) return false;
196  if (myAddShapeDeformerAttrib != src.myAddShapeDeformerAttrib) return false;
197  if (myShapeDeformerAttrib != src.myShapeDeformerAttrib) return false;
198  if (myAddXformNameAttrib != src.myAddXformNameAttrib) return false;
199  if (myXformNameAttrib != src.myXformNameAttrib) return false;
200  if (myAddLayerNameAttrib != src.myAddLayerNameAttrib) return false;
201  if (myLayerNameAttrib != src.myLayerNameAttrib) return false;
202  if (myClipNames != src.myClipNames) return false;
203  if (myTransferAttributes != src.myTransferAttributes) return false;
204  if (myTransferGroups != src.myTransferGroups) return false;
205  if (myFilters != src.myFilters) return false;
206  if (mySkeletonColor != src.mySkeletonColor) return false;
207  if (myApplyJointXforms != src.myApplyJointXforms) return false;
208 
209  return true;
210  }
212  {
213  return !operator==(src);
214  }
218 
219 
220 
221  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
222  {
223  myGroup = ""_UTsh;
224  if (true)
225  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
226  myGroupType = 0;
227  if (true)
228  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
229  myOutput = 0;
230  if (true)
231  graph->evalOpParm(myOutput, nodeidx, "output", time, 0);
232  myUniqueAgentDefinitions = false;
233  if (true && ( (true&&!(((int64(getOutput())!=1))||((int64(getOutput())!=1)))) ) )
234  graph->evalOpParm(myUniqueAgentDefinitions, nodeidx, "uniqueagentdefinitions", time, 0);
235  myApplyAgentXform = true;
236  if (true && ( (true&&!(((int64(getOutput())==4))||((int64(getOutput())==4)))) ) )
237  graph->evalOpParm(myApplyAgentXform, nodeidx, "applyagentxform", time, 0);
238  myRestShapesMode = 0;
239  if (true && ( (true&&!(((int64(getOutput())!=1))||((int64(getOutput())!=1)))) ) )
240  graph->evalOpParm(myRestShapesMode, nodeidx, "unpackrestshapesfrom", time, 0);
241  myLayerFilter = "*"_UTsh;
242  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
243  graph->evalOpParm(myLayerFilter, nodeidx, "layerfilter", time, 0);
244  myShapeFilter = "*"_UTsh;
245  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
246  graph->evalOpParm(myShapeFilter, nodeidx, "shapefilter", time, 0);
247  myLimitIterations = true;
248  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
249  graph->evalOpParm(myLimitIterations, nodeidx, "limititerations", time, 0);
250  myIterations = 1;
251  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((getLimitIterations()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
252  graph->evalOpParm(myIterations, nodeidx, "iterations", time, 0);
253  myAddShapeDeformerAttrib = false;
254  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
255  graph->evalOpParm(myAddShapeDeformerAttrib, nodeidx, "addshapedeformerattrib", time, 0);
256  myShapeDeformerAttrib = "agentshapedeformer"_UTsh;
257  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddShapeDeformerAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
258  graph->evalOpParm(myShapeDeformerAttrib, nodeidx, "shapedeformerattrib", time, 0);
259  myAddXformNameAttrib = false;
260  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
261  graph->evalOpParm(myAddXformNameAttrib, nodeidx, "addxformnameattrib", time, 0);
262  myXformNameAttrib = "agenttransformname"_UTsh;
263  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddXformNameAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
264  graph->evalOpParm(myXformNameAttrib, nodeidx, "xformnameattrib", time, 0);
265  myAddLayerNameAttrib = false;
266  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
267  graph->evalOpParm(myAddLayerNameAttrib, nodeidx, "addlayernameattrib", time, 0);
268  myLayerNameAttrib = "agentlayername"_UTsh;
269  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddLayerNameAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
270  graph->evalOpParm(myLayerNameAttrib, nodeidx, "layernameattrib", time, 0);
271  myClipNames = ""_UTsh;
272  if (true && ( (true&&!(((int64(getOutput())!=4))||((int64(getOutput())!=4)))) ) )
273  graph->evalOpParm(myClipNames, nodeidx, "clipnames", time, 0);
274  myTransferAttributes = ""_UTsh;
275  if (true)
276  graph->evalOpParm(myTransferAttributes, nodeidx, "transferattributes", time, 0);
277  myTransferGroups = ""_UTsh;
278  if (true)
279  graph->evalOpParm(myTransferGroups, nodeidx, "transfergroups", time, 0);
280  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
281  {
282  int64 length = 0;
283  graph->evalOpParm(length, nodeidx, "numjointfilters", time, 0);
284  if (length < 0) length = 0;
285  myFilters.setSize(length);
286  for (exint i = 0; i < length; i++)
287  {
288  int parmidx[1];
289  int offsets[1];
290  parmidx[0] = i+1;
291  offsets[0] = 1;
292  auto && _curentry = myFilters(i);
293  (void) _curentry;
294  _curentry.jointnames = ""_UTsh;
295  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
296  graph->evalOpParmInst(_curentry.jointnames, nodeidx, "jointnames#", parmidx, offsets, time, 0, 2-1);
297  _curentry.percentage = 100;
298  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
299  graph->evalOpParmInst(_curentry.percentage, nodeidx, "percentage#", parmidx, offsets, time, 0, 2-1);
300  _curentry.seed = 1;
301  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
302  graph->evalOpParmInst(_curentry.seed, nodeidx, "seed#", parmidx, offsets, time, 0, 2-1);
303 
304  }
305  }
306  else
307  myFilters.clear();
308  mySkeletonColor = UT_Vector3D(0.0,0.09,1.0);
309  if (true && ( (true&&!(((int64(getOutput())!=3)&&(int64(getOutput())!=4))||((int64(getOutput())!=3)&&(int64(getOutput())!=4)))) ) )
310  graph->evalOpParm(mySkeletonColor, nodeidx, "skeletoncolor", time, 0);
311  myApplyJointXforms = true;
312  if (true && ( (true&&!(((int64(getOutput())==0))||((int64(getOutput())==4))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())==0))||((int64(getOutput())==4)))) ) )
313  graph->evalOpParm(myApplyJointXforms, nodeidx, "applyjointxforms", time, 0);
314 
315  }
316 
317 
318  void loadFromOpSubclass(const LoadParms &loadparms) override
319  {
320  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
321  }
322 
323 
324  void copyFrom(const OP_NodeParms *src) override
325  {
326  *this = *((const SOP_AgentUnpackParms *)src);
327  }
328 
329  template <typename T>
330  void
331  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
332  {
333  if (idx.size() < 1)
334  return;
335  UT_ASSERT(idx.size() == instance.size()+1);
336  if (idx.size() != instance.size()+1)
337  return;
338  switch (idx[0])
339  {
340  case 0:
341  coerceValue(value, myGroup);
342  break;
343  case 1:
344  coerceValue(value, myGroupType);
345  break;
346  case 2:
347  coerceValue(value, myOutput);
348  break;
349  case 3:
350  coerceValue(value, myUniqueAgentDefinitions);
351  break;
352  case 4:
353  coerceValue(value, myApplyAgentXform);
354  break;
355  case 5:
356  coerceValue(value, myRestShapesMode);
357  break;
358  case 6:
359  coerceValue(value, myLayerFilter);
360  break;
361  case 7:
362  coerceValue(value, myShapeFilter);
363  break;
364  case 8:
365  coerceValue(value, myLimitIterations);
366  break;
367  case 9:
368  coerceValue(value, myIterations);
369  break;
370  case 10:
371  coerceValue(value, myAddShapeDeformerAttrib);
372  break;
373  case 11:
374  coerceValue(value, myShapeDeformerAttrib);
375  break;
376  case 12:
377  coerceValue(value, myAddXformNameAttrib);
378  break;
379  case 13:
380  coerceValue(value, myXformNameAttrib);
381  break;
382  case 14:
383  coerceValue(value, myAddLayerNameAttrib);
384  break;
385  case 15:
386  coerceValue(value, myLayerNameAttrib);
387  break;
388  case 16:
389  coerceValue(value, myClipNames);
390  break;
391  case 17:
392  coerceValue(value, myTransferAttributes);
393  break;
394  case 18:
395  coerceValue(value, myTransferGroups);
396  break;
397  case 19:
398  if (idx.size() == 1)
399  coerceValue(value, myFilters.entries());
400  else if (instance[0] < myFilters.entries())
401  {
402  auto && _data = myFilters(instance[0]);
403  switch (idx[1])
404  {
405  case 0:
406  coerceValue(value, _data.jointnames);
407  break;
408  case 1:
409  coerceValue(value, _data.percentage);
410  break;
411  case 2:
412  coerceValue(value, _data.seed);
413  break;
414 
415  }
416  }
417  break;
418  case 20:
419  coerceValue(value, mySkeletonColor);
420  break;
421  case 21:
422  coerceValue(value, myApplyJointXforms);
423  break;
424 
425  }
426  }
427 
428  bool isParmColorRamp(exint idx) const override
429  {
430  switch (idx)
431  {
432 
433  }
434  return false;
435  }
436 
437  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
438  { doGetParmValue(idx, instance, value); }
439  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
440  { doGetParmValue(idx, instance, value); }
441  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
442  { doGetParmValue(idx, instance, value); }
443  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
444  { doGetParmValue(idx, instance, value); }
445  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
446  { doGetParmValue(idx, instance, value); }
447  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
448  { doGetParmValue(idx, instance, value); }
449  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
450  { doGetParmValue(idx, instance, value); }
451  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
452  { doGetParmValue(idx, instance, value); }
453  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
454  { doGetParmValue(idx, instance, value); }
455  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
456  { doGetParmValue(idx, instance, value); }
457  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
458  { doGetParmValue(idx, instance, value); }
459 
460  template <typename T>
461  void
462  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
463  {
464  if (idx.size() < 1)
465  return;
466  UT_ASSERT(idx.size() == instance.size()+1);
467  if (idx.size() != instance.size()+1)
468  return;
469  switch (idx[0])
470  {
471  case 0:
472  coerceValue(myGroup, ( ( value ) ));
473  break;
474  case 1:
475  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
476  break;
477  case 2:
478  coerceValue(myOutput, clampMinValue(0, clampMaxValue(4, value ) ));
479  break;
480  case 3:
481  coerceValue(myUniqueAgentDefinitions, ( ( value ) ));
482  break;
483  case 4:
484  coerceValue(myApplyAgentXform, ( ( value ) ));
485  break;
486  case 5:
487  coerceValue(myRestShapesMode, clampMinValue(0, clampMaxValue(3, value ) ));
488  break;
489  case 6:
490  coerceValue(myLayerFilter, ( ( value ) ));
491  break;
492  case 7:
493  coerceValue(myShapeFilter, ( ( value ) ));
494  break;
495  case 8:
496  coerceValue(myLimitIterations, ( ( value ) ));
497  break;
498  case 9:
499  coerceValue(myIterations, clampMinValue(1, ( value ) ));
500  break;
501  case 10:
502  coerceValue(myAddShapeDeformerAttrib, ( ( value ) ));
503  break;
504  case 11:
505  coerceValue(myShapeDeformerAttrib, ( ( value ) ));
506  break;
507  case 12:
508  coerceValue(myAddXformNameAttrib, ( ( value ) ));
509  break;
510  case 13:
511  coerceValue(myXformNameAttrib, ( ( value ) ));
512  break;
513  case 14:
514  coerceValue(myAddLayerNameAttrib, ( ( value ) ));
515  break;
516  case 15:
517  coerceValue(myLayerNameAttrib, ( ( value ) ));
518  break;
519  case 16:
520  coerceValue(myClipNames, ( ( value ) ));
521  break;
522  case 17:
523  coerceValue(myTransferAttributes, ( ( value ) ));
524  break;
525  case 18:
526  coerceValue(myTransferGroups, ( ( value ) ));
527  break;
528  case 19:
529  if (idx.size() == 1)
530  {
531  exint newsize;
532  coerceValue(newsize, value);
533  if (newsize < 0) newsize = 0;
534  myFilters.setSize(newsize);
535  }
536  else
537  {
538  if (instance[0] < 0)
539  return;
540  myFilters.setSizeIfNeeded(instance[0]+1);
541  auto && _data = myFilters(instance[0]);
542  switch (idx[1])
543  {
544  case 0:
545  coerceValue(_data.jointnames, value);
546  break;
547  case 1:
548  coerceValue(_data.percentage, value);
549  break;
550  case 2:
551  coerceValue(_data.seed, value);
552  break;
553 
554  }
555  }
556  break;
557  case 20:
558  coerceValue(mySkeletonColor, ( ( value ) ));
559  break;
560  case 21:
561  coerceValue(myApplyJointXforms, ( ( value ) ));
562  break;
563 
564  }
565  }
566 
567  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
568  { doSetParmValue(idx, instance, value); }
569  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
570  { doSetParmValue(idx, instance, value); }
571  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
572  { doSetParmValue(idx, instance, value); }
573  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
574  { doSetParmValue(idx, instance, value); }
575  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
576  { doSetParmValue(idx, instance, value); }
577  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
578  { doSetParmValue(idx, instance, value); }
579  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
580  { doSetParmValue(idx, instance, value); }
581  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
582  { doSetParmValue(idx, instance, value); }
583  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
584  { doSetParmValue(idx, instance, value); }
585  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
586  { doSetParmValue(idx, instance, value); }
587  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
588  { doSetParmValue(idx, instance, value); }
589 
590  exint getNestNumParms(TempIndex idx) const override
591  {
592  if (idx.size() == 0)
593  return 22;
594  switch (idx[0])
595  {
596  case 19:
597  return 3;
598 
599  }
600  // Invalid
601  return 0;
602  }
603 
604  const char *getNestParmName(TempIndex fieldnum) const override
605  {
606  if (fieldnum.size() < 1)
607  return 0;
608  switch (fieldnum[0])
609  {
610  case 0:
611  return "group";
612  case 1:
613  return "grouptype";
614  case 2:
615  return "output";
616  case 3:
617  return "uniqueagentdefinitions";
618  case 4:
619  return "applyagentxform";
620  case 5:
621  return "unpackrestshapesfrom";
622  case 6:
623  return "layerfilter";
624  case 7:
625  return "shapefilter";
626  case 8:
627  return "limititerations";
628  case 9:
629  return "iterations";
630  case 10:
631  return "addshapedeformerattrib";
632  case 11:
633  return "shapedeformerattrib";
634  case 12:
635  return "addxformnameattrib";
636  case 13:
637  return "xformnameattrib";
638  case 14:
639  return "addlayernameattrib";
640  case 15:
641  return "layernameattrib";
642  case 16:
643  return "clipnames";
644  case 17:
645  return "transferattributes";
646  case 18:
647  return "transfergroups";
648  case 19:
649  if (fieldnum.size() == 1)
650  return "numjointfilters";
651  switch (fieldnum[1])
652  {
653  case 0:
654  return "jointnames#";
655  case 1:
656  return "percentage#";
657  case 2:
658  return "seed#";
659 
660  }
661  return 0;
662  case 20:
663  return "skeletoncolor";
664  case 21:
665  return "applyjointxforms";
666 
667  }
668  return 0;
669  }
670 
671  ParmType getNestParmType(TempIndex fieldnum) const override
672  {
673  if (fieldnum.size() < 1)
674  return PARM_UNSUPPORTED;
675  switch (fieldnum[0])
676  {
677  case 0:
678  return PARM_STRING;
679  case 1:
680  return PARM_INTEGER;
681  case 2:
682  return PARM_INTEGER;
683  case 3:
684  return PARM_INTEGER;
685  case 4:
686  return PARM_INTEGER;
687  case 5:
688  return PARM_INTEGER;
689  case 6:
690  return PARM_STRING;
691  case 7:
692  return PARM_STRING;
693  case 8:
694  return PARM_INTEGER;
695  case 9:
696  return PARM_INTEGER;
697  case 10:
698  return PARM_INTEGER;
699  case 11:
700  return PARM_STRING;
701  case 12:
702  return PARM_INTEGER;
703  case 13:
704  return PARM_STRING;
705  case 14:
706  return PARM_INTEGER;
707  case 15:
708  return PARM_STRING;
709  case 16:
710  return PARM_STRING;
711  case 17:
712  return PARM_STRING;
713  case 18:
714  return PARM_STRING;
715  case 19:
716  if (fieldnum.size() == 1)
717  return PARM_MULTIPARM;
718  switch (fieldnum[1])
719  {
720  case 0:
721  return PARM_STRING;
722  case 1:
723  return PARM_FLOAT;
724  case 2:
725  return PARM_FLOAT;
726 
727  }
728  return PARM_UNSUPPORTED;
729  case 20:
730  return PARM_VECTOR3;
731  case 21:
732  return PARM_INTEGER;
733 
734  }
735  return PARM_UNSUPPORTED;
736  }
737 
738  // Boiler plate to load individual types.
739  static void loadData(UT_IStream &is, int64 &v)
740  { is.bread(&v, 1); }
741  static void loadData(UT_IStream &is, bool &v)
742  { int64 iv; is.bread(&iv, 1); v = iv; }
743  static void loadData(UT_IStream &is, fpreal64 &v)
744  { is.bread<fpreal64>(&v, 1); }
745  static void loadData(UT_IStream &is, UT_Vector2D &v)
746  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
747  static void loadData(UT_IStream &is, UT_Vector3D &v)
748  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
749  is.bread<fpreal64>(&v.z(), 1); }
750  static void loadData(UT_IStream &is, UT_Vector4D &v)
751  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
752  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
753  static void loadData(UT_IStream &is, UT_Matrix2D &v)
754  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
755  static void loadData(UT_IStream &is, UT_Matrix3D &v)
756  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
757  static void loadData(UT_IStream &is, UT_Matrix4D &v)
758  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
759  static void loadData(UT_IStream &is, UT_Vector2I &v)
760  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
761  static void loadData(UT_IStream &is, UT_Vector3I &v)
762  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
763  is.bread<int64>(&v.z(), 1); }
764  static void loadData(UT_IStream &is, UT_Vector4I &v)
765  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
766  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
768  { is.bread(v); }
770  { UT_StringHolder rampdata;
771  loadData(is, rampdata);
772  if (rampdata.isstring())
773  {
774  v.reset(new UT_Ramp());
775  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
776  v->load(istr);
777  }
778  else v.reset();
779  }
782  loadData(is, data);
783  if (data.isstring())
784  {
785  // Find the data type.
786  const char *colon = UT_StringWrap(data).findChar(':');
787  if (colon)
788  {
789  int typelen = colon - data.buffer();
791  type.strncpy(data.buffer(), typelen);
792  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
793 
794  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
795  }
796  }
797  else v.reset();
798  }
799 
800  static void saveData(std::ostream &os, int64 v)
801  { UTwrite(os, &v); }
802  static void saveData(std::ostream &os, bool v)
803  { int64 iv = v; UTwrite(os, &iv); }
804  static void saveData(std::ostream &os, fpreal64 v)
805  { UTwrite<fpreal64>(os, &v); }
806  static void saveData(std::ostream &os, UT_Vector2D v)
807  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
808  static void saveData(std::ostream &os, UT_Vector3D v)
809  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
810  UTwrite<fpreal64>(os, &v.z()); }
811  static void saveData(std::ostream &os, UT_Vector4D v)
812  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
813  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
814  static void saveData(std::ostream &os, UT_Matrix2D v)
816  static void saveData(std::ostream &os, UT_Matrix3D v)
818  static void saveData(std::ostream &os, UT_Matrix4D v)
820  static void saveData(std::ostream &os, UT_StringHolder s)
821  { UT_StringWrap(s).saveBinary(os); }
822  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
824  UT_OStringStream ostr;
825  if (s) s->save(ostr);
826  result = ostr.str();
827  saveData(os, result);
828  }
829  static void saveData(std::ostream &os, PRM_DataItemHandle s)
831  UT_OStringStream ostr;
832  if (s)
833  {
834  ostr << s->getDataTypeToken();
835  ostr << ":";
836  s->saveBinary(ostr);
837  }
838  result = ostr.str();
839  saveData(os, result);
840  }
841 
842 
843  void save(std::ostream &os) const
844  {
845  int32 v = version();
846  UTwrite(os, &v);
847  saveData(os, myGroup);
848  saveData(os, myGroupType);
849  saveData(os, myOutput);
850  saveData(os, myUniqueAgentDefinitions);
851  saveData(os, myApplyAgentXform);
852  saveData(os, myRestShapesMode);
853  saveData(os, myLayerFilter);
854  saveData(os, myShapeFilter);
855  saveData(os, myLimitIterations);
856  saveData(os, myIterations);
857  saveData(os, myAddShapeDeformerAttrib);
858  saveData(os, myShapeDeformerAttrib);
859  saveData(os, myAddXformNameAttrib);
860  saveData(os, myXformNameAttrib);
861  saveData(os, myAddLayerNameAttrib);
862  saveData(os, myLayerNameAttrib);
863  saveData(os, myClipNames);
864  saveData(os, myTransferAttributes);
865  saveData(os, myTransferGroups);
866  {
867  int64 length = myFilters.entries();
868  UTwrite(os, &length);
869  for (exint i = 0; i < length; i++)
870  {
871  auto && _curentry = myFilters(i);
872  (void) _curentry;
873  saveData(os, _curentry.jointnames);
874  saveData(os, _curentry.percentage);
875  saveData(os, _curentry.seed);
876 
877  }
878  }
879  saveData(os, mySkeletonColor);
880  saveData(os, myApplyJointXforms);
881 
882  }
883 
884  bool load(UT_IStream &is)
885  {
886  int32 v;
887  is.bread(&v, 1);
888  if (version() != v)
889  {
890  // Fail incompatible versions
891  return false;
892  }
893  loadData(is, myGroup);
894  loadData(is, myGroupType);
895  loadData(is, myOutput);
896  loadData(is, myUniqueAgentDefinitions);
897  loadData(is, myApplyAgentXform);
898  loadData(is, myRestShapesMode);
899  loadData(is, myLayerFilter);
900  loadData(is, myShapeFilter);
901  loadData(is, myLimitIterations);
902  loadData(is, myIterations);
903  loadData(is, myAddShapeDeformerAttrib);
904  loadData(is, myShapeDeformerAttrib);
905  loadData(is, myAddXformNameAttrib);
906  loadData(is, myXformNameAttrib);
907  loadData(is, myAddLayerNameAttrib);
908  loadData(is, myLayerNameAttrib);
909  loadData(is, myClipNames);
910  loadData(is, myTransferAttributes);
911  loadData(is, myTransferGroups);
912  {
913  int64 length;
914  is.read(&length, 1);
915  myFilters.setSize(length);
916  for (exint i = 0; i < length; i++)
917  {
918  auto && _curentry = myFilters(i);
919  (void) _curentry;
920  loadData(is, _curentry.jointnames);
921  loadData(is, _curentry.percentage);
922  loadData(is, _curentry.seed);
923 
924  }
925  }
926  loadData(is, mySkeletonColor);
927  loadData(is, myApplyJointXforms);
928 
929  return true;
930  }
931 
932  const UT_StringHolder & getGroup() const { return myGroup; }
933  void setGroup(const UT_StringHolder & val) { myGroup = val; }
935  {
936  SOP_Node *thissop = cookparms.getNode();
937  if (!thissop) return getGroup();
939  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
940  return result;
941  }
942  GroupType getGroupType() const { return GroupType(myGroupType); }
943  void setGroupType(GroupType val) { myGroupType = int64(val); }
945  {
946  SOP_Node *thissop = cookparms.getNode();
947  if (!thissop) return getGroupType();
948  int64 result;
949  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
950  return GroupType(result);
951  }
952  Output getOutput() const { return Output(myOutput); }
953  void setOutput(Output val) { myOutput = int64(val); }
954  Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
955  {
956  SOP_Node *thissop = cookparms.getNode();
957  if (!thissop) return getOutput();
958  int64 result;
959  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
960  return Output(result);
961  }
962  bool getUniqueAgentDefinitions() const { return myUniqueAgentDefinitions; }
963  void setUniqueAgentDefinitions(bool val) { myUniqueAgentDefinitions = val; }
965  {
966  SOP_Node *thissop = cookparms.getNode();
967  if (!thissop) return getUniqueAgentDefinitions();
968  bool result;
969  OP_Utils::evalOpParm(result, thissop, "uniqueagentdefinitions", cookparms.getCookTime(), 0);
970  return result;
971  }
972  bool getApplyAgentXform() const { return myApplyAgentXform; }
973  void setApplyAgentXform(bool val) { myApplyAgentXform = val; }
974  bool opApplyAgentXform(const SOP_NodeVerb::CookParms &cookparms) const
975  {
976  SOP_Node *thissop = cookparms.getNode();
977  if (!thissop) return getApplyAgentXform();
978  bool result;
979  OP_Utils::evalOpParm(result, thissop, "applyagentxform", cookparms.getCookTime(), 0);
980  return result;
981  }
982  RestShapesMode getRestShapesMode() const { return RestShapesMode(myRestShapesMode); }
983  void setRestShapesMode(RestShapesMode val) { myRestShapesMode = int64(val); }
985  {
986  SOP_Node *thissop = cookparms.getNode();
987  if (!thissop) return getRestShapesMode();
988  int64 result;
989  OP_Utils::evalOpParm(result, thissop, "unpackrestshapesfrom", cookparms.getCookTime(), 0);
990  return RestShapesMode(result);
991  }
992  const UT_StringHolder & getLayerFilter() const { return myLayerFilter; }
993  void setLayerFilter(const UT_StringHolder & val) { myLayerFilter = val; }
995  {
996  SOP_Node *thissop = cookparms.getNode();
997  if (!thissop) return getLayerFilter();
999  OP_Utils::evalOpParm(result, thissop, "layerfilter", cookparms.getCookTime(), 0);
1000  return result;
1001  }
1002  const UT_StringHolder & getShapeFilter() const { return myShapeFilter; }
1003  void setShapeFilter(const UT_StringHolder & val) { myShapeFilter = val; }
1005  {
1006  SOP_Node *thissop = cookparms.getNode();
1007  if (!thissop) return getShapeFilter();
1009  OP_Utils::evalOpParm(result, thissop, "shapefilter", cookparms.getCookTime(), 0);
1010  return result;
1011  }
1012  bool getLimitIterations() const { return myLimitIterations; }
1013  void setLimitIterations(bool val) { myLimitIterations = val; }
1014  bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
1015  {
1016  SOP_Node *thissop = cookparms.getNode();
1017  if (!thissop) return getLimitIterations();
1018  bool result;
1019  OP_Utils::evalOpParm(result, thissop, "limititerations", cookparms.getCookTime(), 0);
1020  return result;
1021  }
1022  int64 getIterations() const { return myIterations; }
1023  void setIterations(int64 val) { myIterations = val; }
1025  {
1026  SOP_Node *thissop = cookparms.getNode();
1027  if (!thissop) return getIterations();
1028  int64 result;
1029  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
1030  return result;
1031  }
1032  bool getAddShapeDeformerAttrib() const { return myAddShapeDeformerAttrib; }
1033  void setAddShapeDeformerAttrib(bool val) { myAddShapeDeformerAttrib = val; }
1035  {
1036  SOP_Node *thissop = cookparms.getNode();
1037  if (!thissop) return getAddShapeDeformerAttrib();
1038  bool result;
1039  OP_Utils::evalOpParm(result, thissop, "addshapedeformerattrib", cookparms.getCookTime(), 0);
1040  return result;
1041  }
1042  const UT_StringHolder & getShapeDeformerAttrib() const { return myShapeDeformerAttrib; }
1043  void setShapeDeformerAttrib(const UT_StringHolder & val) { myShapeDeformerAttrib = val; }
1045  {
1046  SOP_Node *thissop = cookparms.getNode();
1047  if (!thissop) return getShapeDeformerAttrib();
1049  OP_Utils::evalOpParm(result, thissop, "shapedeformerattrib", cookparms.getCookTime(), 0);
1050  return result;
1051  }
1052  bool getAddXformNameAttrib() const { return myAddXformNameAttrib; }
1053  void setAddXformNameAttrib(bool val) { myAddXformNameAttrib = val; }
1054  bool opAddXformNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1055  {
1056  SOP_Node *thissop = cookparms.getNode();
1057  if (!thissop) return getAddXformNameAttrib();
1058  bool result;
1059  OP_Utils::evalOpParm(result, thissop, "addxformnameattrib", cookparms.getCookTime(), 0);
1060  return result;
1061  }
1062  const UT_StringHolder & getXformNameAttrib() const { return myXformNameAttrib; }
1063  void setXformNameAttrib(const UT_StringHolder & val) { myXformNameAttrib = val; }
1065  {
1066  SOP_Node *thissop = cookparms.getNode();
1067  if (!thissop) return getXformNameAttrib();
1069  OP_Utils::evalOpParm(result, thissop, "xformnameattrib", cookparms.getCookTime(), 0);
1070  return result;
1071  }
1072  bool getAddLayerNameAttrib() const { return myAddLayerNameAttrib; }
1073  void setAddLayerNameAttrib(bool val) { myAddLayerNameAttrib = val; }
1074  bool opAddLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return getAddLayerNameAttrib();
1078  bool result;
1079  OP_Utils::evalOpParm(result, thissop, "addlayernameattrib", cookparms.getCookTime(), 0);
1080  return result;
1081  }
1082  const UT_StringHolder & getLayerNameAttrib() const { return myLayerNameAttrib; }
1083  void setLayerNameAttrib(const UT_StringHolder & val) { myLayerNameAttrib = val; }
1085  {
1086  SOP_Node *thissop = cookparms.getNode();
1087  if (!thissop) return getLayerNameAttrib();
1089  OP_Utils::evalOpParm(result, thissop, "layernameattrib", cookparms.getCookTime(), 0);
1090  return result;
1091  }
1092  const UT_StringHolder & getClipNames() const { return myClipNames; }
1093  void setClipNames(const UT_StringHolder & val) { myClipNames = val; }
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return getClipNames();
1099  OP_Utils::evalOpParm(result, thissop, "clipnames", cookparms.getCookTime(), 0);
1100  return result;
1101  }
1102  const UT_StringHolder & getTransferAttributes() const { return myTransferAttributes; }
1103  void setTransferAttributes(const UT_StringHolder & val) { myTransferAttributes = val; }
1105  {
1106  SOP_Node *thissop = cookparms.getNode();
1107  if (!thissop) return getTransferAttributes();
1109  OP_Utils::evalOpParm(result, thissop, "transferattributes", cookparms.getCookTime(), 0);
1110  return result;
1111  }
1112  const UT_StringHolder & getTransferGroups() const { return myTransferGroups; }
1113  void setTransferGroups(const UT_StringHolder & val) { myTransferGroups = val; }
1115  {
1116  SOP_Node *thissop = cookparms.getNode();
1117  if (!thissop) return getTransferGroups();
1119  OP_Utils::evalOpParm(result, thissop, "transfergroups", cookparms.getCookTime(), 0);
1120  return result;
1121  }
1122  const UT_Array<Filters> &getFilters() const { return myFilters; }
1123 void setFilters(const UT_Array<Filters> &val) { myFilters = val; }
1124  exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
1125  {
1126  SOP_Node *thissop = cookparms.getNode();
1127  if (!thissop) return getFilters().entries();
1128  exint result;
1129  OP_Utils::evalOpParm(result, thissop, "numjointfilters", cookparms.getCookTime(), 0);
1130  return result;
1131  }
1133  { return opinstFilters_jointnames(cookparms, &_idx); }
1134  UT_StringHolder opinstFilters_jointnames(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1135  {
1136  SOP_Node *thissop = cookparms.getNode();
1137  if (!thissop) return (myFilters(_idx[0]).jointnames);
1138  int _parmidx[2-1];
1139  _parmidx[1-1] = _idx[1-1] + 1;
1140 
1142  OP_Utils::evalOpParmInst(result, thissop, "jointnames#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1143  return (result);
1144  }
1145  fpreal64 opFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1146  { return opinstFilters_percentage(cookparms, &_idx); }
1147  fpreal64 opinstFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1148  {
1149  SOP_Node *thissop = cookparms.getNode();
1150  if (!thissop) return (myFilters(_idx[0]).percentage);
1151  int _parmidx[2-1];
1152  _parmidx[1-1] = _idx[1-1] + 1;
1153 
1154  fpreal64 result;
1155  OP_Utils::evalOpParmInst(result, thissop, "percentage#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1156  return (result);
1157  }
1158  fpreal64 opFilters_seed(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1159  { return opinstFilters_seed(cookparms, &_idx); }
1160  fpreal64 opinstFilters_seed(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1161  {
1162  SOP_Node *thissop = cookparms.getNode();
1163  if (!thissop) return (myFilters(_idx[0]).seed);
1164  int _parmidx[2-1];
1165  _parmidx[1-1] = _idx[1-1] + 1;
1166 
1167  fpreal64 result;
1168  OP_Utils::evalOpParmInst(result, thissop, "seed#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1169  return (result);
1170  }
1171 
1172  UT_Vector3D getSkeletonColor() const { return mySkeletonColor; }
1173  void setSkeletonColor(UT_Vector3D val) { mySkeletonColor = val; }
1175  {
1176  SOP_Node *thissop = cookparms.getNode();
1177  if (!thissop) return getSkeletonColor();
1179  OP_Utils::evalOpParm(result, thissop, "skeletoncolor", cookparms.getCookTime(), 0);
1180  return result;
1181  }
1182  bool getApplyJointXforms() const { return myApplyJointXforms; }
1183  void setApplyJointXforms(bool val) { myApplyJointXforms = val; }
1184  bool opApplyJointXforms(const SOP_NodeVerb::CookParms &cookparms) const
1185  {
1186  SOP_Node *thissop = cookparms.getNode();
1187  if (!thissop) return getApplyJointXforms();
1188  bool result;
1189  OP_Utils::evalOpParm(result, thissop, "applyjointxforms", cookparms.getCookTime(), 0);
1190  return result;
1191  }
1192 
1193 private:
1194  UT_StringHolder myGroup;
1195  int64 myGroupType;
1196  int64 myOutput;
1197  bool myUniqueAgentDefinitions;
1198  bool myApplyAgentXform;
1199  int64 myRestShapesMode;
1200  UT_StringHolder myLayerFilter;
1201  UT_StringHolder myShapeFilter;
1202  bool myLimitIterations;
1203  int64 myIterations;
1204  bool myAddShapeDeformerAttrib;
1205  UT_StringHolder myShapeDeformerAttrib;
1206  bool myAddXformNameAttrib;
1207  UT_StringHolder myXformNameAttrib;
1208  bool myAddLayerNameAttrib;
1209  UT_StringHolder myLayerNameAttrib;
1210  UT_StringHolder myClipNames;
1211  UT_StringHolder myTransferAttributes;
1212  UT_StringHolder myTransferGroups;
1213  UT_Array<Filters> myFilters;
1214  UT_Vector3D mySkeletonColor;
1215  bool myApplyJointXforms;
1216 
1217 };
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setFilters(const UT_Array< Filters > &val)
Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
void setApplyAgentXform(bool val)
bool isParmColorRamp(exint idx) const override
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getTransferGroups() const
UT_StringHolder opinstFilters_jointnames(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator!=(const SOP_AgentUnpackParms &src) const
fpreal64 opFilters_seed(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setClipNames(const UT_StringHolder &val)
UT_StringHolder opShapeFilter(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_Array< Filters > & getFilters() const
void
Definition: png.h:1083
RestShapesMode opRestShapesMode(const SOP_NodeVerb::CookParms &cookparms) 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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal getTime() const
Definition: OP_Context.h:62
const UT_StringHolder & getLayerNameAttrib() const
const UT_StringHolder & getShapeDeformerAttrib() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opApplyJointXforms(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Filters &src) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, fpreal64 v)
void setAddLayerNameAttrib(bool val)
SYS_FORCE_INLINE const char * buffer() const
void setApplyJointXforms(bool val)
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setTransferAttributes(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal64 opinstFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opTransferAttributes(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setGroup(const UT_StringHolder &val)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool opAddXformNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
fpreal64 opFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Vector3D v)
void setAddXformNameAttrib(bool val)
UT_StringHolder opClipNames(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
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)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getTransferAttributes() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const UT_StringHolder & getXformNameAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setGroupType(GroupType val)
void setLayerNameAttrib(const UT_StringHolder &val)
const UT_StringHolder & getGroup() const
UT_Vector3D opSkeletonColor(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
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 setLayerFilter(const UT_StringHolder &val)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, int64 &v)
RestShapesMode getRestShapesMode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setShapeFilter(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_Vector3T< fpreal64 > UT_Vector3D
const UT_StringHolder & getLayerFilter() const
void save(std::ostream &os) const
GroupType getGroupType() const
const UT_StringHolder & getShapeFilter() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opUniqueAgentDefinitions(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
void setSkeletonColor(UT_Vector3D val)
void setRestShapesMode(RestShapesMode val)
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator!=(const Filters &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
UT_StringHolder opLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
bool opAddLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opFilters_jointnames(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
void setTransferGroups(const UT_StringHolder &val)
const UT_StringHolder & getClipNames() const
static void saveData(std::ostream &os, UT_Matrix4D v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setXformNameAttrib(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
bool operator==(const SOP_AgentUnpackParms &src) const
UT_StringHolder createString(const UT_Array< Filters > &list) const
bool getAddShapeDeformerAttrib() const
bool opAddShapeDeformerAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setShapeDeformerAttrib(const UT_StringHolder &val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opinstFilters_seed(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLboolean r
Definition: glcorearb.h:1222
void setAddShapeDeformerAttrib(bool val)
UT_Vector3D getSkeletonColor() const
bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
bool opApplyAgentXform(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void setUniqueAgentDefinitions(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
SYS_FORCE_INLINE UT_StringHolder getToken(GroupType enum_value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_StringHolder opTransferGroups(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:1059
UT_StringHolder opShapeDeformerAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getUniqueAgentDefinitions() const
UT_StringHolder opXformNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opLayerFilter(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_StringHolder &v)