Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5421 from fabiaserra/bugfix/houdini_creator_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
antirotor authored Sep 4, 2023
2 parents 859a620 + 1ac1b18 commit 1a02a05
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions openpype/hosts/houdini/api/creator_node_shelves.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,32 @@ def create_interactive(creator_identifier, **kwargs):
list: The created instances.
"""
host = registered_host()
context = CreateContext(host)
creator = context.manual_creators.get(creator_identifier)
if not creator:
raise RuntimeError("Invalid creator identifier: {}".format(
creator_identifier)
)

# TODO Use Qt instead
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)
result, variant = hou.ui.readInput(
"Define variant name",
buttons=("Ok", "Cancel"),
initial_contents=creator.get_default_variant(),
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.")

host = registered_host()
context = CreateContext(host)
creator = context.manual_creators.get(creator_identifier)
if not creator:
raise RuntimeError("Invalid creator identifier: "
"{}".format(creator_identifier))

# TODO: Once more elaborate unique create behavior should exist per Creator
# instead of per network editor area then we should move this from here
# to a method on the Creators for which this could be the default
Expand Down

0 comments on commit 1a02a05

Please sign in to comment.