Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorspace is never applied by load_image_compositor and load_image_shader #72

Closed
1 task done
alainxi opened this issue Nov 9, 2024 · 0 comments · Fixed by #73
Closed
1 task done

colorspace is never applied by load_image_compositor and load_image_shader #72

alainxi opened this issue Nov 9, 2024 · 0 comments · Fixed by #73
Assignees
Labels
community Issues and PRs coming from the community members type: bug Something isn't working

Comments

@alainxi
Copy link

alainxi commented Nov 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues and added correct labels.

Description

This bug is exactly the same on both loaders (because load_image_shader is based on load_image_compositor ).

Even when a representation has valid colorspace, those loaders don't apply it to the Blender node.

Steps To Reproduce:

From Blender, open Ayon-->Load
Use it to load a product that has colorspace.
Look at the Blender node : it has ACEScc colorspace, even if the representation is supposed to use another one.

Additional context:

Here the 1st line's condition is never met, so the 2nd line is never executed :

if representation.get("colorspaceData"):
    colorspace: str = representation["colorspaceData"]["colorspace"]

The following fix works all right in my tests (in both loaders) :

if representation["data"].get("colorspaceData"):
    colorspace: str = representation["data"]["colorspaceData"]["colorspace"]

if representation.get("colorspaceData"):
colorspace: str = representation["colorspaceData"]["colorspace"]

if representation.get("colorspaceData"):
colorspace: str = representation["colorspaceData"]["colorspace"]

Relevant log output:

@BigRoy BigRoy self-assigned this Nov 9, 2024
@BigRoy BigRoy added type: bug Something isn't working community Issues and PRs coming from the community members labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues and PRs coming from the community members type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants