I am currently writing a ui script for Maya in python.
It goes something like this
#gets the maya main window
def __init__ (self, parent = getMayaWindow()):
#create connections to ui
self.deselect = self.QListWidget.selectedItems()
for j in self.deselect:
so, I have ui that has different tabs at the top and I do not want to put every single piece of code in the MainClass because that would be too messy and long. For every tab, I want to write its script in a different .py file. I want to create the connections under the init function, at the same time, load functions from another script into this MainClass to be used.
Question is, how should I go about calling objectName from the ui in a new file? I tried to import the MainClass code but that didn't work and I don't want the initialize the ui window in the new .py file. What's a good way to go about this?