Flip86
08-29-2010, 05:26 PM
hey...i am writing an ik solver node that includes a stretch attribute. in theory it should works good.
i want to scale my joints with scale.By-function in the MFnTransform Class. here my algorithm:
double stretch[3];
stretch[0] = lengthH / 10;
stretch[1] = 1;
stretch[2] = 1;
double noStretch[3];
noStretch[0] = 1;
noStretch[1] = 1;
noStretch[2] = 1;
if (lengthH >= 10) {
startTransformFn.scaleBy ( stretch );
midTransformFn.scaleBy (stretch);
}
startTransformFn.scaleBy ( noStretch );
midTransformFn.scaleBy (noStretch);
the plugin scales the joints but not in the right way. the value that the joints scales is to big. but if i create a stretchy rig with nodes in maya i have to use the same way for the calculation.: length of the handle / 10 (in my example). and it works. but not in my plugin code. but it is the same calculation.
can somebody help me with my problem?? i hope you know what i mean.
thx!!
i want to scale my joints with scale.By-function in the MFnTransform Class. here my algorithm:
double stretch[3];
stretch[0] = lengthH / 10;
stretch[1] = 1;
stretch[2] = 1;
double noStretch[3];
noStretch[0] = 1;
noStretch[1] = 1;
noStretch[2] = 1;
if (lengthH >= 10) {
startTransformFn.scaleBy ( stretch );
midTransformFn.scaleBy (stretch);
}
startTransformFn.scaleBy ( noStretch );
midTransformFn.scaleBy (noStretch);
the plugin scales the joints but not in the right way. the value that the joints scales is to big. but if i create a stretchy rig with nodes in maya i have to use the same way for the calculation.: length of the handle / 10 (in my example). and it works. but not in my plugin code. but it is the same calculation.
can somebody help me with my problem?? i hope you know what i mean.
thx!!
