mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Fix hou.ui.readInput not returning cancel correctly
This commit is contained in:
parent
d2b310a71a
commit
ede0333fbc
1 changed files with 10 additions and 3 deletions
|
|
@ -42,9 +42,16 @@ def create_interactive(creator_identifier):
|
|||
"""
|
||||
|
||||
# TODO Use Qt instead
|
||||
result, variant = hou.ui.readInput('Set variant', initial_contents='Main')
|
||||
if result == -1:
|
||||
raise RuntimeError("User interrupted")
|
||||
result, variant = hou.ui.readInput('Define variant name',
|
||||
buttons=("Ok", "Cancel"),
|
||||
initial_contents='Main',
|
||||
title="Define variant",
|
||||
help="Set the variant for the "
|
||||
"publish instance",
|
||||
close_choice=1)
|
||||
if result == 1:
|
||||
# User interrupted
|
||||
return
|
||||
variant = variant.strip()
|
||||
if not variant:
|
||||
raise RuntimeError("Empty variant value entered.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue