FORUMS: list search recent posts

New to MEL Scripting: regenerating expressions after key framing.

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
lauren neel
New to MEL Scripting: regenerating expressions after key framing.
on Jun 8, 2013 at 11:00:05 pm

I am making a very simple mel scipt that involves some expressions. I need to be able to key my character (blik) but still have him retain the expressions. Currently, the expressions break as soon as I keyframe him. How do I fix this?!?

here are my expressions earlier in the code above my UI
expression -s "blik_R_HandControl.translateZ = blik_R_FootControl.translateZ * sin(2)";
expression -s "blik_L_HandControl.translateZ = blik_L_FootControl.translateZ * sin(-2)";
expression -e -s "if (blik_L_FootControl.translateZ < blik_R_FootControl.translateZ)\n{\n$dist = blik_L_FootControl.translateZ - blik_R_FootControl.translateZ;\n}\nelse\n{\n$dist = blik_R_FootControl.translateZ - blik_L_FootControl.translateZ;\n}" -o "" -ae 1 -uc all expression1;

This is inside of my UI box code (I have it commented out because it is not working right now)
//set key frame button
//columnLayout;
//button -label "Set Keyframe" -command "setKeyFrame";

here is the command proc
/*set keyframe procedure

proc setKeyFrame()

{ setKeyframe;
expression -s "blik_R_HandControl.translateZ = blik_R_FootControl.translateZ * sin(2)";
expression -s "blik_L_HandControl.translateZ = blik_L_FootControl.translateZ * sin(-2)";
expression -e -s "if (blik_L_FootControl.translateZ < blik_R_FootControl.translateZ)\n{\n$dist = blik_L_FootControl.translateZ - blik_R_FootControl.translateZ;\n}\nelse\n{\n$dist = blik_R_FootControl.translateZ - blik_L_FootControl.translateZ;\n}" -o "" -ae 1 -uc all expression1;
}

*/

I thought having the proc set the keyframes and then "re create" the expressions would work but it does not. Any help would be amazing!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]