Sun, Jan 5, 7:21 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: The CamCircle story.... continued....


Tiny ( ) posted Sat, 25 September 2004 at 12:22 PM ยท edited Thu, 18 July 2024 at 8:54 PM

:o)
You were right ockham. I needed the light to circle also. But it doesn't do it correct with my light settings.

  1. I need only for yRotate of the light to rotate.

  2. When AuxCam is yOrbit 90 the yRotate of the light is 245. And when AuxCam is 0 the yRotate of light is 155.


So me said to self: "Piece of cake. Me can fix this. We don't have to ask ockham about it.
And now self is screeming and going on about me messing up the whole thing! :o(

----------------- original part of script ----------
CamRot.SetValue(Step * 360.0 / Steps)
LightRot.SetValue(-Step * 360.0 / Steps)


help!



Tiny ( ) posted Sat, 25 September 2004 at 6:52 PM

The solving was (of course) easier than I thought. :oP
As can be seen in previous post I didn't have the yRotate of the light set to 0. Which made it all to a mess.

I zeroed it and rotated my object so it would be correct relative to the light. Now the Cam and Light both start at 0.

So now the part of the script looks like this:
CamRot.SetValue(Step * 360.0 / Steps)
LightRot.SetValue(Step * 360.0 / Steps)


Thank you again ockham for helping us "deadly" to get some excercise for our brains.



ockham ( ) posted Tue, 28 September 2004 at 10:16 AM

Sometimes the best way to solve a problem is to write out the question for somebody else!

My python page
My ShareCG freebies


Tiny ( ) posted Tue, 28 September 2004 at 1:47 PM

Yes, it happens quite often. One struggles with something for hours/days. Post the problem, and then the solution falls in place.

Next I need a script just for batching several Poser files. One render, close, open next, render.... etc.
I'll give it a try self first. Unless you have one allready in da' closet?



ockham ( ) posted Tue, 28 September 2004 at 2:24 PM

file_130635.jpg

Here's a "render-only" script, formed by taking some lines out of CamCircle. I haven't tried it.... Remember that the Save Image only works properly when the render is done in the document window. If you change this to render-to-new-window, Python will not be able to save the images.

My python page
My ShareCG freebies


Tiny ( ) posted Tue, 28 September 2004 at 2:29 PM ยท edited Tue, 28 September 2004 at 2:31 PM

:oD .... 'fast' is not the right word here... Thanks! edit: I mean... something faster is needed... lightning and such ;o) to show how quick scripts pops up.

Message edited on: 09/28/2004 14:31



ockham ( ) posted Tue, 28 September 2004 at 2:34 PM

If you want a separate render for each frame (without changing cams and lights) let me know and I'll make that modification.

My python page
My ShareCG freebies


Tiny ( ) posted Tue, 28 September 2004 at 5:27 PM

Yep. Would appreciate it. :o)

Only one render. No animations, only 1 frame. Main cam. 800 x 600. No change of settings. Just open - render - save - close, open next - render - save - close, etc.

I put the scenes together on one puter, renders them on another. :oP



ockham ( ) posted Tue, 28 September 2004 at 9:26 PM

file_130636.jpg

Okay. This one is a little tricky, because setting the Document Window is one of those actions that Python is not allowed to do, for some stupid reason! So I had to sneak in through the back door by writing and loading a little PZ2 file. Since PZ2 only works on a figure, this script will only work if you have a figure somewhere in the scene. Doesn't matter which figure, and doesn't matter which one is selected; just has to be a figure. I suspect that all of your scenes include a figure. If you have a bunch of figure-less scenes, I'll have to add another back-door trick.

My python page
My ShareCG freebies


Tiny ( ) posted Wed, 29 September 2004 at 10:21 AM

file_130637.jpg

Yes, I have figures in all of the scenes. Not a bunch but allways at least 2. -------------------------- I got the above error. I took a look at it but didn't understand any. :oP

..setting the Document Window is one of those
actions that Python is not allowed to do,
for some stupid reason!<<

Does one have to do that then? Can we not go with the previous solution as in the CamCircle?
Since none of these scenes/cams/lights/size need to be changed by the script. Just open, render and save.



ockham ( ) posted Wed, 29 September 2004 at 10:32 AM

file_130638.jpg

Oh. The scenes are already set to 800 x 600? In that case:

My python page
My ShareCG freebies


Tiny ( ) posted Wed, 29 September 2004 at 1:17 PM

file_130639.jpg

hmmm.... get an error again.

Does the 'Invalid scene object' mean the pz3 file or something within the scene?

You don't have to mess with this. It is not a too big hassle to render manually. :o) Just that I always try to make things "easier". ;o)



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.