PDA

View Full Version : Random Key Offset


jlelievre
11-07-2007, 05:22 AM
I have a scene where there are 100 objects being animated over 1000 frames. (very simple move from point A to point B.) Is there a way to select those objects, and have their keys all shifted to, lets say fall between frames 250 and 750 instead of 1-1000? I don't want to scale them, just have their positions moved on the timeline. I thought maybe using the moveKeys funtion but I can't figure out how to add in the desired animation range of 250-750?

thanks in advance

LoneRobot
11-08-2007, 01:28 PM
not fast but movekeys maps a collection (or in this case the selected array of objects) and moves the start and end.

If you have differences with start and end times on different objects then you'd have to use the .keys array to extract the first and last keys.

objs = selection as array

selectKeys objs 0f -- the frame with your first key
movekeys objs 250 #selection -- bump them forward 250
deselectKeys objs 250f -- deselect the start keys

selectKeys objs 1000f -- select the end keys
movekeys objs -250 #selection -- nudge them back 250
deselectKeys objs 1000f

CGTalk Moderation
11-08-2007, 01:28 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.