On 31/12/16 16:05, syafiqah amir via Tutor wrote: > Hello,Im trying to execute the code but the window does not come out.
Please always post python code in plain text, otherwise the html gets wrapped and it becomes illegible. > (script from Maya python for games and film) This group is for core python language and library issues, Maya is a bit off topic (although you may get lucky) You would probably get a better response on the Maya support fora: http://forums.autodesk.com/t5/Maya/ct-p/area-c2 > I'm not sure what I did wrong Nor me, and because the code is so mangled I can't guess either... > 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) > -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor