Forum: Poser - OFFICIAL


Subject: python keyframes ..

cortic opened this issue on Feb 10, 2013 · 12 posts


ockham posted Sun, 10 February 2013 at 6:02 AM

Attached Link: Set Range

The cure is probably to set parts of the timeline to linear, rather than adding lots of keys.  You can do this in the animation controls, which are clumsy and hard to use.

Or you might try my little script that sets the current actor or figure to linear or spline, before or after the current keyframe.  It's in the ZIP linked above.

Or you could use this simple code to keyframe the whole timeline for the current actor.   I use this a lot in short animations. 

import poser
scene = poser.Scene()
TheActor = scene.CurrentActor()

Run a loop across frames.

for i in range(0,scene.NumFrames()):
  scene.SetFrame(i)
  TheActor.AddKeyFrame(i)  # force keyframes

If you want to keyframe only every 3rd frame,

 

import poser
scene = poser.Scene()
TheActor = scene.CurrentActor()

Run a loop across frames.

for i in range(0,scene.NumFrames(),3): # every third frame
  scene.SetFrame(i)
  TheActor.AddKeyFrame(i)  # force keyframes

 

And so on.....

 

My python page
My ShareCG freebies