Python - Stagger keyframes


#21

Hehe. In English it’s the same meaning, too. I was just kidding.
I meant that since programming seems to be a bottomless pit and with my compulsion to find answers to things tending to block out everything else, having someone who would answer all my Python questions would end in both of us never being seen again. :scream:

I was just thinking out loud whether or not it is good form ( ie. something I should incorporate) to load namespaces in functions and why one would ever need to do that.


#22

Brilliant!

And like I said in the Cafe - a lot of useful stuff for reference

cheers Nux95


#23

I took the liberty to turn nux95’s script into a dialog plugin so that the overlap value can be set interactively.
Otherwise script is exactly the same.

 Open source and fully credited.
  
  
  Cheers,
  
  Andre

Edit: corrected version with full name credits.
Edit2: added Paul’s name as well.


#24

Very very nice, thanks. :applause:
Could you add my real name ? :wink: :smiley:


#25

Oh, absolutely. I looked at the end of your posts for a name but didnt the see the full name at the side. Apologies.

Will upload a corrected version right away.


#26

Thanks very much, :slight_smile:
by the way, nice and clean code. :wink:


#27

And it would be nice to get my name in there as original concept.

Attached - some work (still learning) with Nuxs code to make the thing more modular
ie allow for future functions to perform different key transformations

And lastly - this script doesnt shunt all the keys forward by the offset value. Which all previous scripts seem to. ie the first selected object in the OM stays where it is and the others have their keys staggered.


#28

Cheers Andre

atb

Paul


#29

You can stagger any animated objects by placing them in a Cloner object.

  • Uncheck Fix Clone
  • Set Count to the number of objects and Position Y to 0
  • Select the Cloner and create a Step Effector
  • Uncheck Scale on the Step Effector and increase the Time Offset
  • You can flip the Spline to reverse the direction of the stagger.

According to this thread (on mograph.net) you can even use a 2nd approach with a Fracture Object and the Inheritance Effector. However, I have not been able to get this to work. I prefer the Step Effector anyway as this gives a lot of flexibility.

Cheers.


#30

You can also get the same effect by typing a formula into the selected keys. But this little script saves adding anything new to the scene and is easier to control than the formula method.


#31

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.