Fri, Jan 3, 8:19 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Render every n:th frame of animation


Tiny ( ) posted Wed, 23 December 2015 at 8:13 AM · edited Fri, 03 January 2025 at 1:44 AM

The script I have is built upon Ockhams CamCircle script. It rotates the cam and renders every frame of an animation in 16 directions (or other selected amount of directions). How would I go about to add the choice of "render n:th frame" of an animation within the above mentioned script? For example, I have an animation with 39 frames and would like to render every 3rd frame of it. I can do this within Poser itself of course, one direction at a time but figured I try to automate it as much as possible. :) Here is the main action part of the script:

CamRot = scene.Actor(CamName).Parameter("yOrbit") for F in range(scene.NumFrames()): for Step in range(int(Steps)): scene.SetFrame(F) CamRot.SetValue(Step * 360.0 / Steps) scene.Render() LastName = 'Angle%3.2f%1d.png' % (Step,F) scene.SaveImage("png",os.path.realpath('E:/')+'Renders/'+(LastName)) poser.CloseDocument(1) return 1 # All OK

Sorry, I don't know how to prevent the text bunching up like that.



bagginsbill ( ) posted Wed, 23 December 2015 at 8:17 AM

Change

for F in range(scene.NumFrames()):

to

for F in range(0, scene.NumFrames(), 3):


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 23 December 2015 at 8:19 AM · edited Wed, 23 December 2015 at 8:20 AM

Note the parameters to the range function are

initialvalue (I used 0), limit, step (I used 3)

When you only say one argument then it assumes initialValue = 0 and step = 1


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Tiny ( ) posted Wed, 23 December 2015 at 9:24 AM

Thank you bagginsbill! Hugs



Privacy Notice

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.