Forum: Poser Python Scripting


Subject: Getting current document name by P7 / PoserPython

gbn opened this issue on Jan 12, 2007 · 4 posts


gbn posted Fri, 12 January 2007 at 7:03 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.