I would like to end an entire script once an attribute has not been found. Currently, I have the following code. I display a dialog and use sys.exit()
to end the script but I m wondering if there is a cmds dialog that does this automatically for you without sys.exit()
,
def check_attr(attr):
if not cmds.select(cmds.ls(attr)):
cmds.confirmDialog(title= 'Attribute not found ', message = attr+' attribute was not found', button =['OK'])
sys.exit()
My question: Does a cmds...Dialog that stops a script exist?