timarender opened this issue on Apr 20, 2013 · 5 posts
timarender posted Sat, 20 April 2013 at 10:01 AM
I have some Figures in a scene. I want to create Pose files (pz2) for each Figure, based on their pose at Frame 10. Then I want to load that figure's Pose file into Frame 2.
But. 'SaveLibraryPose' and 'LoadLibraryPose' only operate on the 'CurrentFigure'. Although I can itinerate through the Figures, I cannot find a way to change the 'CurrentFigure'.
I hope I am missing something obvious. I have commented out (#) some lines which I though might be related. Here is the basic code:
for actors in scene.Figures():
#a= actors.Name()
#actor = scene.CurrentFigure()
scene.SetFrame(10)
scene.SaveLibraryPose(pose1)
scene.SetFrame(2)
scene.LoadLibraryPose(pose1)
markschum posted Tue, 23 April 2013 at 1:17 PM
current figure is the current selected figure in Poser.
you want scene.SelectFigure(scene.Figure("Victoria4")) or some variation.
You can iterate through scene.Figures() if you want.
markschum posted Tue, 23 April 2013 at 1:28 PM
something like this will work
import poser
scn = poser.Scene()
figs = scn.Figures()
for fig in figs()
nam = fig.Name()
scn.SelectFigure(fig)
scn.SetFrame(10)
etc.
Not: you can just cut and paste in the keyframe editor. select all frame 10 and copy it and paste to frame 2. No need to save and load pose files.
timarender posted Tue, 23 April 2013 at 1:49 PM
Ah! Many thanks. I had not discovered "SelectFigure" before. That is perfect. Thank you again!
I appreciate it is generally easier to use the Keyframe editor; however my Scene has over 50 Figures and I want to try various combinations and permutations; so need to repeat the process many times. In addition, with so many Figures, Poser tend to slow down and the Keyframe Editor window can sometimes feel a little unresponsive.
markschum posted Tue, 23 April 2013 at 5:08 PM
I assume you have found the Python methods manual pdf file. It should be on the poser help menu and it is in the Poser program folder.