Sun, Oct 6, 9: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: Documentation on Poser Dialogs?


destro75 ( ) posted Mon, 27 March 2006 at 1:41 PM · edited Sun, 06 October 2024 at 7:01 AM

Hey all, Does anyone have any documentation on what you can do with Poser's built in Dialogs? I started using the DialogSimple() this morning, for a select list, and a yes/no box, but I was wondering if there is any data out there on what else can be done with this? I assume it works better than tkInter, since it should function on a Mac without problems. I would rather build my interfaces this way, than with something Mac users can't use. TIA.


PhilC ( ) posted Mon, 27 March 2006 at 1:51 PM

Attached Link: http://www.poseworks.com

You may find the link to Poseworks pzrXml helpful. The link is on the right hand side of the page under "Categories"

philc_agatha_white_on_black.jpg


3dtrue ( ) posted Mon, 27 March 2006 at 1:58 PM

can u show what u did with it? I am curious too.


PhilC ( ) posted Mon, 27 March 2006 at 2:04 PM

Me or destro75?

philc_agatha_white_on_black.jpg


3dtrue ( ) posted Mon, 27 March 2006 at 2:12 PM

u beat me to the thread. that was for destro. I just downloaded pzrXml! thanks for the link. pretty cool.


destro75 ( ) posted Mon, 27 March 2006 at 2:33 PM

Phil, you are the best. Thanks a bunch! I wasn't even aware that existed, but it may just come in handy in the future. Best of all, it has documentation on the original Poser Dialogs.

3dtrue, I don't have the code with me right now, as I am at work, but here is an example of what I did this morning:

def GetFigure(scene):
figList = [] # Create an empty list to hold the figures in the scene.
for figs in scene.Figures():
figList.append(figs.Name()) # Load the list with each figure in the scene.
figAName = poser.DialogSimple.AskMenu("Choose your figure:", "Choose the figure:", figList) # Offer the user the choice of figures

return scene.Figure(figAName)

scene = poser.Scene()
figA = GetFigure(scene)

This is just a quick hack together of some code. I honestly don't even know off the top of my head if it is functional, though I am pretty sure it would work. I set up some code like this in the morning, before I left for work, so I will know for sure later on if it is okay. The obvious advantage to this approach is that it should work cross-platform, unlike the problems with tkInter on the Mac.

The script I am working on is to transfer morphs from one figure to another. I originally had the figures hard coded, but then I came across one of the poser dialog references by accident in one of the "built-in" scripts, so I figured I would give that a shot. Once I did that, I started wondering what else the dialogs can be used for.

The PzrDialog is very interesting though. I'll be checking that out later on. My wheels are starting to turn on Python Scripts to be written, so we'll see where these take me.


destro75 ( ) posted Mon, 27 March 2006 at 2:34 PM

Yeah, I figured you were talking to me. I must have been typing my reply while you two were chatting. ;-)


svdl ( ) posted Tue, 28 March 2006 at 6:49 PM

A little trick concerning Poser Dialogs: in the xml file you almost always find the attribute 'isStringID="1"' and 'widgetText="number:number"' If you replace 'isStringID="1"' with 'isStringID="0"' and 'widgetText="number:number"' with 'widgetText="My text goes here"', the dialog will show the text of the widgetText attribute, instead of looking up the text in a string resource table. So you won't have to use the SetText dialog method to change the text on a widget to something useful.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


destro75 ( ) posted Tue, 28 March 2006 at 10:08 PM

Interesting, thanks svdl!


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.