I could not quite understand, but we can about how to use scriptJob? scriptJob on legCtrl1.fkik -> myExpr - make the procedure, which contains the show or hide depending on conditions.sorry if that translate translator.
2012/11/26 Berg Jones <[email protected]> > 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 > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
