Hi all,
I’m attempting to write a script that will let an animator click on a Picker square and select an attribute on the face Control accordingly to MM drag and animate. The issue I’m running into currently is that this script that I’ve made for the face squares works perfectly in the Script Editor of Maya, but NOT in the Action Script section in mGear’s Anim Picker due to it not re-assigning the ‘nameSpace’ variable in the Action Script? Is the Action Script unable to change global variables, or could it be a bug? I haven’t found much documentation about the Action Script for Anim Picker buttons to find out more about how it’s working internally…
import maya.cmds as cmds
import maya.mel as mel
nameSpace = __NAMESPACE__
# Creates the full name of the Attribute that will be selected
faceControl = "%s:upperFace_ctrl.InnerBrowRaiser_L_AU1"%nameSpace
# Selects the full Control
cmds.select("%s:upperFace_ctrl"%nameSpace)
# Converts Python variable to Mel variable
mel.eval('string $faceControlMel = `python "faceControl"`;')
# Selects the Attribute in the Channel Box making it available for quick animation
mel.eval('channelBox -edit -select $faceControlMel mainChannelBox;')
Thank you!