Skip to content

fix: Add DesktopVideoDevice::colorProfile() on macOS#1239

Open
bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
bernie-laberge:fix_color_profile_on_macos
Open

fix: Add DesktopVideoDevice::colorProfile() on macOS#1239
bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
bernie-laberge:fix_color_profile_on_macos

Conversation

@bernie-laberge
Copy link
Copy Markdown
Contributor

Add DesktopVideoDevice::colorProfile() on macOS

Linked issues

Fixes #1034

Describe the reason for the change.

Note that this PR is adding the following to @williamwira 's PR: #1080

Prior to Open RV 3.1.0 (aka 2025.1.0), the macOS supported automatic color profile detection because it was implemented in CGDesktopVideoDevice.
Now CGDesktopVideoDevice is no longer used and DesktopVideoDevice is used instead which does not contain automatic color profile detection on macOS.
This PR solves this regression by adding the code that used to be in CGDesktopVideoDevice to DesktopVideoDevice::colorProfile() on macOS.

Summarize your change.

  • macOS color profile support: Implements DesktopVideoDevice::colorProfile() for macOS using the ColorSync framework. The method enumerates online displays, finds the correct screen by index, and reads the ICC profile description and file URL from the display's ColorSyncProfileRef. Previously this virtual method was only implemented on Windows.

  • OCIO synlinearize/syndisplay initialization fix: Adds an m_initialized flag to OCIOIPNode to prevent spurious exceptions being thrown during node construction. The updateFunction() call in the constructor can fire before transform URL/data properties are set; the guard lets those early calls return cleanly instead of throwing.

  • OCIO empty input color space fix: synlinearize and syndisplay build their pipelines from file/URL transforms rather than named OCIO color spaces, so an empty ocio.inColorSpace is valid for those modes. The early return in updateFunction() is now skipped for those two function types.

Describe what you have tested and on which operating system.

Successfully tested on macOS

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SYNDisplay outTransform.url property regression

1 participant