Tue, Nov 19, 6:39 AM CST

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: Poser 6 PoserPython: DialogFileChooser() - parentDialog ?


3dcheapskate ( ) posted Thu, 10 October 2013 at 6:17 AM · edited Wed, 13 November 2024 at 10:38 PM

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).



3dcheapskate ( ) posted Thu, 10 October 2013 at 9:57 AM · edited Thu, 10 October 2013 at 9:58 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).



markschum ( ) posted Fri, 11 October 2013 at 3:44 PM

I use 0 (zero) for parent dialog.


3dcheapskate ( ) posted Thu, 17 October 2013 at 3:19 AM

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).



svdl ( ) posted Sun, 20 October 2013 at 6:48 AM

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

My gallery   My freestuff


3dcheapskate ( ) posted Sun, 20 October 2013 at 10:36 PM · edited Sun, 20 October 2013 at 10:38 PM

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).



svdl ( ) posted Mon, 21 October 2013 at 2:07 AM

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

My gallery   My freestuff


3dcheapskate ( ) posted Mon, 21 October 2013 at 3:17 AM

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).



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.