[Tutor] help :making window

syafiqah amir smileyunder18 at yahoo.com
Sat Dec 31 11:05:46 EST 2016



     On Saturday, December 31, 2016 3:55 PM, syafiqah amir <smileyunder18 at yahoo.com> wrote:
 

 Hello,Im trying to execute the code but the window does not come out.(script from Maya python for games and film)I'm not sure what I did wrong
import maya.cmds as cmds;
class AR_OptionsWIndow(object):    def __init__(self):        self.window ='ar_optionsWindow';        self.title='Options Window';        self.size=(546,350);        self.supportsToolAction=False;        def create(self):        if cmds.window(self.window,exists=True):            cmds.deleteUI(self.window,window=True);        self.window = cmds.window(self.window,title=self.title,widthHeight=self.size,menuBar=True);        self.commonMenu();        cmds.showWindow()    
    def commonMenu(self):        self.editMenu=cmds.menu(label='Edit');        self.editMenuSave=cmds.menuItem(label='Save Settings');        self.editMenuReset=cmds.menuitem(label='Reset Settings');        self.editMenuDiv=cmds.menuItem(d=True);        self.editMenuRadio=cmds.radioMenuItemCollection();        self.editMenuTool=cmds.menuItem(label='As Tool',radioButton=True,enable=self.supportsToolAction);        self.editMenuAction=cmds.menuItem(label='As Action' , radioButton=True ,enable=self.supportsToolAction);        self.helpMenu=cmds.menu(label='Help');        self.helpMenuItem=cmds.menuItem(label='Help on &s'% self.title)

thank you so much in advanced.

   
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: practice.txt
URL: <http://mail.python.org/pipermail/tutor/attachments/20161231/60259113/attachment.txt>


More information about the Tutor mailing list