Saturday, March 9, 2013

Base Window Class


class AR_OptionsWindow(object): //create the AR_OptionsWindow class
    def __init__(self):
        self.window = 'ar_optionsWindow';
        self.title = 'Meng\'s Window';
        self.size = (546, 350);
    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
        );
        cmds.showWindow();
testWindow = AR_OptionsWindow(); //create a new instance of the AR_OptionsWindow class 
testWindow.create();  //call its create() method.

No comments:

Post a Comment