I have one control that I'm using to control FK/IK on a leg. I dont want to 
have one for IK and one for FK because it gets confusing. Right now I have 
reverse foot roll and translate attributes that I want to hide when I'm in 
FK mode and vice versa.

Heres the expression in question that will  disable translateX but wont 
unhide switch into IK.

Thanks!!!!

import maya.cmds as cmds 
import maya.mel as mel

mel.eval('proc hideStuff(){setAttr -k 0 "legCtrl1.tx";}')
mel.eval('proc showStuff(){setAttr -k 1 "legCtrl1.tx";}')

myExpr = '''
if (legCtrl1.fkik == 0)
{
    hideStuff();
}

else if (legCtrl1.fkik == 1)
{
    showStuff();
}
'''

cmds.expression(string=myExpr)

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to