import maya.cmds as mc class SimpleUI(object): def __init__(self, *args): self.wg={} self.wg['win'] = 'MySimpleWindow' self.wg['dock'] = 'MySimpleDock' if mc.dockControl(self.wg['dock'], exists=True): mc.deleteUI(self.wg['dock']) # window mc.window(self.wg['win']) # layout mc.rowColumnLayout(nc=1) """ controls """ mc.button(l='textField_button', c=self.com_button_command) # this works self.wg['textField'] = mc.textField() mc.button(l='textFieldGrp_button', c=self.com_grp_button_command) # this does not work self.wg['textFieldGrp'] = mc.textFieldGrp() mc.dockControl(self.wg['dock'], area='left', content=self.wg['win']) def com_button_command(self, *args): # this works mc.textField(self.wg['textField'], e=True, tx='blabla') def com_grp_button_command(self, *args): # this does not work mc.textFieldGrp(self.wg['textFieldGrp'], e=True, tx='blabla') SimpleUI() """Error Code""" # // Error: RuntimeError: file line 36: # Object 'MySimpleWindow|rowColumnLayout10|textFieldGrp26' not found. //