Sun, Oct 6, 10:46 AM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Oct 05 8:40 pm)



Subject: Simple (I hope) Python question


Silke ( ) posted Sat, 13 February 2010 at 10:29 AM · edited Sat, 05 October 2024 at 3:32 PM

Righty ho.
I use VSS rather frequently, and I also use XA (a little toolbar) all the time.
I add my python scripts in there (MatWriter / PoseWriter etc), but alas, I'd like to add VSS in there, so I can just click it, rather than jump through hoops adding it to a python script button.

Now, I can add VSS main on my little toolbar, and it will set itself in a little python window no problem - but is there anything I can put in there so it opens the python menu, as well?
i.e. an "Open the window" command in the main VSS file?

(Yes, I know, I'm lazy. :))

Silke


Dizzi ( ) posted Sat, 13 February 2010 at 12:52 PM · edited Sat, 13 February 2010 at 12:53 PM

The following script will show the Python Scripts palette:

The following script will show the Python Scripts palette:




#Show python palette
import poser
import wx.aui
bIsShown=False
for x in poser.WxAuiManager().GetManagedWindow().Children:
        try:
                if x.GetName()=='PythonPalette':
                        bIsShown=x.IsShown()
                for y in x.Children:
                        if y.GetName()=='PythonPalette':
                                bIsShown=x.IsShown()
        except: pass
if not bIsShown:
        poser.ProcessCommand(1509)



Silke ( ) posted Sat, 13 February 2010 at 1:01 PM

Thanks Dizzi :)

But that opens a script window as well, with an X in it.

Any way to stop that?

Silke


Dizzi ( ) posted Sat, 13 February 2010 at 1:22 PM

I already edited that part out ;-) 



Silke ( ) posted Sat, 13 February 2010 at 3:08 PM

Thanks, that works a treat!

Silke


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.