Forum: Poser Python Scripting


Subject: The CamCircle story.... continued....

Tiny opened this issue on Sep 25, 2004 ยท 12 posts


Tiny posted Sat, 25 September 2004 at 12:22 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

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

: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

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

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

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

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)