destro75 opened this issue on Mar 27, 2006 ยท 9 posts
destro75 posted Mon, 27 March 2006 at 1:41 PM
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"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
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
destro75 posted Tue, 28 March 2006 at 10:08 PM
Interesting, thanks svdl!