mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
raise and error when nothing is selected
This commit is contained in:
parent
02edebad41
commit
25616886bf
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue