Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Checked some of the scripts that come with Poser6 and found these variants which both work:
getOpenFile = poser.DialogFileChooser(type=poser.kDialogFileChooserOpen, message="Dialog title text goes here", startDir="nothing");
getOpenFile = poser.DialogFileChooser(type=poser.kDialogFileChooserOpen, message="Dialog title text goes here");
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Thanks - I've also seen root used somewhere (not sure where) so tried a couple of variations. These four all work...
selFile = poser.DialogFileChooser(type=poser.kDialogFileChooserOpen, message="Select Tattoo Mask Image To Match Your Figure"); # As per second post
selFile = poser.DialogFileChooser(poser.kDialogFileChooserOpen**, 0,** "Select Tattoo Mask Image To Match Your Figure (0)"); # Use 0
selFile = poser.DialogFileChooser(poser.kDialogFileChooserOpen**, root,** "Select Tattoo Mask Image To Match Your Figure (root)"); # Use root
selFile = poser.DialogFileChooser(poser.kDialogFileChooserOpen**,** "Select Tattoo Mask Image To Match Your Figure ()"); # Miss it out
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
The word "root" in your 2nd example should be the name of a Dialog object. In that script, do you see a line somewhere like "root =poser.Dialog(...)" ?
If not "root" will simply be initialized with a zero value, which means it's the same as #use 0
You can check my P6 SpawnCharacter script in freestuff: I seem to remember to have used the dialog root in that script. It opens a dialog, but some buttons open "sub"dialogs with the root set to the main dialog.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Not sure where I saw 'root' used so I can't go back and check - I should've checked when I first found it, but I was probably half-asleep!
What puzzles me more is why the third one (missing it out) works? Maybe I'll have to actually look at some actual documentation regarding Python functions... ! (they don't seem to work the same way as C...)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Not that surprlising. C++ has overloaded functions, so does Python.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Ah yes... that would be it... my brain's rustier than I thought! :lol:
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
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.
From the manual:
DialogFileChooser( type,
parentDialog, message,
startDir)
What do I use for 'parentDialog' ? The manual doesn't give any clues (Poser 9 manual neither).
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).