Hey guys I have a helper module that contains a ui class
As you can see I have registered it as a command in maya so if I call
def doIt(self, argList):
def CreateWindow(self, title, width = 400, height = 400):
if cmds.window(title, exists = True):
self._width = width
self._height = height
window = cmds.window(title, title=title, menuBar=True, widthHeight=(width, height), height=self._height, resizeToFitChildren=True )
def AttachButton(self, label, width, height):
cmds.ui('myWindow', 200, 300)
I can create a window, but because I don't have any return of the instance from the "doit", I'm unable to call any inner methods like 'AttachButton', 'AttachTextField' etc' Do you guys have some suggestions as to how I would go about calling these methods?
My first thought was just to create a "Global" property of that object, but I run into a whole other set of problems, that I would like to stay away from. Mainly calling static functions for a UI object...
Another thought is to just convert it to c++ on the SDK, has anyone experienced UI with the sdk 'Not QT'
Thanks in advance!