On Saturday, December 31, 2016 3:55 PM, syafiqah amir
<[email protected]> 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.
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)
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor