Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Quote - render the current frame in an animation with the current render settings;
save the resulting .jpg to disk;
increment one frame;
and repeat.
But... Poser does that already, if you set the animation to render to individual image files... I can't remember the exact procedure since I'm not near a copy of Poser at present, but you'll find the settings you need in the animation set-up window, I think. Edited to add: if you haven't successfully rendered an animation from Poser, I doubt if a Python script will magically fix it for you.
Seems you want to know how to do it with Python, not Poser :)
Couldn't test it because I'm at work. But I think it should do:
<pre style="background-color:#FFFFFF;padding-left:5mm;">
import poser<br></br><br></br>imgext = "jpg" # image format<br></br>imagepath = "c:images" # path where images are stored<br></br>filename = "newimage_%05d" # mask for image filenames<br></br> # %05d will be replace with framenumber<br></br><br></br>sf = poser.Scene().Frame() # save current framenumber<br></br>frcount = poser.Scene().NumFrames() # number of frames available<br></br><br></br>for framenr in range(frcount) : # loop trough all frames<br></br> poser.Scene().SetFrame(framenr) # set the framenumber to work with<br></br> poser.Scene().Render() # start the render process<br></br><br></br> # Poser stops python until<br></br> # the renderprocess is finished<br></br><br></br> # save the image<br></br> poser.Scene().SaveImage(imgext,filename % framenr)<br></br><br></br>poser.Scene().SetFrame(sf) # back to the frame we started<br></br>
English Bob - Yes there is a button in the amination menu that does this BUT when I use that method the finished string of .JPGs seam to have tiny movement of lights whick make the finished animation appear to flicker. When I use the render menu to produce the .JPG's the resulting string doesnot display the flicker.
Philc - ADP001 sent a script that might work. Whether it works or needs some tweeking a can follow it enough to figure out where the next stumbling block is.
ADP001 - thanks for taking the time to create this script and adding the text notation.
The first thng i'll be doing is comparing the function calls to what is in the python manual to determine why I couldn't find them to begin with.
English Bob - Yes there is a button in the amination menu that does this BUT when I use that method the finished string of .JPGs seam to have tiny movement of lights whick make the finished animation appear to flicker. When I use the render menu to produce the .JPG's the resulting string doesnot display the flicker.
I used this method to produce 3D-animations. Works fine for me. Each stream (left cam, right cam) without flickering.
By the way - In the script above:
<pre style="background-color:#FFFFFF;padding-left:5mm;">
imagepath = "c:images" # path where images are stored<br></br>
has to be written as:
<pre style="background-color:#FFFFFF;padding-left:5mm;">
imagepath = r"c:images" # path where images are stored<br></br><br></br>
The little "r" in front of the string means: Do not interpret characters with a leading as special characters (like n). Without "r" it has to be written as "c:images" (double backslash).
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 am looking to create my first POSER python script and I'm encountering a killion problems.
What I need python to go is:
at the press of a button;
render the current frame in an animation with the current render settings;
save the resulting .jpg to disk;
increment one frame;
and repeat.
First is this possible in python. ( yes I all ready know about the MAKE MOVIE function in animation but it crashes to often and the lligfhting changes by devine intervention).
Second, within POSER 5, what are the python equivants of render frame, save output, goto next and repeat process.