Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Many thanks! I have corrected it and it runs. But oddly, at any keyframe it only finds one paramater for one actor. e.g.
I Load Andy. At frame 11, I set values for his "Chest", for Twist, Side-Side and Bend. When I run the script, it only finds "Twist". And not for the other two parameters.
It feels like Keyframes are attached to the Actor, but don't indicate all the Parameters which may have contributed to being a Keyframe for the Actor.
Hoping I am making sense. And more hopeful that I am missing something obvious.
Thank you.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
I would like to access the values of any parameters of Actors which contain keyframes. Andy's Chest, for example includes Twist, Side-Side, Bend, Scale etc.
My slightly ugly code below does NOT work. And I don't understand why not.
Please. Can anyone put me out my misery - how am I supposed to do it?
scene = poser.Scene()
scene.SetFrame(0)
figs = scene.Figures()
for fig in figs:
acts= fig.Actors()
for actor in acts:
scene.SelectActor(actor)
frame = 0
scene.SetFrame(frame)
for parm in actor.Parameters():
frame = 0
while( frame < scene.NumFrames()-1):
frame = parm.NextKeyFrame()
if(not frame):
frame = scene.NumFrames()
else:
scene.SetFrame(frame)
print frame, actor.Name(), parm.Name(), parm.Value()