raise and error when nothing is selected

This commit is contained in:
Jakub Trllo 2022-08-11 15:08:14 +02:00
parent 02edebad41
commit 25616886bf

View file

@ -40,6 +40,9 @@ def create_placeholder():
placeholder_name = create_placeholder_name(args, options)
selection = cmds.ls(selection=True)
if not selection:
raise ValueError("Nothing is selected")
placeholder = cmds.spaceLocator(name=placeholder_name)[0]
# get the long name of the placeholder (with the groups)