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

Display and View fallback options for settings and api #10

Conversation

jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Aug 1, 2024

After adding support for context-specific anatomy token resolution in color management display and view options, we must now ensure value validation and provide fallback options. We're introducing a semicolon separator in values, allowing for multiple options where the order is important.

Additional informations

  • colorspace methods were moved from lib to new nuke API module colorspace.py. Some of those function might need to move into core addon but for now lets keep them here.

Testing notes

Pre testing

  • version up dev number in package.py
  • deploy addon version to your server and bundle
  • make sure core colormanagement is enabled
  • notice hints on ayon+settings://nuke/imageio/viewer/display

How to do DCC testing

  • When conducting this testing, it is important to note that a published ocio config may not be present in your task context. Our objective is to determine the backward compatibility of the process and identify any potential issues. It is possible for only certain shot folders to have published ocio configurations, while others may not. In such scenarios, a fallback option must be available.
  • In addition to this PR, the changes in Refactor OCIO config handling, introduce fallback mechanism ayon-core#834 also need to be deployed. Once completed, the colorspace settings in the core addon should be adjusted to use the fallback option. The built-in ACES 1.2 should be selected for this purpose.
  1. To test baking targeting it would be good to disable clearing nodes in your code here ayon-nuke\client\ayon_nuke\api\plugin.py:1090 - just add # on line start. Then after open Nuke. This way baking nodes created during ExtractReviewIntermediates processing will stay in script and you would be able to check how they are set.

  2. Follow next setps where we fork into two different testing
    a. Baking Target Colorspace (Use Display & View)
    - set {project[code]}_{parent}_{folder[name]};sRGB into View here ayon+settings://nuke/imageio/baking_target/display_view/view
    - Go to Nuke and publish render node
    - Check what is set into node just before write node.
    - it should be set to sRGB if ocio config is set to different then published product.

    b. Baking Target Colorspace (Use Colorspace)
    - set {project[code]}_{parent}_{folder[name]};Output - Rec.709 into View here ayon+settings://nuke/imageio/baking_target/colorspace
    - Go to Nuke and publish render node
    - Check what is set into node just before write node.
    - it should be set to Output - Rec.709 if ocio config is set to different then published product.

…e formatting.

- Added COLOR_VALUE_SEPARATOR constant to separate color values.
- Updated the display and view profile formatting method to handle multiple colorspaces separated by the defined separator.
Update display and view settings descriptions to include dynamic value setting and fallback options using semicolon separators.

Added detailed descriptions for display and view settings, explaining dynamic value setting with anatomy context tokens and fallback options using semicolons. Examples provided.
@jakubjezek001 jakubjezek001 added the type: enhancement Improvement of existing functionality or minor addition label Aug 1, 2024
client/ayon_nuke/api/lib.py Outdated Show resolved Hide resolved
client/ayon_nuke/api/lib.py Outdated Show resolved Hide resolved
@moonyuet
Copy link
Member

moonyuet commented Aug 2, 2024

I tried with this setting below:
image
nuke launched with the display and view setting
image
The context works without issue.
image

Include functions to get colorspaces, check colorspace existence on a node, create viewer profile strings, format display and view profiles into strings or dictionaries, and format colorspace profile names.

- Added methods for retrieving display and view colorspaces
- Implemented function to obtain available colorspace profile names
- Included functionality to check if a colorspace exists on a node
- Created functions for generating viewer profile strings
- Developed methods for formatting display and view profiles into strings or dictionaries
- Added function to format colorspace profile names
Detailed description:
- Moved colorspace functions from utils to a new module called colorspace
- Updated imports and references in lib.py
- Added TODOs for further refactoring of related functions
Add new colorspace methods, and enhance display and view handling in ExporterReviewMov class.

- Updated plugin imports to include new functions
- Added methods for formatting anatomy and colorspace
- Enhanced display and view handling logic
Simplify the code by handling view and display value splitting consistently.
@jakubjezek001
Copy link
Member Author

I tried with this setting below

@moonyuet thank you very much for the testing. Yeah that is looking promissing. I wonder if you could rather use anatomy tokens, something like {project[code]}_{parent}_{folder[name]};sRGB
image

This way we should be able to even test that formating on context is working.

@moonyuet
Copy link
Member

moonyuet commented Aug 9, 2024

I tried with this setting below

@moonyuet thank you very much for the testing. Yeah that is looking promissing. I wonder if you could rather use anatomy tokens, something like {project[code]}_{parent}_{folder[name]};sRGB image

This way we should be able to even test that formating on context is working.

It's working
image
image

The commit removes an unused import statement from the colorspace module.
- Renamed global cache variables for clarity and consistency.
- Updated cache access and assignment throughout the code.
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

Tested with baking colorspace looks good
image
I even tested with other parameters too:
image

And the view transform one(I tried with different parameters):
image

So far so good.

jakubjezek001 and others added 4 commits September 11, 2024 11:47
The commit removes the unused function 'format_anatomy' from the plugin file.
- 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.
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

Looks good, good for merge after resolving the cosmetic.
Viewer
image
Bake Colorspace(Use Colorspace)
image
Bake Colorspace(Display & View)
image

@jakubjezek001 jakubjezek001 merged commit 9f0d41a into develop Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants