Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
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.
Attached Link: Download pzrXml20
I've just finished the docs for the new version of pzrXml, a dynamic dialog module for Poser 6. --- New in this version: **Module Name: pzrXml20** You should import pzrXml20 instead of pzrXml to use the new features. **PzrDialog** This class replaces both the old XmlManager and the widget's place method. Here's the revised workflow: dlg = PzrDialog(width=320, height=240) label = PzrMessage("Hello world!") dlg.add(label, 160, 110) dlg.add(PzrOkButton(), 260, 210) dlg.Show() **PzrValueButton (and family)** New widgets that ask for and store values. For instance, clicking a PzrFileButton will open the file browser, and then store the resulting file path. You can use a PzrValueButton's get() method to retrieve the stored value. You can easily extend PzrValueButton to make your own value-storing widgets with filtered display text and values. The other new value button widgets are: PzrDirButton, PzrFileButton, PzrFloatButton, PzrIntButton, PzrPickImageButton, and PzrMenuButton. **PzrImageButton** Like PzrButton, but uses an image of your choosing rather than the default button graphic. **AskDirectory** Like AskOpen and AskSave, this pops up a directory chooser that doesn't change the current working directory. **PzrWidget Attribute: callback** Many PzrWidgets can now be created with a callback attribute, which should equal either None or a function that takes one argument. The function will be run when the widget is clicked. myButton = PzrButton("Click me!", callback=myFunction) **PzrWidget Attribute: width, height** These replace the bb and rect attributes to define the size of a widget. myImage = PzrImage("My Image", width=32, height=16) **PzrRadioPane Method: setOnClick(function)** This method can assign a function to be called whenever a radio button is clicked. The function should be able to take one argument, which is the radio button's name. **Clicking PzrRadio/PzrCheck Text** You can now click a PzrRadio/PzrCheck's text to toggle its selection, rather than having to click right on the checkbox or radiobutton. --- The help files have been fully updated for all new features. Like its predacessor, you cannot redistribute PzrXml 2.0 without prior permission.