Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 27-12-2014 , 04:15 PM
Registered User
Join Date: Mar 2014
Posts: 6

Adding a squash and stretch expression through mel

Hi everyone,
I'm currently trying to finish off a rigging tool I've developed, and the last step to do so is adding an expression for squash and stretch on the spine.

I can't for the life of me figure out how to do so through MEL, however. This is the expression I'm trying to add:

Code:
$scale = curveInfo1.arcLength/($arcLength * root_anim.globalScale);
$sqrt = 1/sqrt($scale);

ik_spine_joint.scaleX = $scale;
ik_spine_joint.scaleY = $sqrt;
ik_spine_joint.scaleZ = $sqrt;

ik_spine_1_joint.scaleX = $scale;
ik_spine_1_joint.scaleY = $sqrt;
ik_spine_1_joint.scaleZ = $sqrt;

ik_spine_2_joint.scaleX = $scale;
ik_spine_2_joint.scaleY = $sqrt;
ik_spine_2_joint.scaleZ = $sqrt;

ik_spine_3_joint.scaleX = $scale;
ik_spine_3_joint.scaleY = $sqrt;
ik_spine_3_joint.scaleZ = $sqrt;

ik_spine_4_joint.scaleX = $scale;
ik_spine_4_joint.scaleY = $sqrt;
ik_spine_4_joint.scaleZ = $sqrt;

ik_spine_5_joint.scaleX = $scale;
ik_spine_5_joint.scaleY = $sqrt;
ik_spine_5_joint.scaleZ = $sqrt;

If anyone could guide me, it'd be greatly appreciated.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads