Forum: Poser Python Scripting


Subject: Ensuring that the "Python Scripts" palette is visible (Poser 8+)

Dizzi opened this issue on Feb 14, 2010 ยท 2 posts


Dizzi posted Sun, 14 February 2010 at 7:02 AM

If you got a python script that needs the "Python Scripts" palette to be visible, here's a script to ensure the palette is visible. You can for example add these lines to the Wardrobe Wizard script in Poser 8's scripts menu, so the Python Scripts palette opens automatically if it's not already open :-)

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