Tue, Nov 26, 8:04 PM 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 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: Entering Text In PoserPython - PhilC Take a Look


bushi ( ) posted Mon, 05 February 2001 at 8:48 PM ยท edited Sat, 16 November 2024 at 2:28 PM

Attached Link: http://bushi3d.com/PythonScripts/tkinput.py

I looked into using standard Python functions for entering text data. I couldn't get it to work correctly so I tried using TkInter instead. I've built a script that will display a pop-up window and accept text properly. The basic mechanism should be transferable to just about any PoserPython script that needs this functionality. It's based on the animateTrans script that comes with the PPP but has some extras that let the pop-up to close properly.


PhilC ( ) posted Tue, 06 February 2001 at 5:40 AM

Thanks bushi, I took a look yesterday evening. Slept on it, and you know what? I awoke this morning just as confusticated as I was last night :))
Aint learnin' fun? :))
philc_agatha_white_on_black.jpg


jbrugion ( ) posted Tue, 06 February 2001 at 1:24 PM

I reduced your script to just the input portion and it ran fine under straight Python ( I have both Python 2.0 installed for development as well as the Python 1.5.x that's running under Poser). If you're still having trouble I'll try it again tonight under Poser. FYI, I have found that On My Machine (OMM) Poser does not like running a script that has a Tkinter gui AND brings up the Python console window under Poser. The console and the GUI tend to beat up on each other. If you're debugging, close the GUI first from task manager or the start bar and then the console should come back with the error message(s). Important safety tip would be not to write a script that has a gui and then tries to print to the console. For anyone doing any serious gui work I heartily suggest taking a look at Python MegaWidgets at: http://www.dscpl.com.au/pmw/ Has a bunch of python scripts that build up on the basic Tkinter-Python widgets to make things like ComboBoxes, validated entry fields, etc. Heck of a lot easier to use than writing it yourself. It's pure python so it should run on a Mac or PC. I have tested it on my PC and one of my unindicted co-conspirators successfully tested it on his Mac. PMW is heavily featured in the book "Python and Tkinter Programming" so it should be free of alien influences.


Grammer ( ) posted Thu, 08 February 2001 at 11:49 AM

Hi, are any MAC snakeheads around ? This script refuses entering any data on a MAC - shouldnt Python be compatible between the two platforms ? I wandered around in many newsgroups - no hint on this one. Buttons and everything else works fine. Hope to post my first scripts in a week or so: Automatic blinking and breathing. Karl


bushi ( ) posted Fri, 09 February 2001 at 12:09 AM

This is just a test script. I agree that using the console wouldn't be something to do as a standard practice. It was just to display some output from the script. jb - I've been looking at that book too. I'm wondering if it would be better for now to avoid extensions like PMW. I do agree with you that they are very useful and can help a lot getting the GUI built. I'm also concerned that having to find and install extras like PMW might scare off a lot of the non-techs. What are your thoughts? Grammer - Ouch! Sorry to hear that the script isn't working on your Mac. I too thought that PoserPython was going to work the same on both platforms. You might want to look at the animateTrans script that I used as the model. There may have been something Mac-related that I missed. Let me know if you find something so I can make course corrections.


bushi ( ) posted Fri, 09 February 2001 at 12:14 AM

I should have stuck this in the last post, sorry. Concerning having things work on the Mac, did you try the FaceRandomizer and did it work correctly on your Mac?


Grammer ( ) posted Fri, 09 February 2001 at 1:00 AM

We are developping on two platforms, all we did up to now runs fine on NT, only data entry does not work on MAC - you facerandomizer runs perfectly on the MAC


bushi ( ) posted Fri, 09 February 2001 at 1:45 AM

Grammer - Thanks for the info. Since I don't have access to a Mac to try these scripts, your feedback is very helpful. The cross-platform aspect of PoserPython is the one area that troubles me since I can't check it myself. Hopefully, it will hold true as the scripts folks are working on get more complex.


Grammer ( ) posted Fri, 09 February 2001 at 2:11 AM

I am working on finding a fix or work around for this, may be it is just a quite simple thng, because I never found it posted in a newsgroup


Grammer ( ) posted Thu, 22 February 2001 at 2:10 AM

I was able to solve it. When I got the new distribution of Python with Poser (2.0) The Poser installer did not remove the preferences from Python 1.5.3, which I had previously installed. I deleted them and now it works fine. You should also avoid to run several distributions of Python or TCL/TK parallel on one machine. The same holds for TCL/TK. TCL/TK (V 8.3) installs a folder in your "System Extensions" folder called "Tool command Language". In this folder are 5 aliases. In order for TK to run, theses 5 aliases should point to the respective files in your Poser: Runtime:Python folder. If you install TK seperately these aliases point to somewhere in the desert. You can also run into problems if you move your Poser folder on another harddisk or into another directory, then the aliases are not correct anymore. Learned again something: Be careful snakes may bite Karl


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.