Skip to content

Commit

Permalink
Fix bug on thumbnails for ObjNode
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Oct 31, 2024
1 parent c31d90e commit 1b06f3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/ayon_houdini/api/hda_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1b06f3d

Please sign in to comment.