wrstrader
11-27-2008, 06:14 PM
I have looked all over trying to find an answer to my questions and so far have been unsuccessful in finding any answers, so I thought I'd post them. Hope I'm not beating a dead horse.
When I make my stretchy IK, I use the Art of Rigging method of point constraining empty groups to the base joint and IK handle, then use a combination of distanceBetween, multiplyDivide, and conditional nodes to get the correct amount to scale by, then plug them into the scale X of the joints. For some reason, the joints go crazy when I do this. To fix this, I have to plug the amount to scale by into only the base joint scale X, then connect the base joint scale x to the rest of the joints. Why is this?
This is more MEL than rigging related, but my other question is script specific.
Here are the relevant parts of the script:
proc string makeMultDiv (string $distBetwNode, float $jointDist)
{
string $multDivNode = `shadingNode -asUtility multiplyDivide`;
setAttr ($multDivNode + ".operation") 2;
setAttr ($multDivNode + ".input2X") $jointDist;
connectAttr -f ($distBetwNode + ".distance") ($multDivNode + ".input1X");
print $multDivNode;
return $multDivNode;
}
string $ikToMakeStretchy = $ikSelection[0];
float $jointDist = `findJointDistance ($ikToMakeStretchy)`;
string $distBetwNode = `makeDistBetwNode ($ikToMakeStretchy)`;
string $myDivNode = `makeMultDiv ($distBetwNode, $jointDist)`;
When I call the makeMultDiv procedure, it gives me a syntax error on the line that says:
string $myDivNode = `makeMultDiv ($distBetwNode, $jointDist)`;
Anyone have any idea why? Any feedback is appreciated. I got my stretchy IK script working, I'm just wondering why it wouldn't let me structure it the way I wanted.
When I make my stretchy IK, I use the Art of Rigging method of point constraining empty groups to the base joint and IK handle, then use a combination of distanceBetween, multiplyDivide, and conditional nodes to get the correct amount to scale by, then plug them into the scale X of the joints. For some reason, the joints go crazy when I do this. To fix this, I have to plug the amount to scale by into only the base joint scale X, then connect the base joint scale x to the rest of the joints. Why is this?
This is more MEL than rigging related, but my other question is script specific.
Here are the relevant parts of the script:
proc string makeMultDiv (string $distBetwNode, float $jointDist)
{
string $multDivNode = `shadingNode -asUtility multiplyDivide`;
setAttr ($multDivNode + ".operation") 2;
setAttr ($multDivNode + ".input2X") $jointDist;
connectAttr -f ($distBetwNode + ".distance") ($multDivNode + ".input1X");
print $multDivNode;
return $multDivNode;
}
string $ikToMakeStretchy = $ikSelection[0];
float $jointDist = `findJointDistance ($ikToMakeStretchy)`;
string $distBetwNode = `makeDistBetwNode ($ikToMakeStretchy)`;
string $myDivNode = `makeMultDiv ($distBetwNode, $jointDist)`;
When I call the makeMultDiv procedure, it gives me a syntax error on the line that says:
string $myDivNode = `makeMultDiv ($distBetwNode, $jointDist)`;
Anyone have any idea why? Any feedback is appreciated. I got my stretchy IK script working, I'm just wondering why it wouldn't let me structure it the way I wanted.
