Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
You could try adding a comment line to the .pz3 file. Fairly easy using the standard Python file handling routines.
Before rendering, your script could read in the .pz3 file and scan for the comment markers ( // ). The name of the .pz3 file is known when you're batch rendering.
It's probably wisest not to add those comments on the first line of the .pz3 file. I'd try inserting those comments right after the version info. That way, you'll only have to read a few lines from the entire .pz3, saves a lot of memory and will speed up things. Also, the first occurence of something that is NOT a comment and NOT version info indicates that this .pz3 doesn't have markers, so you can stop scanning and close the file.
Another option would be adding an invisible prop to the scene (a box or a plane, something simple). Set its internal name to PropertyObject, and its name to a string that's useful to you. At render time you can access poser.Scene().ActorByInternalName("PropertyObject").Name(), and you'll have your property string.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
svdl, thanks for your thoughts.
i would like to embed a message during the scene creation if possible. maybe there is a property that i am not using that i could use for this purpose. any ideas on that?
i have started compressing all my files so they are difficult to edit. i can put the info in the name of the file itself, but it would be more object oriented if it were a property of the scene.
Hmm. The only thing I can think of is the StartupScript() / SetStartupScript() combination.
Actually, putting the non-standard render settings in the Python script that's set as the startup script would do the job perfectly. No need for additional Python when you're rendering!
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
I've thought about this too, and couldn't find a self-contained solution.
You could have a script for adding notes, which would pop up an
edit box and re-save the PZ3 with the comment added near the
start as svdl suggests.
But if you're keeping the PZ3's in compressed form, that gets tricky.
The really tricky part is the fact that Python doesn't know the name
of the currently loaded PZ3. I guess they were thinking that you
can load and import several PZ3's at once, which makes the
title indeterminate anyway.
One thing I had thought of doing (but never got around to!)...
Use a spreadsheet-readable file as the overarching 'storyboard'.
For instance a CVS file (comma-delimited) which you can handle neatly
in Excel. Then you could set up the whole story in advance, with render
settings and lots of text in their proper columns, and your batch-render
script could use the CVS file as its complete guide. The batch-render
could pop up your notes, make any needed changes in the scene,
and do the render.
My python page
My ShareCG freebies
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 render my scenes differently according to their category. however, i am discovering that some scenes may need exceptions. example: i need to set the light shadow bias lower in some cases but i don't want that to be the general setting, as it increases the render time at least 10% for my type of scenes.
is there a way via poserpython to add a property i can retrieve at render time? preferably, it would be a string.