Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
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"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.
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
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.
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.