Results 1 to 3 of 3

Thread: [Maya] setKeyframe -time flag issue

  1. #1

    Default [Maya] setKeyframe -time flag issue



    I'm having a strange behaviour with the setKeyframe command in Maya, when I give it a list of frames it sets a key at those times but it uses the value on the last one to set the other values, all I want to do is key the attribute at whatever value they have at that given time.

    Example:

    cmds.setKeyframe("character:leg_ctrl.parentSpace", time = [30, 40, 50])

    It will key the "parentSpace" attribute at those frames, but will take whatever value it has at frame 50 and apply it in frames 30 and 40.

    I'm not sure if this is a bug or I'm not using this command properly.

  2. #2
    while loop
    Join Date
    Feb 2010
    Posts
    179

    Default

    I'm not seeing that behavior in my quick and dirty test. Though I was keying translateX, so maybe the type of attribute is the problem?

  3. #3
    if clause
    Join Date
    Sep 2011
    Location
    Austin, TX
    Posts
    122

    Default

    I've had that issue before. To fix it, use the "insert" flag:
    Code:
    cmds.setKeyframe("character:leg_ctrl.parentSpace", time=[30, 40, 50], insert=True)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •