diff --git a/client/ayon_houdini/api/lib.py b/client/ayon_houdini/api/lib.py index 816b4a4ae3..8b07ab0022 100644 --- a/client/ayon_houdini/api/lib.py +++ b/client/ayon_houdini/api/lib.py @@ -141,8 +141,8 @@ def get_lops_rop_context_options( end: float = ropnode.evalParm("f2") inc: float = ropnode.evalParm("f3") else: - raise PublishError(f"Unsupported trange value: {trange}" - f" for rop node: {ropnode.path()}") + raise ValueError(f"Unsupported trange value: {trange}" + f" for rop node: {ropnode.path()}") rop_context_options["ropcook"] = 1.0 rop_context_options["ropstart"] = start rop_context_options["ropend"] = end @@ -162,8 +162,8 @@ def get_lops_rop_context_options( elif option_type == "float": value: float = ropnode.evalParm(f"optionfloatvalue{i}") else: - raise PublishError(f"Unsupported option type: {option_type}" - f" on rop node: '{ropnode.path()}'") + raise ValueError(f"Unsupported option type: {option_type}" + f" on rop node: '{ropnode.path()}'") rop_context_options[name] = value return rop_context_options diff --git a/client/ayon_houdini/plugins/publish/collect_usd_rop_layer_and_stage.py b/client/ayon_houdini/plugins/publish/collect_usd_rop_layer_and_stage.py index 9f208d51f5..d619caa833 100644 --- a/client/ayon_houdini/plugins/publish/collect_usd_rop_layer_and_stage.py +++ b/client/ayon_houdini/plugins/publish/collect_usd_rop_layer_and_stage.py @@ -6,6 +6,7 @@ from pxr import Sdf, Usd import pyblish.api +from ayon_core.pipeline import PublishError from ayon_houdini.api import plugin from ayon_houdini.api.lib import ( get_lops_rop_context_options, @@ -82,7 +83,13 @@ def process(self, instance): lop_node: hou.LopNode rop: hou.RopNode = hou.node(instance.data["instance_node"]) - options = get_lops_rop_context_options(rop) + try: + options = get_lops_rop_context_options(rop) + except hou.Error as exc: + raise PublishError( + f"Failed to get context options on rop: {rop.path()}", + detail=f"{exc}" + ) # Log the context options self.log.debug(