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 <OP/OP_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 
210  if (baseGetSignature() != src.baseGetSignature()) return false;
211 
212  return true;
213  }
215  {
216  return !operator==(src);
217  }
221 
222 
223 
224  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
225  {
226  myGroup = ""_UTsh;
227  if (true)
228  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
229  myGroupType = 0;
230  if (true)
231  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, graph->isDirect()?nullptr:depnode);
232  myOutput = 0;
233  if (true)
234  graph->evalOpParm(myOutput, nodeidx, "output", time, graph->isDirect()?nullptr:depnode);
235  myUniqueAgentDefinitions = false;
236  if (true && ( (true&&!(((int64(getOutput())!=1))||((int64(getOutput())!=1)))) ) )
237  graph->evalOpParm(myUniqueAgentDefinitions, nodeidx, "uniqueagentdefinitions", time, graph->isDirect()?nullptr:depnode);
238  myApplyAgentXform = true;
239  if (true && ( (true&&!(((int64(getOutput())==4))||((int64(getOutput())==4)))) ) )
240  graph->evalOpParm(myApplyAgentXform, nodeidx, "applyagentxform", time, graph->isDirect()?nullptr:depnode);
241  myRestShapesMode = 0;
242  if (true && ( (true&&!(((int64(getOutput())!=1))||((int64(getOutput())!=1)))) ) )
243  graph->evalOpParm(myRestShapesMode, nodeidx, "unpackrestshapesfrom", time, graph->isDirect()?nullptr:depnode);
244  myLayerFilter = "*"_UTsh;
245  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
246  graph->evalOpParm(myLayerFilter, nodeidx, "layerfilter", time, graph->isDirect()?nullptr:depnode);
247  myShapeFilter = "*"_UTsh;
248  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
249  graph->evalOpParm(myShapeFilter, nodeidx, "shapefilter", time, graph->isDirect()?nullptr:depnode);
250  myLimitIterations = true;
251  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
252  graph->evalOpParm(myLimitIterations, nodeidx, "limititerations", time, graph->isDirect()?nullptr:depnode);
253  myIterations = 1;
254  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((getLimitIterations()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
255  graph->evalOpParm(myIterations, nodeidx, "iterations", time, graph->isDirect()?nullptr:depnode);
256  myAddShapeDeformerAttrib = false;
257  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
258  graph->evalOpParm(myAddShapeDeformerAttrib, nodeidx, "addshapedeformerattrib", time, graph->isDirect()?nullptr:depnode);
259  myShapeDeformerAttrib = "agentshapedeformer"_UTsh;
260  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddShapeDeformerAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
261  graph->evalOpParm(myShapeDeformerAttrib, nodeidx, "shapedeformerattrib", time, graph->isDirect()?nullptr:depnode);
262  myAddXformNameAttrib = false;
263  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
264  graph->evalOpParm(myAddXformNameAttrib, nodeidx, "addxformnameattrib", time, graph->isDirect()?nullptr:depnode);
265  myXformNameAttrib = "agenttransformname"_UTsh;
266  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddXformNameAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
267  graph->evalOpParm(myXformNameAttrib, nodeidx, "xformnameattrib", time, graph->isDirect()?nullptr:depnode);
268  myAddLayerNameAttrib = false;
269  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
270  graph->evalOpParm(myAddLayerNameAttrib, nodeidx, "addlayernameattrib", time, graph->isDirect()?nullptr:depnode);
271  myLayerNameAttrib = "agentlayername"_UTsh;
272  if (true && ( (true&&!(((int64(getOutput())!=0)&&(int64(getOutput())!=1))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((getAddLayerNameAttrib()==0))||((int64(getOutput())!=0)&&(int64(getOutput())!=1)))) ) )
273  graph->evalOpParm(myLayerNameAttrib, nodeidx, "layernameattrib", time, graph->isDirect()?nullptr:depnode);
274  myClipNames = ""_UTsh;
275  if (true && ( (true&&!(((int64(getOutput())!=4))||((int64(getOutput())!=4)))) ) )
276  graph->evalOpParm(myClipNames, nodeidx, "clipnames", time, graph->isDirect()?nullptr:depnode);
277  myTransferAttributes = ""_UTsh;
278  if (true)
279  graph->evalOpParm(myTransferAttributes, nodeidx, "transferattributes", time, graph->isDirect()?nullptr:depnode);
280  myTransferGroups = ""_UTsh;
281  if (true)
282  graph->evalOpParm(myTransferGroups, nodeidx, "transfergroups", time, graph->isDirect()?nullptr:depnode);
283  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
284  {
285  int64 length = 0;
286  graph->evalOpParm(length, nodeidx, "numjointfilters", time, graph->isDirect()?nullptr:depnode);
287  if (length < 0) length = 0;
288  myFilters.setSize(length);
289  for (exint i = 0; i < length; i++)
290  {
291  int parmidx[1];
292  int offsets[1];
293  parmidx[0] = i+1;
294  offsets[0] = 1;
295  auto && _curentry = myFilters(i);
296  (void) _curentry;
297  _curentry.jointnames = ""_UTsh;
298  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
299  graph->evalOpParmInst(_curentry.jointnames, nodeidx, "jointnames#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
300  _curentry.percentage = 100;
301  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
302  graph->evalOpParmInst(_curentry.percentage, nodeidx, "percentage#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
303  _curentry.seed = 1;
304  if (true && ( (!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) && ( (true&&!(((int64(getOutput())!=2))||((int64(getOutput())!=2)))) ) )
305  graph->evalOpParmInst(_curentry.seed, nodeidx, "seed#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
306 
307  }
308  }
309  else
310  myFilters.clear();
311  mySkeletonColor = UT_Vector3D(0.0,0.09,1.0);
312  if (true && ( (true&&!(((int64(getOutput())!=3)&&(int64(getOutput())!=4))||((int64(getOutput())!=3)&&(int64(getOutput())!=4)))) ) )
313  graph->evalOpParm(mySkeletonColor, nodeidx, "skeletoncolor", time, graph->isDirect()?nullptr:depnode);
314  myApplyJointXforms = true;
315  if (true && ( (true&&!(((int64(getOutput())==0))||((int64(getOutput())==4))||((int64(getOutput())==1)&&(int64(getRestShapesMode())==3))||((int64(getOutput())==0))||((int64(getOutput())==4)))) ) )
316  graph->evalOpParm(myApplyJointXforms, nodeidx, "applyjointxforms", time, graph->isDirect()?nullptr:depnode);
317 
318  }
319 
320 
321  void loadFromOpSubclass(const LoadParms &loadparms) override
322  {
323  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
324  }
325 
326 
327  void copyFrom(const OP_NodeParms *src) override
328  {
329  *this = *((const SOP_AgentUnpackParms *)src);
330  }
331 
332  template <typename T>
333  void
334  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
335  {
336  if (idx.size() < 1)
337  return;
338  UT_ASSERT(idx.size() == instance.size()+1);
339  if (idx.size() != instance.size()+1)
340  return;
341  switch (idx[0])
342  {
343  case 0:
344  coerceValue(value, myGroup);
345  break;
346  case 1:
347  coerceValue(value, myGroupType);
348  break;
349  case 2:
350  coerceValue(value, myOutput);
351  break;
352  case 3:
353  coerceValue(value, myUniqueAgentDefinitions);
354  break;
355  case 4:
356  coerceValue(value, myApplyAgentXform);
357  break;
358  case 5:
359  coerceValue(value, myRestShapesMode);
360  break;
361  case 6:
362  coerceValue(value, myLayerFilter);
363  break;
364  case 7:
365  coerceValue(value, myShapeFilter);
366  break;
367  case 8:
368  coerceValue(value, myLimitIterations);
369  break;
370  case 9:
371  coerceValue(value, myIterations);
372  break;
373  case 10:
374  coerceValue(value, myAddShapeDeformerAttrib);
375  break;
376  case 11:
377  coerceValue(value, myShapeDeformerAttrib);
378  break;
379  case 12:
380  coerceValue(value, myAddXformNameAttrib);
381  break;
382  case 13:
383  coerceValue(value, myXformNameAttrib);
384  break;
385  case 14:
386  coerceValue(value, myAddLayerNameAttrib);
387  break;
388  case 15:
389  coerceValue(value, myLayerNameAttrib);
390  break;
391  case 16:
392  coerceValue(value, myClipNames);
393  break;
394  case 17:
395  coerceValue(value, myTransferAttributes);
396  break;
397  case 18:
398  coerceValue(value, myTransferGroups);
399  break;
400  case 19:
401  if (idx.size() == 1)
402  coerceValue(value, myFilters.entries());
403  else if (instance[0] < myFilters.entries())
404  {
405  auto && _data = myFilters(instance[0]);
406  switch (idx[1])
407  {
408  case 0:
409  coerceValue(value, _data.jointnames);
410  break;
411  case 1:
412  coerceValue(value, _data.percentage);
413  break;
414  case 2:
415  coerceValue(value, _data.seed);
416  break;
417 
418  }
419  }
420  break;
421  case 20:
422  coerceValue(value, mySkeletonColor);
423  break;
424  case 21:
425  coerceValue(value, myApplyJointXforms);
426  break;
427 
428  }
429  }
430 
431  bool isParmColorRamp(exint idx) const override
432  {
433  switch (idx)
434  {
435 
436  }
437  return false;
438  }
439 
440  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
441  { doGetParmValue(idx, instance, value); }
442  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
443  { doGetParmValue(idx, instance, value); }
444  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
445  { doGetParmValue(idx, instance, value); }
446  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
447  { doGetParmValue(idx, instance, value); }
448  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
449  { doGetParmValue(idx, instance, value); }
450  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
451  { doGetParmValue(idx, instance, value); }
452  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
453  { doGetParmValue(idx, instance, value); }
454  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
455  { doGetParmValue(idx, instance, value); }
456  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
457  { doGetParmValue(idx, instance, value); }
458  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
459  { doGetParmValue(idx, instance, value); }
460  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
461  { doGetParmValue(idx, instance, value); }
462 
463  template <typename T>
464  void
465  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
466  {
467  if (idx.size() < 1)
468  return;
469  UT_ASSERT(idx.size() == instance.size()+1);
470  if (idx.size() != instance.size()+1)
471  return;
472  switch (idx[0])
473  {
474  case 0:
475  coerceValue(myGroup, ( ( value ) ));
476  break;
477  case 1:
478  coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
479  break;
480  case 2:
481  coerceValue(myOutput, clampMinValue(0, clampMaxValue(4, value ) ));
482  break;
483  case 3:
484  coerceValue(myUniqueAgentDefinitions, ( ( value ) ));
485  break;
486  case 4:
487  coerceValue(myApplyAgentXform, ( ( value ) ));
488  break;
489  case 5:
490  coerceValue(myRestShapesMode, clampMinValue(0, clampMaxValue(3, value ) ));
491  break;
492  case 6:
493  coerceValue(myLayerFilter, ( ( value ) ));
494  break;
495  case 7:
496  coerceValue(myShapeFilter, ( ( value ) ));
497  break;
498  case 8:
499  coerceValue(myLimitIterations, ( ( value ) ));
500  break;
501  case 9:
502  coerceValue(myIterations, clampMinValue(1, ( value ) ));
503  break;
504  case 10:
505  coerceValue(myAddShapeDeformerAttrib, ( ( value ) ));
506  break;
507  case 11:
508  coerceValue(myShapeDeformerAttrib, ( ( value ) ));
509  break;
510  case 12:
511  coerceValue(myAddXformNameAttrib, ( ( value ) ));
512  break;
513  case 13:
514  coerceValue(myXformNameAttrib, ( ( value ) ));
515  break;
516  case 14:
517  coerceValue(myAddLayerNameAttrib, ( ( value ) ));
518  break;
519  case 15:
520  coerceValue(myLayerNameAttrib, ( ( value ) ));
521  break;
522  case 16:
523  coerceValue(myClipNames, ( ( value ) ));
524  break;
525  case 17:
526  coerceValue(myTransferAttributes, ( ( value ) ));
527  break;
528  case 18:
529  coerceValue(myTransferGroups, ( ( value ) ));
530  break;
531  case 19:
532  if (idx.size() == 1)
533  {
534  exint newsize;
535  coerceValue(newsize, value);
536  if (newsize < 0) newsize = 0;
537  myFilters.setSize(newsize);
538  }
539  else
540  {
541  if (instance[0] < 0)
542  return;
543  myFilters.setSizeIfNeeded(instance[0]+1);
544  auto && _data = myFilters(instance[0]);
545  switch (idx[1])
546  {
547  case 0:
548  coerceValue(_data.jointnames, value);
549  break;
550  case 1:
551  coerceValue(_data.percentage, value);
552  break;
553  case 2:
554  coerceValue(_data.seed, value);
555  break;
556 
557  }
558  }
559  break;
560  case 20:
561  coerceValue(mySkeletonColor, ( ( value ) ));
562  break;
563  case 21:
564  coerceValue(myApplyJointXforms, ( ( value ) ));
565  break;
566 
567  }
568  }
569 
570  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
571  { doSetParmValue(idx, instance, value); }
572  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
573  { doSetParmValue(idx, instance, value); }
574  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
575  { doSetParmValue(idx, instance, value); }
576  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
577  { doSetParmValue(idx, instance, value); }
578  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
579  { doSetParmValue(idx, instance, value); }
580  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
581  { doSetParmValue(idx, instance, value); }
582  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
583  { doSetParmValue(idx, instance, value); }
584  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
585  { doSetParmValue(idx, instance, value); }
586  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
587  { doSetParmValue(idx, instance, value); }
588  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
589  { doSetParmValue(idx, instance, value); }
590  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
591  { doSetParmValue(idx, instance, value); }
592 
593  exint getNestNumParms(TempIndex idx) const override
594  {
595  if (idx.size() == 0)
596  return 22;
597  switch (idx[0])
598  {
599  case 19:
600  return 3;
601 
602  }
603  // Invalid
604  return 0;
605  }
606 
607  const char *getNestParmName(TempIndex fieldnum) const override
608  {
609  if (fieldnum.size() < 1)
610  return 0;
611  switch (fieldnum[0])
612  {
613  case 0:
614  return "group";
615  case 1:
616  return "grouptype";
617  case 2:
618  return "output";
619  case 3:
620  return "uniqueagentdefinitions";
621  case 4:
622  return "applyagentxform";
623  case 5:
624  return "unpackrestshapesfrom";
625  case 6:
626  return "layerfilter";
627  case 7:
628  return "shapefilter";
629  case 8:
630  return "limititerations";
631  case 9:
632  return "iterations";
633  case 10:
634  return "addshapedeformerattrib";
635  case 11:
636  return "shapedeformerattrib";
637  case 12:
638  return "addxformnameattrib";
639  case 13:
640  return "xformnameattrib";
641  case 14:
642  return "addlayernameattrib";
643  case 15:
644  return "layernameattrib";
645  case 16:
646  return "clipnames";
647  case 17:
648  return "transferattributes";
649  case 18:
650  return "transfergroups";
651  case 19:
652  if (fieldnum.size() == 1)
653  return "numjointfilters";
654  switch (fieldnum[1])
655  {
656  case 0:
657  return "jointnames#";
658  case 1:
659  return "percentage#";
660  case 2:
661  return "seed#";
662 
663  }
664  return 0;
665  case 20:
666  return "skeletoncolor";
667  case 21:
668  return "applyjointxforms";
669 
670  }
671  return 0;
672  }
673 
674  ParmType getNestParmType(TempIndex fieldnum) const override
675  {
676  if (fieldnum.size() < 1)
677  return PARM_UNSUPPORTED;
678  switch (fieldnum[0])
679  {
680  case 0:
681  return PARM_STRING;
682  case 1:
683  return PARM_INTEGER;
684  case 2:
685  return PARM_INTEGER;
686  case 3:
687  return PARM_INTEGER;
688  case 4:
689  return PARM_INTEGER;
690  case 5:
691  return PARM_INTEGER;
692  case 6:
693  return PARM_STRING;
694  case 7:
695  return PARM_STRING;
696  case 8:
697  return PARM_INTEGER;
698  case 9:
699  return PARM_INTEGER;
700  case 10:
701  return PARM_INTEGER;
702  case 11:
703  return PARM_STRING;
704  case 12:
705  return PARM_INTEGER;
706  case 13:
707  return PARM_STRING;
708  case 14:
709  return PARM_INTEGER;
710  case 15:
711  return PARM_STRING;
712  case 16:
713  return PARM_STRING;
714  case 17:
715  return PARM_STRING;
716  case 18:
717  return PARM_STRING;
718  case 19:
719  if (fieldnum.size() == 1)
720  return PARM_MULTIPARM;
721  switch (fieldnum[1])
722  {
723  case 0:
724  return PARM_STRING;
725  case 1:
726  return PARM_FLOAT;
727  case 2:
728  return PARM_FLOAT;
729 
730  }
731  return PARM_UNSUPPORTED;
732  case 20:
733  return PARM_VECTOR3;
734  case 21:
735  return PARM_INTEGER;
736 
737  }
738  return PARM_UNSUPPORTED;
739  }
740 
741  // Boiler plate to load individual types.
742  static void loadData(UT_IStream &is, int64 &v)
743  { is.bread(&v, 1); }
744  static void loadData(UT_IStream &is, bool &v)
745  { int64 iv; is.bread(&iv, 1); v = iv; }
746  static void loadData(UT_IStream &is, fpreal64 &v)
747  { is.bread<fpreal64>(&v, 1); }
748  static void loadData(UT_IStream &is, UT_Vector2D &v)
749  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
750  static void loadData(UT_IStream &is, UT_Vector3D &v)
751  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
752  is.bread<fpreal64>(&v.z(), 1); }
753  static void loadData(UT_IStream &is, UT_Vector4D &v)
754  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
755  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
756  static void loadData(UT_IStream &is, UT_Matrix2D &v)
757  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
758  static void loadData(UT_IStream &is, UT_Matrix3D &v)
759  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
760  static void loadData(UT_IStream &is, UT_Matrix4D &v)
761  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
762  static void loadData(UT_IStream &is, UT_Vector2I &v)
763  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
764  static void loadData(UT_IStream &is, UT_Vector3I &v)
765  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
766  is.bread<int64>(&v.z(), 1); }
767  static void loadData(UT_IStream &is, UT_Vector4I &v)
768  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
769  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
771  { is.bread(v); }
773  { UT_StringHolder rampdata;
774  loadData(is, rampdata);
775  if (rampdata.isstring())
776  {
777  v.reset(new UT_Ramp());
778  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
779  v->load(istr);
780  }
781  else v.reset();
782  }
785  loadData(is, data);
786  if (data.isstring())
787  {
788  // Find the data type.
789  const char *colon = UT_StringWrap(data).findChar(':');
790  if (colon)
791  {
792  int typelen = colon - data.buffer();
794  type.strncpy(data.buffer(), typelen);
795  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
796 
797  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
798  }
799  }
800  else v.reset();
801  }
802 
803  static void saveData(std::ostream &os, int64 v)
804  { UTwrite(os, &v); }
805  static void saveData(std::ostream &os, bool v)
806  { int64 iv = v; UTwrite(os, &iv); }
807  static void saveData(std::ostream &os, fpreal64 v)
808  { UTwrite<fpreal64>(os, &v); }
809  static void saveData(std::ostream &os, UT_Vector2D v)
810  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
811  static void saveData(std::ostream &os, UT_Vector3D v)
812  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
813  UTwrite<fpreal64>(os, &v.z()); }
814  static void saveData(std::ostream &os, UT_Vector4D v)
815  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
816  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
817  static void saveData(std::ostream &os, UT_Matrix2D v)
819  static void saveData(std::ostream &os, UT_Matrix3D v)
821  static void saveData(std::ostream &os, UT_Matrix4D v)
823  static void saveData(std::ostream &os, UT_StringHolder s)
824  { UT_StringWrap(s).saveBinary(os); }
825  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
827  UT_OStringStream ostr;
828  if (s) s->save(ostr);
829  result = ostr.str();
830  saveData(os, result);
831  }
832  static void saveData(std::ostream &os, PRM_DataItemHandle s)
834  UT_OStringStream ostr;
835  if (s)
836  {
837  ostr << s->getDataTypeToken();
838  ostr << ":";
839  s->saveBinary(ostr);
840  }
841  result = ostr.str();
842  saveData(os, result);
843  }
844 
845 
846  void save(std::ostream &os) const
847  {
848  int32 v = version();
849  UTwrite(os, &v);
850  saveData(os, myGroup);
851  saveData(os, myGroupType);
852  saveData(os, myOutput);
853  saveData(os, myUniqueAgentDefinitions);
854  saveData(os, myApplyAgentXform);
855  saveData(os, myRestShapesMode);
856  saveData(os, myLayerFilter);
857  saveData(os, myShapeFilter);
858  saveData(os, myLimitIterations);
859  saveData(os, myIterations);
860  saveData(os, myAddShapeDeformerAttrib);
861  saveData(os, myShapeDeformerAttrib);
862  saveData(os, myAddXformNameAttrib);
863  saveData(os, myXformNameAttrib);
864  saveData(os, myAddLayerNameAttrib);
865  saveData(os, myLayerNameAttrib);
866  saveData(os, myClipNames);
867  saveData(os, myTransferAttributes);
868  saveData(os, myTransferGroups);
869  {
870  int64 length = myFilters.entries();
871  UTwrite(os, &length);
872  for (exint i = 0; i < length; i++)
873  {
874  auto && _curentry = myFilters(i);
875  (void) _curentry;
876  saveData(os, _curentry.jointnames);
877  saveData(os, _curentry.percentage);
878  saveData(os, _curentry.seed);
879 
880  }
881  }
882  saveData(os, mySkeletonColor);
883  saveData(os, myApplyJointXforms);
884 
885  }
886 
887  bool load(UT_IStream &is)
888  {
889  int32 v;
890  is.bread(&v, 1);
891  if (version() != v)
892  {
893  // Fail incompatible versions
894  return false;
895  }
896  loadData(is, myGroup);
897  loadData(is, myGroupType);
898  loadData(is, myOutput);
899  loadData(is, myUniqueAgentDefinitions);
900  loadData(is, myApplyAgentXform);
901  loadData(is, myRestShapesMode);
902  loadData(is, myLayerFilter);
903  loadData(is, myShapeFilter);
904  loadData(is, myLimitIterations);
905  loadData(is, myIterations);
906  loadData(is, myAddShapeDeformerAttrib);
907  loadData(is, myShapeDeformerAttrib);
908  loadData(is, myAddXformNameAttrib);
909  loadData(is, myXformNameAttrib);
910  loadData(is, myAddLayerNameAttrib);
911  loadData(is, myLayerNameAttrib);
912  loadData(is, myClipNames);
913  loadData(is, myTransferAttributes);
914  loadData(is, myTransferGroups);
915  {
916  int64 length;
917  is.read(&length, 1);
918  myFilters.setSize(length);
919  for (exint i = 0; i < length; i++)
920  {
921  auto && _curentry = myFilters(i);
922  (void) _curentry;
923  loadData(is, _curentry.jointnames);
924  loadData(is, _curentry.percentage);
925  loadData(is, _curentry.seed);
926 
927  }
928  }
929  loadData(is, mySkeletonColor);
930  loadData(is, myApplyJointXforms);
931 
932  return true;
933  }
934 
935  const UT_StringHolder & getGroup() const { return myGroup; }
936  void setGroup(const UT_StringHolder & val) { myGroup = val; }
938  {
939  SOP_Node *thissop = cookparms.getNode();
940  if (!thissop) return getGroup();
942  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
943  return result;
944  }
945  GroupType getGroupType() const { return GroupType(myGroupType); }
946  void setGroupType(GroupType val) { myGroupType = int64(val); }
948  {
949  SOP_Node *thissop = cookparms.getNode();
950  if (!thissop) return getGroupType();
951  int64 result;
952  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
953  return GroupType(result);
954  }
955  Output getOutput() const { return Output(myOutput); }
956  void setOutput(Output val) { myOutput = int64(val); }
957  Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
958  {
959  SOP_Node *thissop = cookparms.getNode();
960  if (!thissop) return getOutput();
961  int64 result;
962  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
963  return Output(result);
964  }
965  bool getUniqueAgentDefinitions() const { return myUniqueAgentDefinitions; }
966  void setUniqueAgentDefinitions(bool val) { myUniqueAgentDefinitions = val; }
968  {
969  SOP_Node *thissop = cookparms.getNode();
970  if (!thissop) return getUniqueAgentDefinitions();
971  bool result;
972  OP_Utils::evalOpParm(result, thissop, "uniqueagentdefinitions", cookparms.getCookTime(), 0);
973  return result;
974  }
975  bool getApplyAgentXform() const { return myApplyAgentXform; }
976  void setApplyAgentXform(bool val) { myApplyAgentXform = val; }
977  bool opApplyAgentXform(const SOP_NodeVerb::CookParms &cookparms) const
978  {
979  SOP_Node *thissop = cookparms.getNode();
980  if (!thissop) return getApplyAgentXform();
981  bool result;
982  OP_Utils::evalOpParm(result, thissop, "applyagentxform", cookparms.getCookTime(), 0);
983  return result;
984  }
985  RestShapesMode getRestShapesMode() const { return RestShapesMode(myRestShapesMode); }
986  void setRestShapesMode(RestShapesMode val) { myRestShapesMode = int64(val); }
988  {
989  SOP_Node *thissop = cookparms.getNode();
990  if (!thissop) return getRestShapesMode();
991  int64 result;
992  OP_Utils::evalOpParm(result, thissop, "unpackrestshapesfrom", cookparms.getCookTime(), 0);
993  return RestShapesMode(result);
994  }
995  const UT_StringHolder & getLayerFilter() const { return myLayerFilter; }
996  void setLayerFilter(const UT_StringHolder & val) { myLayerFilter = val; }
998  {
999  SOP_Node *thissop = cookparms.getNode();
1000  if (!thissop) return getLayerFilter();
1002  OP_Utils::evalOpParm(result, thissop, "layerfilter", cookparms.getCookTime(), 0);
1003  return result;
1004  }
1005  const UT_StringHolder & getShapeFilter() const { return myShapeFilter; }
1006  void setShapeFilter(const UT_StringHolder & val) { myShapeFilter = val; }
1008  {
1009  SOP_Node *thissop = cookparms.getNode();
1010  if (!thissop) return getShapeFilter();
1012  OP_Utils::evalOpParm(result, thissop, "shapefilter", cookparms.getCookTime(), 0);
1013  return result;
1014  }
1015  bool getLimitIterations() const { return myLimitIterations; }
1016  void setLimitIterations(bool val) { myLimitIterations = val; }
1017  bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
1018  {
1019  SOP_Node *thissop = cookparms.getNode();
1020  if (!thissop) return getLimitIterations();
1021  bool result;
1022  OP_Utils::evalOpParm(result, thissop, "limititerations", cookparms.getCookTime(), 0);
1023  return result;
1024  }
1025  int64 getIterations() const { return myIterations; }
1026  void setIterations(int64 val) { myIterations = val; }
1028  {
1029  SOP_Node *thissop = cookparms.getNode();
1030  if (!thissop) return getIterations();
1031  int64 result;
1032  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
1033  return result;
1034  }
1035  bool getAddShapeDeformerAttrib() const { return myAddShapeDeformerAttrib; }
1036  void setAddShapeDeformerAttrib(bool val) { myAddShapeDeformerAttrib = val; }
1038  {
1039  SOP_Node *thissop = cookparms.getNode();
1040  if (!thissop) return getAddShapeDeformerAttrib();
1041  bool result;
1042  OP_Utils::evalOpParm(result, thissop, "addshapedeformerattrib", cookparms.getCookTime(), 0);
1043  return result;
1044  }
1045  const UT_StringHolder & getShapeDeformerAttrib() const { return myShapeDeformerAttrib; }
1046  void setShapeDeformerAttrib(const UT_StringHolder & val) { myShapeDeformerAttrib = val; }
1048  {
1049  SOP_Node *thissop = cookparms.getNode();
1050  if (!thissop) return getShapeDeformerAttrib();
1052  OP_Utils::evalOpParm(result, thissop, "shapedeformerattrib", cookparms.getCookTime(), 0);
1053  return result;
1054  }
1055  bool getAddXformNameAttrib() const { return myAddXformNameAttrib; }
1056  void setAddXformNameAttrib(bool val) { myAddXformNameAttrib = val; }
1057  bool opAddXformNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1058  {
1059  SOP_Node *thissop = cookparms.getNode();
1060  if (!thissop) return getAddXformNameAttrib();
1061  bool result;
1062  OP_Utils::evalOpParm(result, thissop, "addxformnameattrib", cookparms.getCookTime(), 0);
1063  return result;
1064  }
1065  const UT_StringHolder & getXformNameAttrib() const { return myXformNameAttrib; }
1066  void setXformNameAttrib(const UT_StringHolder & val) { myXformNameAttrib = val; }
1068  {
1069  SOP_Node *thissop = cookparms.getNode();
1070  if (!thissop) return getXformNameAttrib();
1072  OP_Utils::evalOpParm(result, thissop, "xformnameattrib", cookparms.getCookTime(), 0);
1073  return result;
1074  }
1075  bool getAddLayerNameAttrib() const { return myAddLayerNameAttrib; }
1076  void setAddLayerNameAttrib(bool val) { myAddLayerNameAttrib = val; }
1077  bool opAddLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1078  {
1079  SOP_Node *thissop = cookparms.getNode();
1080  if (!thissop) return getAddLayerNameAttrib();
1081  bool result;
1082  OP_Utils::evalOpParm(result, thissop, "addlayernameattrib", cookparms.getCookTime(), 0);
1083  return result;
1084  }
1085  const UT_StringHolder & getLayerNameAttrib() const { return myLayerNameAttrib; }
1086  void setLayerNameAttrib(const UT_StringHolder & val) { myLayerNameAttrib = val; }
1088  {
1089  SOP_Node *thissop = cookparms.getNode();
1090  if (!thissop) return getLayerNameAttrib();
1092  OP_Utils::evalOpParm(result, thissop, "layernameattrib", cookparms.getCookTime(), 0);
1093  return result;
1094  }
1095  const UT_StringHolder & getClipNames() const { return myClipNames; }
1096  void setClipNames(const UT_StringHolder & val) { myClipNames = val; }
1098  {
1099  SOP_Node *thissop = cookparms.getNode();
1100  if (!thissop) return getClipNames();
1102  OP_Utils::evalOpParm(result, thissop, "clipnames", cookparms.getCookTime(), 0);
1103  return result;
1104  }
1105  const UT_StringHolder & getTransferAttributes() const { return myTransferAttributes; }
1106  void setTransferAttributes(const UT_StringHolder & val) { myTransferAttributes = val; }
1108  {
1109  SOP_Node *thissop = cookparms.getNode();
1110  if (!thissop) return getTransferAttributes();
1112  OP_Utils::evalOpParm(result, thissop, "transferattributes", cookparms.getCookTime(), 0);
1113  return result;
1114  }
1115  const UT_StringHolder & getTransferGroups() const { return myTransferGroups; }
1116  void setTransferGroups(const UT_StringHolder & val) { myTransferGroups = val; }
1118  {
1119  SOP_Node *thissop = cookparms.getNode();
1120  if (!thissop) return getTransferGroups();
1122  OP_Utils::evalOpParm(result, thissop, "transfergroups", cookparms.getCookTime(), 0);
1123  return result;
1124  }
1125  const UT_Array<Filters> &getFilters() const { return myFilters; }
1126 void setFilters(const UT_Array<Filters> &val) { myFilters = val; }
1127  exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
1128  {
1129  SOP_Node *thissop = cookparms.getNode();
1130  if (!thissop) return getFilters().entries();
1131  exint result;
1132  OP_Utils::evalOpParm(result, thissop, "numjointfilters", cookparms.getCookTime(), 0);
1133  return result;
1134  }
1136  { return opinstFilters_jointnames(cookparms, &_idx); }
1137  UT_StringHolder opinstFilters_jointnames(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1138  {
1139  SOP_Node *thissop = cookparms.getNode();
1140  if (!thissop) return (myFilters(_idx[0]).jointnames);
1141  int _parmidx[2-1];
1142  _parmidx[1-1] = _idx[1-1] + 1;
1143 
1145  OP_Utils::evalOpParmInst(result, thissop, "jointnames#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1146  return (result);
1147  }
1148  fpreal64 opFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1149  { return opinstFilters_percentage(cookparms, &_idx); }
1150  fpreal64 opinstFilters_percentage(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1151  {
1152  SOP_Node *thissop = cookparms.getNode();
1153  if (!thissop) return (myFilters(_idx[0]).percentage);
1154  int _parmidx[2-1];
1155  _parmidx[1-1] = _idx[1-1] + 1;
1156 
1157  fpreal64 result;
1158  OP_Utils::evalOpParmInst(result, thissop, "percentage#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1159  return (result);
1160  }
1161  fpreal64 opFilters_seed(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1162  { return opinstFilters_seed(cookparms, &_idx); }
1163  fpreal64 opinstFilters_seed(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1164  {
1165  SOP_Node *thissop = cookparms.getNode();
1166  if (!thissop) return (myFilters(_idx[0]).seed);
1167  int _parmidx[2-1];
1168  _parmidx[1-1] = _idx[1-1] + 1;
1169 
1170  fpreal64 result;
1171  OP_Utils::evalOpParmInst(result, thissop, "seed#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1172  return (result);
1173  }
1174 
1175  UT_Vector3D getSkeletonColor() const { return mySkeletonColor; }
1176  void setSkeletonColor(UT_Vector3D val) { mySkeletonColor = val; }
1178  {
1179  SOP_Node *thissop = cookparms.getNode();
1180  if (!thissop) return getSkeletonColor();
1182  OP_Utils::evalOpParm(result, thissop, "skeletoncolor", cookparms.getCookTime(), 0);
1183  return result;
1184  }
1185  bool getApplyJointXforms() const { return myApplyJointXforms; }
1186  void setApplyJointXforms(bool val) { myApplyJointXforms = val; }
1187  bool opApplyJointXforms(const SOP_NodeVerb::CookParms &cookparms) const
1188  {
1189  SOP_Node *thissop = cookparms.getNode();
1190  if (!thissop) return getApplyJointXforms();
1191  bool result;
1192  OP_Utils::evalOpParm(result, thissop, "applyjointxforms", cookparms.getCookTime(), 0);
1193  return result;
1194  }
1195 
1196 private:
1197  UT_StringHolder myGroup;
1198  int64 myGroupType;
1199  int64 myOutput;
1200  bool myUniqueAgentDefinitions;
1201  bool myApplyAgentXform;
1202  int64 myRestShapesMode;
1203  UT_StringHolder myLayerFilter;
1204  UT_StringHolder myShapeFilter;
1205  bool myLimitIterations;
1206  int64 myIterations;
1207  bool myAddShapeDeformerAttrib;
1208  UT_StringHolder myShapeDeformerAttrib;
1209  bool myAddXformNameAttrib;
1210  UT_StringHolder myXformNameAttrib;
1211  bool myAddLayerNameAttrib;
1212  UT_StringHolder myLayerNameAttrib;
1213  UT_StringHolder myClipNames;
1214  UT_StringHolder myTransferAttributes;
1215  UT_StringHolder myTransferGroups;
1216  UT_Array<Filters> myFilters;
1217  UT_Vector3D mySkeletonColor;
1218  bool myApplyJointXforms;
1219 
1220 };
type
Definition: core.h:556
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:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:655
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
UT_StringHolder opShapeDeformerAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getUniqueAgentDefinitions() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opXformNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
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)