Thu, Oct 3, 7:24 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

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: Dialog boxes


Anthony Appleyard ( ) posted Fri, 18 July 2008 at 12:41 AM · edited Thu, 03 October 2024 at 5:21 AM

In a Python script I want to use the function DialogFileChooser, but the manual says that it was introduced in Poser 7. I have Poser 7; but what % of Poser users still use Poser 4/5/6?


markschum ( ) posted Fri, 18 July 2008 at 1:18 AM

Hence tkinter :)

There are a lot of people with versions earlier than 7 . Its a choice to decide what you will support with scripts . V4 is really only supposed to work with Poser 6 or 7 .

Depending on what you are doing you might document the manual procedure for earlier versions or use tkinter .


semidieu ( ) posted Fri, 18 July 2008 at 2:16 AM

But don't forget that Tkinter is not available in Poser 5/6 on Mac !!!


Anthony Appleyard ( ) posted Fri, 18 July 2008 at 6:29 AM

Please what is Tkinter and where to download or buy it?


PhilC ( ) posted Fri, 18 July 2008 at 6:55 AM

Tkinter is a GUI module for Python.
It is already installed within Poser.

See:-
http://www.pythonware.com/library/tkinter/introduction/

http://docs.python.org/lib/module-Tkinter.html


markschum ( ) posted Fri, 18 July 2008 at 4:17 PM

Philc has a Python manual/tutorial product that gives working examples of stuff and explains tkinter.  I find tkinter a bit of  a pit  myself so I tend to edit scripts to get parameters and file paths into scripts . 

or check out some of these.. http://wiki.python.org/moin/TkInter
 


semidieu ( ) posted Fri, 18 July 2008 at 4:31 PM

Also, another important note:

Poser 4 users do not have python
Poser 5 users has python, but a LOT is limited...
Poser 6 users... HAS the DialogFileChooser, at least in the latest update.

I just tried this code:

import poser

dlg =
poser.DialogFileChooser(poser.kDialogFileChooserOpen, None,'')<br></br>
if dlg.Show():<br></br>
 print dlg.Path()

 


bagginsbill ( ) posted Mon, 21 July 2008 at 7:45 AM

As Semidieu says, I've found also that these functions were introduced in a Poser 6 SR, so most people have them.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


jenay ( ) posted Tue, 22 July 2008 at 6:10 AM

here is a small test snippet that could do the job:

from Tkinter import *
import tkFileDialog

fn=tkFileDialog.asksaveasfilename()
pz2Out=open(fn,'w')
pz2Out.write("... und aus is ...")
pz2Out.close()


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.