Random Key Offset

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  11 November 2007
Random Key Offset

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
Joel LeLièvre

Vimeo Videos

  11 November 2007
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

Read my technical blog - lonerobot.net
  11 November 2007
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 07:11 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.