Fri, Jan 10, 6:03 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: Getting current document name by P7 / PoserPython


gbn ( ) posted Fri, 12 January 2007 at 7:03 PM · edited Fri, 09 August 2024 at 1:11 PM

Hi,
there are many methods like SaveDocument, NewDocument, etc.. But how can a get the name of the current open poser document (in example MyFile.pz3)?
TIA


nruddock ( ) posted Fri, 12 January 2007 at 7:28 PM

Quote - Hi,
there are many methods like SaveDocument, NewDocument, etc.. But how can a get the name of the current open poser document (in example MyFile.pz3)?
TIA

You can't.

AFAIK, there are two simple workarounds :-

  1. Save the document with a known name.
    or
  2. Open a document with a known name.


gbn ( ) posted Sat, 13 January 2007 at 4:36 AM

OK,

background of my question is, that I plan to implement a render job, where for each camera and light setting of a scene and frame an image is automatically rendered. Fine would be to store multiple camera and light setting as ".cm2" or ".lt2", where ".pz3" is the name of  the current document  ". As far as the definition is split into several parts and the file is opened by several successive sessions, keeping the name in mind is a litte cumbersome. An alternative would be to manage a specific rendering profile, but is there not a more elegant way for current scene name retrieval?

BR / Gunnar


gbn ( ) posted Mon, 15 January 2007 at 1:25 AM

Implemented a kinda profile, where the last P7 document name is stored. This needs to be synchronized by explicit opening of a document. Is not very handy for mix of hand and batch work. Now OK.


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.