def deleteMush(self): mesh = self.sourceField.text() if not mesh: return if not cmds.objExists(mesh + '_Mush'): return cmds.delete(mesh + '_Mush')