Skip to content

Commit

Permalink
Add handling for config without displays and specify colorspace in OCIO.
Browse files Browse the repository at this point in the history
- Added logic to handle configuration without displays by setting a default value.
- Updated the comment to clarify that the colorspace should exist in the running OCIO configuration session.
  • Loading branch information
jakubjezek001 committed Sep 11, 2024
1 parent 1bd1d36 commit cda388e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/ayon_nuke/api/colorspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def get_formatted_display_and_view_as_dict(
view = StringTemplate.format_strict_template(
dv_item["view"], formatting_data
)
# for config without displays - nuke_default
test_string = view
display = dv_item["display"]
if display:
Expand All @@ -277,7 +278,7 @@ def get_formatted_display_and_view_as_dict(

log.debug(f"Resolved View: '{view}' Display: '{display}'")

# Make sure formatted colorspace exists in running session
# Make sure formatted colorspace exists in running ocio config session
if test_string in root_display_and_view:
return {
"view": view,
Expand Down

0 comments on commit cda388e

Please sign in to comment.