XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : setting a key after selecting hierarchy

11-25-2012, 06:43 AM
I am trying to set key by
cmds.button(l='Set Key', c=maya.cmds.setKeyframe)

and before that I have to select hierarchy so i call this function

def selectHierarchy(self,*args):

but on clicking set key button i get error saying
# Error: No object matches name: False
# ValueError: No object matches name: False #

how do i set key by after selecting the hiearchy?

11-25-2012, 01:08 PM
setKeyframe is being evaluated when you create the button, and returns false.
Try using lambda instead...

maya.cmds.button(l='Set Key', c=lambda x: maya.cmds.setKeyframe())


CGTalk Moderation
11-25-2012, 01:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.