Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 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