-
Notifications
You must be signed in to change notification settings - Fork 32
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
Refactor OCIO config handling, introduce fallback mechanism #834
base: develop
Are you sure you want to change the base?
Refactor OCIO config handling, introduce fallback mechanism #834
Conversation
- Added function to extract config path from profile data - Updated global config retrieval to use new function - Introduced fallback mechanism for missing product entities
… in colorspace and conversion modules. - Update version references to 0.4.5 for future removal in colorspace module. - Update function name and version reference to 0.4.4 for imageio config conversion in the conversion module.
Could this get better testing notes - and maybe a slightly more description PR description as well. Why are these changes made and what does it now allow us to do that wasn't possible before or what does it fix? |
- Removed redundant folder info handling - Added fallback mechanism for missing folder info
…files-and-templated-values
Improve handling of fallback data for OCIO config path. Simplified logic and error messages for better clarity.
Co-authored-by: Jakub Trllo <[email protected]>
…files-and-templated-values
…files-and-templated-values
…files-and-templated-values
…files-and-templated-values
Adjust imageio config conversion function to handle changes in settings from 0.4.4 to 0.4.5, ensuring proper profile usage and plugin conversion consistency.
Simplified conditional check for ocio_config_profiles presence.
The commit updates the field name from "type" to "fallback_type" for consistency in the colorspace and settings modules.
Changed function name from '_conver_publish_plugins' to '_convert_publish_plugins' for consistency and clarity. Updated the function call accordingly in 'convert_settings_overrides'.
for inx, profile in enumerate(ocio_config_profiles): | ||
if profile["type"] != "product_name": | ||
continue | ||
|
||
# create new profile | ||
new_profile = { | ||
"type": "published_product", | ||
"published_product": { | ||
"product_name": profile["product_name"], | ||
"fallback": { | ||
"type": "builtin_path", | ||
"builtin_path": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio", | ||
}, | ||
}, | ||
"host_names": profile["host_names"], | ||
"task_names": profile["task_names"], | ||
"task_types": profile["task_types"], | ||
"custom_path": profile["custom_path"], | ||
"builtin_path": profile["builtin_path"], | ||
} | ||
|
||
# replace old profile with new profile | ||
ocio_config_profiles[inx] = new_profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for inx, profile in enumerate(ocio_config_profiles): | |
if profile["type"] != "product_name": | |
continue | |
# create new profile | |
new_profile = { | |
"type": "published_product", | |
"published_product": { | |
"product_name": profile["product_name"], | |
"fallback": { | |
"type": "builtin_path", | |
"builtin_path": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio", | |
}, | |
}, | |
"host_names": profile["host_names"], | |
"task_names": profile["task_names"], | |
"task_types": profile["task_types"], | |
"custom_path": profile["custom_path"], | |
"builtin_path": profile["builtin_path"], | |
} | |
# replace old profile with new profile | |
ocio_config_profiles[inx] = new_profile | |
for profile in ocio_config_profiles: | |
if profile.get("type") != "product_name": | |
continue | |
profile["type"] = "published_product" | |
profile["published_product"] = { | |
"product_name": profile.pop("product_name"), | |
"fallback": { | |
"type": "builtin_path", | |
"builtin_path": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio", | |
}, | |
} |
if "ocio_config_profiles" not in imageio_overrides: | ||
return | ||
|
||
ocio_config_profiles = imageio_overrides["ocio_config_profiles"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "ocio_config_profiles" not in imageio_overrides: | |
return | |
ocio_config_profiles = imageio_overrides["ocio_config_profiles"] | |
ocio_config_profiles = imageio_overrides.get("ocio_config_profiles") | |
if not ocio_config_profiles: | |
return |
…files-and-templated-values
Changelog Description
Improved color management distribution now includes fallback options. If no published OCIO config is found, the system will default to any predefined OCIO config path.
Additional info
Testing notes:
1.This is very difficult to test. Approach me if you can so I can help you and discuss with you the way it should work.
2. For now, just deploy to your server the settings
3. Reboot server
4. Notice that ayon+settings://core/imageio/ocio_config_profiles/0/type
Published product
is having additional settings for fallback.5. Since you do not have any published product you can just type anything into the field
Product name
it does not matter what.6. In fallback section set it to build in ACES1.2
7. Open Nuke or any other DCC and see that its OCIO path is pointing to the build in path. You can observer this in AYON tray console just before the DCC is opened. Look for line with
>>> [ Setting OCIO environment to config path: <path>