23 namespace SOP_AgentUnpackEnums
35 using namespace UT::Literal;
56 using namespace UT::Literal;
78 using namespace UT::Literal;
104 jointnames =
""_UTsh;
112 if (jointnames != src.
jointnames)
return false;
113 if (percentage != src.
percentage)
return false;
114 if (seed != src.
seed)
return false;
130 for (
int i = 0; i < list.
entries(); i++)
155 myUniqueAgentDefinitions =
false;
156 myApplyAgentXform =
true;
157 myRestShapesMode = 0;
158 myLayerFilter =
"*"_UTsh;
159 myShapeFilter =
"*"_UTsh;
160 myLimitIterations =
true;
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 myOutputRestPoseAttrib =
true;
170 myRestPoseAttrib =
"rest_transform"_UTsh;
172 myOutputTransformGroups =
false;
173 myTransformGroups =
"*"_UTsh;
174 myOutputMetadataAttrib =
false;
175 myMetadataAttrib =
"agentmetadata"_UTsh;
176 myOutputMetadataJointConfigAttribs =
false;
177 myMetadataJointConfigAttribs =
"fbik_jointconfig"_UTsh;
178 myFilters.setSize(0);
179 myTransferAttributes =
""_UTsh;
180 myTransferGroups =
""_UTsh;
181 myApplyJointXforms =
true;
194 if (myGroup != src.myGroup)
return false;
195 if (myGroupType != src.myGroupType)
return false;
196 if (myOutput != src.myOutput)
return false;
197 if (myUniqueAgentDefinitions != src.myUniqueAgentDefinitions)
return false;
198 if (myApplyAgentXform != src.myApplyAgentXform)
return false;
199 if (myRestShapesMode != src.myRestShapesMode)
return false;
200 if (myLayerFilter != src.myLayerFilter)
return false;
201 if (myShapeFilter != src.myShapeFilter)
return false;
202 if (myLimitIterations != src.myLimitIterations)
return false;
203 if (myIterations != src.myIterations)
return false;
204 if (myAddShapeDeformerAttrib != src.myAddShapeDeformerAttrib)
return false;
205 if (myShapeDeformerAttrib != src.myShapeDeformerAttrib)
return false;
206 if (myAddXformNameAttrib != src.myAddXformNameAttrib)
return false;
207 if (myXformNameAttrib != src.myXformNameAttrib)
return false;
208 if (myAddLayerNameAttrib != src.myAddLayerNameAttrib)
return false;
209 if (myLayerNameAttrib != src.myLayerNameAttrib)
return false;
210 if (myClipNames != src.myClipNames)
return false;
211 if (myOutputRestPoseAttrib != src.myOutputRestPoseAttrib)
return false;
212 if (myRestPoseAttrib != src.myRestPoseAttrib)
return false;
213 if (mySkeletonColor != src.mySkeletonColor)
return false;
214 if (myOutputTransformGroups != src.myOutputTransformGroups)
return false;
215 if (myTransformGroups != src.myTransformGroups)
return false;
216 if (myOutputMetadataAttrib != src.myOutputMetadataAttrib)
return false;
217 if (myMetadataAttrib != src.myMetadataAttrib)
return false;
218 if (myOutputMetadataJointConfigAttribs != src.myOutputMetadataJointConfigAttribs)
return false;
219 if (myMetadataJointConfigAttribs != src.myMetadataJointConfigAttribs)
return false;
220 if (myFilters != src.myFilters)
return false;
221 if (myTransferAttributes != src.myTransferAttributes)
return false;
222 if (myTransferGroups != src.myTransferGroups)
return false;
223 if (myApplyJointXforms != src.myApplyJointXforms)
return false;
244 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
247 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
250 graph->
evalOpParm(myOutput, nodeidx,
"output", time, graph->
isDirect()?
nullptr:depnode);
251 myUniqueAgentDefinitions =
false;
252 if (
true && ( (
true&&!(((
int64(getOutput())!=1))||((
int64(getOutput())!=1)))) ) )
253 graph->
evalOpParm(myUniqueAgentDefinitions, nodeidx,
"uniqueagentdefinitions", time, graph->
isDirect()?
nullptr:depnode);
254 myApplyAgentXform =
true;
255 if (
true && ( (
true&&!(((
int64(getOutput())==4))||((
int64(getOutput())==4)))) ) )
256 graph->
evalOpParm(myApplyAgentXform, nodeidx,
"applyagentxform", time, graph->
isDirect()?
nullptr:depnode);
257 myRestShapesMode = 0;
258 if (
true && ( (
true&&!(((
int64(getOutput())!=1))||((
int64(getOutput())!=1)))) ) )
259 graph->
evalOpParm(myRestShapesMode, nodeidx,
"unpackrestshapesfrom", time, graph->
isDirect()?
nullptr:depnode);
260 myLayerFilter =
"*"_UTsh;
261 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
262 graph->
evalOpParm(myLayerFilter, nodeidx,
"layerfilter", time, graph->
isDirect()?
nullptr:depnode);
263 myShapeFilter =
"*"_UTsh;
264 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
265 graph->
evalOpParm(myShapeFilter, nodeidx,
"shapefilter", time, graph->
isDirect()?
nullptr:depnode);
266 myLimitIterations =
true;
267 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
268 graph->
evalOpParm(myLimitIterations, nodeidx,
"limititerations", time, graph->
isDirect()?
nullptr:depnode);
270 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((getLimitIterations()==0))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
271 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, graph->
isDirect()?
nullptr:depnode);
272 myAddShapeDeformerAttrib =
false;
273 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
274 graph->
evalOpParm(myAddShapeDeformerAttrib, nodeidx,
"addshapedeformerattrib", time, graph->
isDirect()?
nullptr:depnode);
275 myShapeDeformerAttrib =
"agentshapedeformer"_UTsh;
276 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((getAddShapeDeformerAttrib()==0))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
277 graph->
evalOpParm(myShapeDeformerAttrib, nodeidx,
"shapedeformerattrib", time, graph->
isDirect()?
nullptr:depnode);
278 myAddXformNameAttrib =
false;
279 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
280 graph->
evalOpParm(myAddXformNameAttrib, nodeidx,
"addxformnameattrib", time, graph->
isDirect()?
nullptr:depnode);
281 myXformNameAttrib =
"agenttransformname"_UTsh;
282 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((getAddXformNameAttrib()==0))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
283 graph->
evalOpParm(myXformNameAttrib, nodeidx,
"xformnameattrib", time, graph->
isDirect()?
nullptr:depnode);
284 myAddLayerNameAttrib =
false;
285 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
286 graph->
evalOpParm(myAddLayerNameAttrib, nodeidx,
"addlayernameattrib", time, graph->
isDirect()?
nullptr:depnode);
287 myLayerNameAttrib =
"agentlayername"_UTsh;
288 if (
true && ( (
true&&!(((
int64(getOutput())!=0)&&(
int64(getOutput())!=1))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((getAddLayerNameAttrib()==0))||((
int64(getOutput())!=0)&&(
int64(getOutput())!=1)))) ) )
289 graph->
evalOpParm(myLayerNameAttrib, nodeidx,
"layernameattrib", time, graph->
isDirect()?
nullptr:depnode);
290 myClipNames =
""_UTsh;
291 if (
true && ( (
true&&!(((
int64(getOutput())!=4))||((
int64(getOutput())!=4)))) ) )
292 graph->
evalOpParm(myClipNames, nodeidx,
"clipnames", time, graph->
isDirect()?
nullptr:depnode);
293 myOutputRestPoseAttrib =
true;
294 if (
true && ( (
true&&!(((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
295 graph->
evalOpParm(myOutputRestPoseAttrib, nodeidx,
"outputrestposeattrib", time, graph->
isDirect()?
nullptr:depnode);
296 myRestPoseAttrib =
"rest_transform"_UTsh;
297 if (
true && ( (
true&&!(((
false))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
298 graph->
evalOpParm(myRestPoseAttrib, nodeidx,
"restposeattrib", time, graph->
isDirect()?
nullptr:depnode);
300 if (
true && ( (
true&&!(((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
301 graph->
evalOpParm(mySkeletonColor, nodeidx,
"skeletoncolor", time, graph->
isDirect()?
nullptr:depnode);
302 myOutputTransformGroups =
false;
303 if (
true && ( (
true&&!(((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
304 graph->
evalOpParm(myOutputTransformGroups, nodeidx,
"outputtransformgroups", time, graph->
isDirect()?
nullptr:depnode);
305 myTransformGroups =
"*"_UTsh;
306 if (
true && ( (
true&&!(((getOutputTransformGroups()==0))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
307 graph->
evalOpParm(myTransformGroups, nodeidx,
"transformgroups", time, graph->
isDirect()?
nullptr:depnode);
308 myOutputMetadataAttrib =
false;
309 if (
true && ( (
true&&!(((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
310 graph->
evalOpParm(myOutputMetadataAttrib, nodeidx,
"outputmetadataattrib", time, graph->
isDirect()?
nullptr:depnode);
311 myMetadataAttrib =
"agentmetadata"_UTsh;
312 if (
true && ( (
true&&!(((getOutputMetadataAttrib()==0))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
313 graph->
evalOpParm(myMetadataAttrib, nodeidx,
"metadataattrib", time, graph->
isDirect()?
nullptr:depnode);
314 myOutputMetadataJointConfigAttribs =
false;
315 if (
true && ( (
true&&!(((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
316 graph->
evalOpParm(myOutputMetadataJointConfigAttribs, nodeidx,
"outputmetadatajointconfigattribs", time, graph->
isDirect()?
nullptr:depnode);
317 myMetadataJointConfigAttribs =
"fbik_jointconfig"_UTsh;
318 if (
true && ( (
true&&!(((getOutputMetadataJointConfigAttribs()==0))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4))||((
int64(getOutput())!=3)&&(
int64(getOutput())!=4)))) ) )
319 graph->
evalOpParm(myMetadataJointConfigAttribs, nodeidx,
"metadatajointconfigattribs", time, graph->
isDirect()?
nullptr:depnode);
320 if (
true && ( (!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) )
323 graph->
evalOpParm(length, nodeidx,
"numjointfilters", time, graph->
isDirect()?
nullptr:depnode);
324 if (length < 0) length = 0;
325 myFilters.setSize(length);
332 auto && _curentry = myFilters(i);
334 _curentry.jointnames =
""_UTsh;
335 if (
true && ( (!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) && ( (
true&&!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) )
336 graph->
evalOpParmInst(_curentry.jointnames, nodeidx,
"jointnames#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
337 _curentry.percentage = 100;
338 if (
true && ( (!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) && ( (
true&&!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) )
339 graph->
evalOpParmInst(_curentry.percentage, nodeidx,
"percentage#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
341 if (
true && ( (!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) && ( (
true&&!(((
int64(getOutput())!=2))||((
int64(getOutput())!=2)))) ) )
342 graph->
evalOpParmInst(_curentry.seed, nodeidx,
"seed#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
348 myTransferAttributes =
""_UTsh;
350 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transferattributes", time, graph->
isDirect()?
nullptr:depnode);
351 myTransferGroups =
""_UTsh;
353 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfergroups", time, graph->
isDirect()?
nullptr:depnode);
354 myApplyJointXforms =
true;
355 if (
true && ( (
true&&!(((
int64(getOutput())==0))||((
int64(getOutput())==4))||((
int64(getOutput())==1)&&(
int64(getRestShapesMode())==3))||((
int64(getOutput())==0))||((
int64(getOutput())==4)))) ) )
356 graph->
evalOpParm(myApplyJointXforms, nodeidx,
"applyjointxforms", time, graph->
isDirect()?
nullptr:depnode);
372 template <
typename T>
379 if (idx.
size() != instance.
size()+1)
384 coerceValue(value, myGroup);
387 coerceValue(value, myGroupType);
390 coerceValue(value, myOutput);
393 coerceValue(value, myUniqueAgentDefinitions);
396 coerceValue(value, myApplyAgentXform);
399 coerceValue(value, myRestShapesMode);
402 coerceValue(value, myLayerFilter);
405 coerceValue(value, myShapeFilter);
408 coerceValue(value, myLimitIterations);
411 coerceValue(value, myIterations);
414 coerceValue(value, myAddShapeDeformerAttrib);
417 coerceValue(value, myShapeDeformerAttrib);
420 coerceValue(value, myAddXformNameAttrib);
423 coerceValue(value, myXformNameAttrib);
426 coerceValue(value, myAddLayerNameAttrib);
429 coerceValue(value, myLayerNameAttrib);
432 coerceValue(value, myClipNames);
435 coerceValue(value, myOutputRestPoseAttrib);
438 coerceValue(value, myRestPoseAttrib);
441 coerceValue(value, mySkeletonColor);
444 coerceValue(value, myOutputTransformGroups);
447 coerceValue(value, myTransformGroups);
450 coerceValue(value, myOutputMetadataAttrib);
453 coerceValue(value, myMetadataAttrib);
456 coerceValue(value, myOutputMetadataJointConfigAttribs);
459 coerceValue(value, myMetadataJointConfigAttribs);
463 coerceValue(value, myFilters.entries());
464 else if (instance[0] < myFilters.entries())
466 auto && _data = myFilters(instance[0]);
470 coerceValue(value, _data.jointnames);
473 coerceValue(value, _data.percentage);
476 coerceValue(value, _data.seed);
483 coerceValue(value, myTransferAttributes);
486 coerceValue(value, myTransferGroups);
489 coerceValue(value, myApplyJointXforms);
505 { doGetParmValue(idx, instance, value); }
507 { doGetParmValue(idx, instance, value); }
509 { doGetParmValue(idx, instance, value); }
511 { doGetParmValue(idx, instance, value); }
513 { doGetParmValue(idx, instance, value); }
515 { doGetParmValue(idx, instance, value); }
517 { doGetParmValue(idx, instance, value); }
519 { doGetParmValue(idx, instance, value); }
521 { doGetParmValue(idx, instance, value); }
523 { doGetParmValue(idx, instance, value); }
525 { doGetParmValue(idx, instance, value); }
527 template <
typename T>
534 if (idx.
size() != instance.
size()+1)
539 coerceValue(myGroup, ( ( value ) ));
542 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(2, value ) ));
545 coerceValue(myOutput, clampMinValue(0, clampMaxValue(4, value ) ));
548 coerceValue(myUniqueAgentDefinitions, ( ( value ) ));
551 coerceValue(myApplyAgentXform, ( ( value ) ));
554 coerceValue(myRestShapesMode, clampMinValue(0, clampMaxValue(3, value ) ));
557 coerceValue(myLayerFilter, ( ( value ) ));
560 coerceValue(myShapeFilter, ( ( value ) ));
563 coerceValue(myLimitIterations, ( ( value ) ));
566 coerceValue(myIterations, clampMinValue(1, ( value ) ));
569 coerceValue(myAddShapeDeformerAttrib, ( ( value ) ));
572 coerceValue(myShapeDeformerAttrib, ( ( value ) ));
575 coerceValue(myAddXformNameAttrib, ( ( value ) ));
578 coerceValue(myXformNameAttrib, ( ( value ) ));
581 coerceValue(myAddLayerNameAttrib, ( ( value ) ));
584 coerceValue(myLayerNameAttrib, ( ( value ) ));
587 coerceValue(myClipNames, ( ( value ) ));
590 coerceValue(myOutputRestPoseAttrib, ( ( value ) ));
593 coerceValue(myRestPoseAttrib, ( ( value ) ));
596 coerceValue(mySkeletonColor, ( ( value ) ));
599 coerceValue(myOutputTransformGroups, ( ( value ) ));
602 coerceValue(myTransformGroups, ( ( value ) ));
605 coerceValue(myOutputMetadataAttrib, ( ( value ) ));
608 coerceValue(myMetadataAttrib, ( ( value ) ));
611 coerceValue(myOutputMetadataJointConfigAttribs, ( ( value ) ));
614 coerceValue(myMetadataJointConfigAttribs, ( ( value ) ));
620 coerceValue(newsize, value);
621 if (newsize < 0) newsize = 0;
622 myFilters.setSize(newsize);
628 myFilters.setSizeIfNeeded(instance[0]+1);
629 auto && _data = myFilters(instance[0]);
633 coerceValue(_data.jointnames, value);
636 coerceValue(_data.percentage, value);
639 coerceValue(_data.seed, value);
646 coerceValue(myTransferAttributes, ( ( value ) ));
649 coerceValue(myTransferGroups, ( ( value ) ));
652 coerceValue(myApplyJointXforms, ( ( value ) ));
659 { doSetParmValue(idx, instance, value); }
661 { doSetParmValue(idx, instance, value); }
663 { doSetParmValue(idx, instance, value); }
665 { doSetParmValue(idx, instance, value); }
667 { doSetParmValue(idx, instance, value); }
669 { doSetParmValue(idx, instance, value); }
671 { doSetParmValue(idx, instance, value); }
673 { doSetParmValue(idx, instance, value); }
675 { doSetParmValue(idx, instance, value); }
677 { doSetParmValue(idx, instance, value); }
679 { doSetParmValue(idx, instance, value); }
697 if (fieldnum.
size() < 1)
708 return "uniqueagentdefinitions";
710 return "applyagentxform";
712 return "unpackrestshapesfrom";
714 return "layerfilter";
716 return "shapefilter";
718 return "limititerations";
722 return "addshapedeformerattrib";
724 return "shapedeformerattrib";
726 return "addxformnameattrib";
728 return "xformnameattrib";
730 return "addlayernameattrib";
732 return "layernameattrib";
736 return "outputrestposeattrib";
738 return "restposeattrib";
740 return "skeletoncolor";
742 return "outputtransformgroups";
744 return "transformgroups";
746 return "outputmetadataattrib";
748 return "metadataattrib";
750 return "outputmetadatajointconfigattribs";
752 return "metadatajointconfigattribs";
754 if (fieldnum.
size() == 1)
755 return "numjointfilters";
759 return "jointnames#";
761 return "percentage#";
768 return "transferattributes";
770 return "transfergroups";
772 return "applyjointxforms";
780 if (fieldnum.
size() < 1)
781 return PARM_UNSUPPORTED;
837 if (fieldnum.
size() == 1)
838 return PARM_MULTIPARM;
849 return PARM_UNSUPPORTED;
858 return PARM_UNSUPPORTED;
894 loadData(is, rampdata);
912 int typelen = colon - data.
buffer();
926 {
int64 iv =
v; UTwrite(os, &iv); }
928 { UTwrite<fpreal64>(os, &
v); }
930 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
932 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
933 UTwrite<fpreal64>(os, &v.
z()); }
935 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
936 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
948 if (s) s->save(ostr);
950 saveData(os, result);
957 ostr << s->getDataTypeToken();
962 saveData(os, result);
966 void save(std::ostream &os)
const
970 saveData(os, myGroup);
971 saveData(os, myGroupType);
972 saveData(os, myOutput);
973 saveData(os, myUniqueAgentDefinitions);
974 saveData(os, myApplyAgentXform);
975 saveData(os, myRestShapesMode);
976 saveData(os, myLayerFilter);
977 saveData(os, myShapeFilter);
978 saveData(os, myLimitIterations);
979 saveData(os, myIterations);
980 saveData(os, myAddShapeDeformerAttrib);
981 saveData(os, myShapeDeformerAttrib);
982 saveData(os, myAddXformNameAttrib);
983 saveData(os, myXformNameAttrib);
984 saveData(os, myAddLayerNameAttrib);
985 saveData(os, myLayerNameAttrib);
986 saveData(os, myClipNames);
987 saveData(os, myOutputRestPoseAttrib);
988 saveData(os, myRestPoseAttrib);
989 saveData(os, mySkeletonColor);
990 saveData(os, myOutputTransformGroups);
991 saveData(os, myTransformGroups);
992 saveData(os, myOutputMetadataAttrib);
993 saveData(os, myMetadataAttrib);
994 saveData(os, myOutputMetadataJointConfigAttribs);
995 saveData(os, myMetadataJointConfigAttribs);
998 UTwrite(os, &length);
1001 auto && _curentry = myFilters(i);
1003 saveData(os, _curentry.jointnames);
1004 saveData(os, _curentry.percentage);
1005 saveData(os, _curentry.seed);
1009 saveData(os, myTransferAttributes);
1010 saveData(os, myTransferGroups);
1011 saveData(os, myApplyJointXforms);
1024 loadData(is, myGroup);
1025 loadData(is, myGroupType);
1026 loadData(is, myOutput);
1027 loadData(is, myUniqueAgentDefinitions);
1028 loadData(is, myApplyAgentXform);
1029 loadData(is, myRestShapesMode);
1030 loadData(is, myLayerFilter);
1031 loadData(is, myShapeFilter);
1032 loadData(is, myLimitIterations);
1033 loadData(is, myIterations);
1034 loadData(is, myAddShapeDeformerAttrib);
1035 loadData(is, myShapeDeformerAttrib);
1036 loadData(is, myAddXformNameAttrib);
1037 loadData(is, myXformNameAttrib);
1038 loadData(is, myAddLayerNameAttrib);
1039 loadData(is, myLayerNameAttrib);
1040 loadData(is, myClipNames);
1041 loadData(is, myOutputRestPoseAttrib);
1042 loadData(is, myRestPoseAttrib);
1043 loadData(is, mySkeletonColor);
1044 loadData(is, myOutputTransformGroups);
1045 loadData(is, myTransformGroups);
1046 loadData(is, myOutputMetadataAttrib);
1047 loadData(is, myMetadataAttrib);
1048 loadData(is, myOutputMetadataJointConfigAttribs);
1049 loadData(is, myMetadataJointConfigAttribs);
1052 is.
read(&length, 1);
1053 myFilters.setSize(length);
1056 auto && _curentry = myFilters(i);
1058 loadData(is, _curentry.jointnames);
1059 loadData(is, _curentry.percentage);
1060 loadData(is, _curentry.seed);
1064 loadData(is, myTransferAttributes);
1065 loadData(is, myTransferGroups);
1066 loadData(is, myApplyJointXforms);
1076 if (!thissop)
return getGroup();
1078 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
1086 if (!thissop)
return getGroupType();
1088 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
1096 if (!thissop)
return getOutput();
1098 OP_Utils::evalOpParm(result, thissop,
"output", cookparms.
getCookTime(), 0);
1106 if (!thissop)
return getUniqueAgentDefinitions();
1108 OP_Utils::evalOpParm(result, thissop,
"uniqueagentdefinitions", cookparms.
getCookTime(), 0);
1116 if (!thissop)
return getApplyAgentXform();
1118 OP_Utils::evalOpParm(result, thissop,
"applyagentxform", cookparms.
getCookTime(), 0);
1126 if (!thissop)
return getRestShapesMode();
1128 OP_Utils::evalOpParm(result, thissop,
"unpackrestshapesfrom", cookparms.
getCookTime(), 0);
1136 if (!thissop)
return getLayerFilter();
1138 OP_Utils::evalOpParm(result, thissop,
"layerfilter", cookparms.
getCookTime(), 0);
1146 if (!thissop)
return getShapeFilter();
1148 OP_Utils::evalOpParm(result, thissop,
"shapefilter", cookparms.
getCookTime(), 0);
1156 if (!thissop)
return getLimitIterations();
1158 OP_Utils::evalOpParm(result, thissop,
"limititerations", cookparms.
getCookTime(), 0);
1166 if (!thissop)
return getIterations();
1168 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
1176 if (!thissop)
return getAddShapeDeformerAttrib();
1178 OP_Utils::evalOpParm(result, thissop,
"addshapedeformerattrib", cookparms.
getCookTime(), 0);
1186 if (!thissop)
return getShapeDeformerAttrib();
1188 OP_Utils::evalOpParm(result, thissop,
"shapedeformerattrib", cookparms.
getCookTime(), 0);
1196 if (!thissop)
return getAddXformNameAttrib();
1198 OP_Utils::evalOpParm(result, thissop,
"addxformnameattrib", cookparms.
getCookTime(), 0);
1206 if (!thissop)
return getXformNameAttrib();
1208 OP_Utils::evalOpParm(result, thissop,
"xformnameattrib", cookparms.
getCookTime(), 0);
1216 if (!thissop)
return getAddLayerNameAttrib();
1218 OP_Utils::evalOpParm(result, thissop,
"addlayernameattrib", cookparms.
getCookTime(), 0);
1226 if (!thissop)
return getLayerNameAttrib();
1228 OP_Utils::evalOpParm(result, thissop,
"layernameattrib", cookparms.
getCookTime(), 0);
1236 if (!thissop)
return getClipNames();
1238 OP_Utils::evalOpParm(result, thissop,
"clipnames", cookparms.
getCookTime(), 0);
1246 if (!thissop)
return getOutputRestPoseAttrib();
1248 OP_Utils::evalOpParm(result, thissop,
"outputrestposeattrib", cookparms.
getCookTime(), 0);
1256 if (!thissop)
return getRestPoseAttrib();
1258 OP_Utils::evalOpParm(result, thissop,
"restposeattrib", cookparms.
getCookTime(), 0);
1266 if (!thissop)
return getSkeletonColor();
1268 OP_Utils::evalOpParm(result, thissop,
"skeletoncolor", cookparms.
getCookTime(), 0);
1276 if (!thissop)
return getOutputTransformGroups();
1278 OP_Utils::evalOpParm(result, thissop,
"outputtransformgroups", cookparms.
getCookTime(), 0);
1286 if (!thissop)
return getTransformGroups();
1288 OP_Utils::evalOpParm(result, thissop,
"transformgroups", cookparms.
getCookTime(), 0);
1296 if (!thissop)
return getOutputMetadataAttrib();
1298 OP_Utils::evalOpParm(result, thissop,
"outputmetadataattrib", cookparms.
getCookTime(), 0);
1306 if (!thissop)
return getMetadataAttrib();
1308 OP_Utils::evalOpParm(result, thissop,
"metadataattrib", cookparms.
getCookTime(), 0);
1316 if (!thissop)
return getOutputMetadataJointConfigAttribs();
1318 OP_Utils::evalOpParm(result, thissop,
"outputmetadatajointconfigattribs", cookparms.
getCookTime(), 0);
1326 if (!thissop)
return getMetadataJointConfigAttribs();
1328 OP_Utils::evalOpParm(result, thissop,
"metadatajointconfigattribs", cookparms.
getCookTime(), 0);
1336 if (!thissop)
return getFilters().entries();
1338 OP_Utils::evalOpParm(result, thissop,
"numjointfilters", cookparms.
getCookTime(), 0);
1342 {
return opinstFilters_jointnames(cookparms, &_idx); }
1346 if (!thissop)
return (myFilters(_idx[0]).jointnames);
1348 _parmidx[1-1] = _idx[1-1] + 1;
1351 OP_Utils::evalOpParmInst(result, thissop,
"jointnames#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1355 {
return opinstFilters_percentage(cookparms, &_idx); }
1359 if (!thissop)
return (myFilters(_idx[0]).percentage);
1361 _parmidx[1-1] = _idx[1-1] + 1;
1364 OP_Utils::evalOpParmInst(result, thissop,
"percentage#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1368 {
return opinstFilters_seed(cookparms, &_idx); }
1372 if (!thissop)
return (myFilters(_idx[0]).seed);
1374 _parmidx[1-1] = _idx[1-1] + 1;
1377 OP_Utils::evalOpParmInst(result, thissop,
"seed#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
1386 if (!thissop)
return getTransferAttributes();
1388 OP_Utils::evalOpParm(result, thissop,
"transferattributes", cookparms.
getCookTime(), 0);
1396 if (!thissop)
return getTransferGroups();
1398 OP_Utils::evalOpParm(result, thissop,
"transfergroups", cookparms.
getCookTime(), 0);
1406 if (!thissop)
return getApplyJointXforms();
1408 OP_Utils::evalOpParm(result, thissop,
"applyjointxforms", cookparms.
getCookTime(), 0);
1416 bool myUniqueAgentDefinitions;
1417 bool myApplyAgentXform;
1418 int64 myRestShapesMode;
1421 bool myLimitIterations;
1423 bool myAddShapeDeformerAttrib;
1425 bool myAddXformNameAttrib;
1427 bool myAddLayerNameAttrib;
1430 bool myOutputRestPoseAttrib;
1433 bool myOutputTransformGroups;
1435 bool myOutputMetadataAttrib;
1437 bool myOutputMetadataJointConfigAttribs;
1442 bool myApplyJointXforms;
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setFilters(const UT_Array< Filters > &val)
int64 getIterations() const
bool opOutputTransformGroups(const SOP_NodeVerb::CookParms &cookparms) const
Output opOutput(const SOP_NodeVerb::CookParms &cookparms) const
void setApplyAgentXform(bool val)
bool isParmColorRamp(exint idx) const override
bool opOutputMetadataJointConfigAttribs(const SOP_NodeVerb::CookParms &cookparms) const
GLenum GLuint GLenum GLsizei const GLchar * buf
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)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const UT_StringHolder & getTransformGroups() const
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 setMetadataAttrib(const UT_StringHolder &val)
void setOutputMetadataAttrib(bool val)
RestShapesMode opRestShapesMode(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opTransformGroups(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GLsizei const GLfloat * value
const UT_StringHolder & getLayerNameAttrib() const
const UT_StringHolder & getShapeDeformerAttrib() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool getApplyJointXforms() const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
bool getApplyAgentXform() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool getOutputRestPoseAttrib() const
bool opApplyJointXforms(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Filters &src) const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, fpreal64 v)
void setAddLayerNameAttrib(bool val)
SYS_FORCE_INLINE const char * buffer() const
void setApplyJointXforms(bool val)
GLuint GLsizei GLsizei * length
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_StringHolder opMetadataJointConfigAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
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
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void setLimitIterations(bool val)
void setRestPoseAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool getOutputTransformGroups() const
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)
UT_StringHolder opMetadataAttrib(const SOP_NodeVerb::CookParms &cookparms) 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.
bool opOutputRestPoseAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getOutputMetadataAttrib() const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool getAddXformNameAttrib() const
void setLayerFilter(const UT_StringHolder &val)
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
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
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
UT_StringHolder jointnames
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)
bool opOutputMetadataAttrib(const SOP_NodeVerb::CookParms &cookparms) const
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)
UT_StringHolder opRestPoseAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool getOutputMetadataJointConfigAttribs() const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
exint entries() const
Alias of size(). size() is preferred.
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
const UT_StringHolder & getMetadataAttrib() const
void setOutput(Output val)
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)
void setIterations(int64 val)
bool getLimitIterations() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
UT_StringHolder opLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setMetadataJointConfigAttribs(const UT_StringHolder &val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool opAddLayerNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getMetadataJointConfigAttribs() const
UT_StringHolder opFilters_jointnames(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & w() noexcept
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)
virtual UT_StringHolder baseGetSignature() const
void setXformNameAttrib(const UT_StringHolder &val)
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
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
bool getAddLayerNameAttrib() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setAddShapeDeformerAttrib(bool val)
UT_Vector3D getSkeletonColor() const
exint bread(uint8 *buffer, exint asize=1)
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
SYS_FORCE_INLINE UT_StringHolder getToken(GroupType enum_value)
void setOutputRestPoseAttrib(bool val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_StringHolder opTransferGroups(const SOP_NodeVerb::CookParms &cookparms) const
void setTransformGroups(const UT_StringHolder &val)
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
void setOutputMetadataJointConfigAttribs(bool val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
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
void setOutputTransformGroups(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
const UT_StringHolder & getRestPoseAttrib() const
static void loadData(UT_IStream &is, UT_StringHolder &v)