Skip to content

Conversation

@jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Nov 19, 2025

Changelog Description

Enhanced OCIO (OpenColorIO) configuration generator with improved color space management and display/view control. This update introduces separate data and working color space handling, adds granular display/view configuration options, and modernizes Python type annotations. The changes enable more precise color management workflows for VFX pipelines by separating linear AP0 data space from linear AP1 working space and providing better control over target displays and views.

Additional info

Key Technical Improvements:

  • Dual Color Space Architecture: Separated data_space (default: lin_ap0) and working_space (default: lin_ap1) for better ACES compliance
  • Enhanced Display/View Control: New target_display and target_view parameters allow precise control over OCIO display configurations
  • Flexible Target Configuration: Support for both display/view pairs and direct colorspace targeting via target_colorspace parameter
  • Display Management: Added set_displays(), append_displays(), and clear_displays() methods for programmatic display control
  • Modernized Type Annotations: Updated from Optional[type] to type | None Python 3.10+ syntax
  • Improved OIIO Integration: Updated oiiotool command generation to use correct color space mappings

The refactoring maintains backward compatibility while providing more granular control over color pipeline configuration, essential for modern VFX workflows requiring ACES-compliant color management.

Testing notes:

  1. Create an OCIO config with separate data/working spaces and verify color transforms work correctly
  2. Test new display/view configuration options by setting target_display and target_view parameters
  3. Validate target_colorspace fallback when display/view pairs are not specified
  4. Verify oiiotool command generation produces correct color space arguments
  5. Test display management methods (set_displays, append_displays) for programmatic control

Updates the OCIO config generator to support multiple displays and improve target view space handling.

Introduces dedicated methods for managing displays, enhancing flexibility.
Modifies how target view spaces are configured to handle both OCIO v1 and v2 configurations.
Ensures proper display list and active display settings are set.
Updates default data and working space.
Removes the `test` command from the available options displayed in the default function. This command is no longer needed or relevant.
Simplifies the assignment of display views within the OCIO configuration generator.

It clarifies the logic for adding display views, removing redundant conditional checks based on OCIO config versions. The `addDisplayView` method arguments are now passed as named arguments.
@jakubjezek001 jakubjezek001 marked this pull request as ready for review November 19, 2025 08:57
@jakubjezek001 jakubjezek001 self-assigned this Nov 19, 2025
@jakubjezek001 jakubjezek001 added the enhancement New feature or request label Nov 19, 2025
"""
for arg in args:
if isinstance(arg, list):
self.append_displays(*arg)
Copy link
Member

Choose a reason for hiding this comment

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

Why not just?

Suggested change
self.append_displays(*arg)
self._displays.extend(*arg)

"--colorconfig",
self._dest_path,
(f'--ociolook:from="{self.working_space}"' f':to="{self.working_space}"'),
(f'--ociolook:from="{self.working_space}"' f':to="{self.data_space}"'),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(f'--ociolook:from="{self.working_space}"' f':to="{self.data_space}"'),
f'--ociolook:from="{self.working_space}"' f':to="{self.data_space}"',

self.data_space = data_space or "lin_ap0"
self.working_space = working_space or "lin_ap1"

if all([target_view, target_display]):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if all([target_view, target_display]):
if target_view and target_display:

@tweak-wtf
Copy link
Collaborator

just chiming in to say that the CI test here fail because our source for oiiotool is offline.
made a patch that uses oiiotool from pypi here #49

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants