feat: Migrate to OpenImageIO 3.x and build it with OpenColorIO#1087
feat: Migrate to OpenImageIO 3.x and build it with OpenColorIO#1087mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
OIIO development has moved to v3. Also adding ocio support with oiio. Signed-off-by: Michael Oliver <mcoliver@gmail.com>
|
|
||
| # OCIO apps are not needed. | ||
| LIST(APPEND _configure_options "-DOCIO_BUILD_APPS=OFF") | ||
| LIST(APPEND _configure_options "-DOCIO_INSTALL_EXT_PACKAGES=MISSING") |
There was a problem hiding this comment.
Why did you add this? Is there a missing dependencies? I don't think it should be needed since OCIO version hasn't changed.
There was a problem hiding this comment.
https://opencolorio.readthedocs.io/en/latest/quick_start/installation.html#automated-installation
MISSING is the default so this line is not needed. I was debugging some things on my local machine (issues specifically with yaml-cpp) and had added the line so I could set it to NONE or ALL. Would recommend leaving it for debugging purposes but also understand not adding unnecessary lines.
I defer to your judgement here on what to do. Please let me know which direction you would like to go with.
There was a problem hiding this comment.
Oh, that's right. I forgot that it was the default value. We can keep it. It will make the OCIO build more transparent.
|
Thank you @mcoliver! I added the |
|
Hi @mcoliver, You will need to add the following to oiio.cmake to fix the issue with OpenJPEG: |
There was a problem hiding this comment.
Pull request overview
Updates the project’s OIIO integration to the v3 series and enables OpenColorIO support in the OIIO dependency build.
Changes:
- Updated OIIO C++ integration for v3 namespace/API changes (notably
read_imageand error namespace). - Enabled OCIO support in the OIIO external dependency build and wired in the OCIO dependency target.
- Bumped the pinned OIIO version and download hash in default dependency settings.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib/image/IOoiio/IOoiio.cpp | Adjusts OIIO namespace usage and updates read_image call for OIIO v3 API. |
| cmake/dependencies/oiio.cmake | Enables OCIO in OIIO build configuration and adds OCIO to dependency list. |
| cmake/dependencies/ocio.cmake | Tweaks OCIO install behavior for external packages. |
| cmake/defaults/CYCOMMON.cmake | Updates pinned OIIO version and associated download hash. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -148,6 +148,7 @@ LIST(APPEND _configure_options "-DZLIB_ROOT=${RV_DEPS_ZLIB_ROOT_DIR}") | |||
|
|
|||
| # OCIO apps are not needed. | |||
| LIST(APPEND _configure_options "-DOCIO_BUILD_APPS=OFF") | |||
There was a problem hiding this comment.
This option can materially change what gets installed/bundled (and may affect licensing/footprint and build reproducibility). Please add a short inline comment explaining why MISSING is required for this project (vs NONE/default), and what external packages are expected to be pulled in under typical CI environments.
| LIST(APPEND _configure_options "-DOCIO_BUILD_APPS=OFF") | |
| LIST(APPEND _configure_options "-DOCIO_BUILD_APPS=OFF") | |
| # Use MISSING so OCIO vendors its own third-party deps when not already provided by RV_DEPS (vs NONE/default), | |
| # pinning versions and avoiding ABI/licensing drift with system libs; typical CI pulls in Imath/OpenEXR components, | |
| # yaml-cpp, pystring, expat, lcms2, zlib, and related OCIO external packages. |
Hi @mcoliver, do you have time to fix the issues in the CI? Depending on the platforms, OIIO can not find OCIO or OPENJPEG_VERSION. |
| LIST(APPEND _configure_options "-DBUILD_TESTING=OFF") | ||
| LIST(APPEND _configure_options "-DUSE_PYTHON=0") # this on would requireextra pybind11 package | ||
| LIST(APPEND _configure_options "-DUSE_OCIO=0") | ||
| LIST(APPEND _configure_options "-DUSE_OCIO=ON") |
There was a problem hiding this comment.
Since we are using OCIO with OpenRV, is there a reason to add OCIO to OIIO? Is there a specific feature that you needed? @mcoliver
OIIO development has moved to v3. Also adding ocio support with oiio.
Linked issues
fixes #893
Summarize your change.
Upgrade OIIO to v3 and build with OCIO
Describe the reason for the change.
OIIO v2 is considered obsolete: https://github.com/AcademySoftwareFoundation/OpenImageIO/releases/tag/v2.5.19.1
Note that this is a patch release for the obsolete 2.5 branch that merely repairs its ability to build under new versions of some dependencies. You need not upgrade if you are not encountering build problems. Except for legacy constraints, everybody should currently be using OIIO 3.0 and testing the beta for 3.1 which will become the new supported branch very soon.Describe what you have tested and on which operating system.
built locally and tested on macos for 2024 and 2025. Need the Academy's CICD to build for other configs
Add a list of changes, and note any that might need special attention during the review.
It appears OIIO implementation is pretty minimal so I think we should be good but testing on other distros to validate would be appreciated.
If possible, provide screenshots.