Forum: Poser Python Scripting


Subject: Parameters

Dana_CH_AZ opened this issue on Jun 29, 2009 · 6 posts


markschum posted Mon, 06 July 2009 at 4:57 PM

tkinter lets youu make a graphic interface , Poser 7 has some dialogs that can be used for specific things , like select from a list, yes/no buttons or input fields for numbers or text. The dialogs are a lot easier than tkinter.

for the file thing you build up a file path as a python string and use os.path.exists(path) to test. It returns a true/false value.
you need to add import os.path to your script.

mypath = runtime path + "/myfile.pz2"
if os.path.exists(mypath):
      loadlibrarypath(mypath)

You can use poser.Libraries to get the runtimes or poser.AppLocation()  to get the poser program folder.

Get the python documentation from www.python.org for python 2.4

** Now for a commercial **

Philc has a document on Poser Python thats pretty good , it includes code examples. 
Very nice examples for tkinter
Its a bit pricey for me but its worth a look. 

** fade to black ****