From 1b06f3d981acdfd6f0a20ef0bbab77628065bef8 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 31 Oct 2024 15:36:04 +0100 Subject: [PATCH] Fix bug on thumbnails for `ObjNode` --- client/ayon_houdini/api/hda_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/ayon_houdini/api/hda_utils.py b/client/ayon_houdini/api/hda_utils.py index e0be65b51e..e1841343cd 100644 --- a/client/ayon_houdini/api/hda_utils.py +++ b/client/ayon_houdini/api/hda_utils.py @@ -190,7 +190,7 @@ def _get_filepath_from_context(context: dict): template = _remove_format_spec(template, "udim") if frame is not None: # Substitute frame number in sequence with $F with padding - repre_context["frame"] = "$F{}".format(len(frame)) # e.g. $F4 + repre_context["frame"] = "$F{}".format(len(frame)) # e.g. $F4 template = _remove_format_spec(template, "frame") project_name: str = repre_context["project"]["name"] @@ -410,7 +410,10 @@ def on_flag_changed(node, **kwargs): if not images: return - brightness = 0.3 if node.isBypassed() else 1.0 + # This may trigger on a node that can't be bypassed, like `ObjNode` so + # consider those never bypassed + is_bypassed = hasattr(node, "isBypassed") and node.isBypassed() + brightness = 0.3 if is_bypassed else 1.0 has_changes = False node_path = node.path() for image in images: