Skip to content

Handle missing colorspace from display and view - #1983

Open
jakubjezek001 wants to merge 1 commit into
developfrom
enhancement/integrateor-respect-colorspacedata-with-display-view
Open

Handle missing colorspace from display and view#1983
jakubjezek001 wants to merge 1 commit into
developfrom
enhancement/integrateor-respect-colorspacedata-with-display-view

Conversation

@jakubjezek001

@jakubjezek001 jakubjezek001 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Derive the colorspace template value from display and view when colorspace is unavailable, with a view-only fallback.

Testing

ideally test with ynput/ayon-nuke#347

If 'colorspace' is missing from colorspaceData, fall back to a
combination of 'display' and 'view' or just 'view'.
@ynbot ynbot added size/XS type: enhancement Improvement of existing functionality or minor addition labels Aug 5, 2026
@jakubjezek001 jakubjezek001 changed the title Handle missing colorspace in integration template [YN-####]: Handle missing colorspace from display and view Aug 5, 2026
@jakubjezek001 jakubjezek001 changed the title [YN-####]: Handle missing colorspace from display and view Handle missing colorspace from display and view Aug 5, 2026
@jakubjezek001
jakubjezek001 marked this pull request as ready for review August 5, 2026 09:44
@jakubjezek001 jakubjezek001 self-assigned this Aug 5, 2026
Comment on lines 625 to 637
if repre.get("colorspaceData"):
colorspace = repre["colorspaceData"]["colorspace"]
colorspace = repre["colorspaceData"].get("colorspace")
display = repre["colorspaceData"].get("display")
view = repre["colorspaceData"].get("view")
if not colorspace and (display and view):
colorspace = f"{display}_{view}"
elif not colorspace and not display and view:
colorspace = view
# replace spaces with underscores
# pipeline.colorspace.parse_colorspace_from_filepath
# is checking it with underscores too
colorspace = colorspace.replace(" ", "_")
template_data["colorspace"] = colorspace

@iLLiCiTiT iLLiCiTiT Aug 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
repre_colorspace_data = repre.get("colorspaceData")
if repre_colorspace_data:
colorspace = repre_colorspace_data.get("colorspace")
if not colorspace:
display = repre_colorspace_data.get("display")
view = repre_colorspace_data.get("view")
if display and view:
colorspace = f"{display}_{view}"
elif view:
colorspace = view
# replace spaces with underscores
# pipeline.colorspace.parse_colorspace_from_filepath
# is checking it with underscores too
if colorspace:
colorspace = colorspace.replace(" ", "_")

@ynbot ynbot moved this to Review In Progress in PR reviewing Aug 5, 2026
@BigRoy

BigRoy commented Aug 5, 2026

Copy link
Copy Markdown
Member

This is incorrect, right? As far as I know we can't just assume display+view is also settable as colorspace.

Display/View != Colorspace.

@iLLiCiTiT

iLLiCiTiT commented Aug 5, 2026

Copy link
Copy Markdown
Member

If this is needed then we should require to also fill colorpsace in the data, or?

And actually this is good question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS type: enhancement Improvement of existing functionality or minor addition

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

4 participants