Skip to content

Commit 7f72a86

Browse files
Additional updates for OCIO (AcademySoftwareFoundation#2323)
- Add documentation for the new `MATERIALX_BUILD_OCIO` flag in the Developer Guide. - Remove the legacy Python OCIO functionality in `colorspace.py`, which we believe is no longer used in any application or studio pipeline.
1 parent 0fbb22d commit 7f72a86

File tree

5 files changed

+2
-86
lines changed

5 files changed

+2
-86
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ set(MATERIALX_PYTHON_VERSION "" CACHE STRING
116116
"Python version to be used in building the MaterialX Python package (e.g. '3.9').")
117117
set(MATERIALX_PYTHON_EXECUTABLE "" CACHE FILEPATH
118118
"Python executable to be used in building the MaterialX Python package (e.g. 'C:/Python39/python.exe').")
119-
set(MATERIALX_PYTHON_OCIO_DIR "" CACHE PATH
120-
"Path to a folder containing the default OCIO configuration to be packaged with MaterialX Python (e.g. 'D:/Projects/OpenColorIO-Configs/aces_1.0.3').")
121119
set(MATERIALX_PYTHON_PYBIND11_DIR "" CACHE PATH
122120
"Path to a folder containing the PyBind11 source to be used in building MaterialX Python.")
123121

@@ -187,7 +185,6 @@ mark_as_advanced(MATERIALX_COVERAGE_ANALYSIS)
187185
mark_as_advanced(MATERIALX_DYNAMIC_ANALYSIS)
188186
mark_as_advanced(MATERIALX_PYTHON_VERSION)
189187
mark_as_advanced(MATERIALX_PYTHON_EXECUTABLE)
190-
mark_as_advanced(MATERIALX_PYTHON_OCIO_DIR)
191188
mark_as_advanced(MATERIALX_PYTHON_PYBIND11_DIR)
192189
mark_as_advanced(MATERIALX_OIIO_DIR)
193190
mark_as_advanced(MATERIALX_OSL_BINARY_OSLC)

documents/DeveloperGuide/MainPage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ The Python bindings for MaterialX are based on [PyBind11](https://github.com/pyb
2626

2727
The MaterialX C++ libraries are automatically included when building MaterialX through CMake.
2828

29-
To enable OpenImageIO support in MaterialX builds, the following additional options may be used:
29+
To enable OpenImageIO and OpenColorIO support in MaterialX builds, the following additional options may be used:
3030

3131
- `MATERIALX_BUILD_OIIO`: Requests that MaterialXRender be built with OpenImageIO in addition to stb_image, extending the set of supported image formats.
3232
- `MATERIALX_OIIO_DIR`: Path to the root folder of an OpenImageIO installation. If MATERIALX_BUILD_OIIO has been enabled, then this option may be used to select which installation is used.
33+
- `MATERIALX_BUILD_OCIO`: Requests that MaterialXGenShader be built with support for custom OpenColorIO color spaces and transforms. The minimum supported version of OpenColorIO is 2.4.
3334

3435
See the [MaterialX Unit Tests](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/source/MaterialXTest) page for documentation on shader generation and render testing in GLSL, OSL, and MDL.
3536

@@ -42,7 +43,6 @@ By default, the `MATERIALX_BUILD_PYTHON` option will use the active version of P
4243

4344
Additional options for the generation of MaterialX Python include the following:
4445

45-
- `MATERIALX_PYTHON_OCIO_DIR`: Path to a folder containing the default OCIO configuration to be packaged with MaterialX Python. The recommended OpenColorIO configuration for MaterialX is [ACES 1.2](https://github.com/colour-science/OpenColorIO-Configs/tree/feature/aces-1.2-config/aces_1.2).
4646
- `MATERIALX_PYTHON_PYBIND11_DIR`: Path to a folder containing the PyBind11 source to be used in building MaterialX Python. Defaults to the included PyBind11 source.
4747

4848
### Building The MaterialX Viewer

python/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ if(SKBUILD)
1111
)
1212
endif()
1313

14-
if(MATERIALX_PYTHON_OCIO_DIR)
15-
if(NOT EXISTS "${MATERIALX_PYTHON_OCIO_DIR}/config.ocio")
16-
message(WARNING "No file named config.ocio was found in the given OCIO directory.")
17-
endif()
18-
install(DIRECTORY "${MATERIALX_PYTHON_OCIO_DIR}/" DESTINATION "${MATERIALX_PYTHON_FOLDER_NAME}/config/" MESSAGE_NEVER)
19-
endif()
20-
2114
if(MATERIALX_INSTALL_PYTHON AND PYTHON_EXECUTABLE AND NOT SKBUILD)
2215
set(SETUP_PY "${CMAKE_INSTALL_PREFIX}/python/setup.py")
2316
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in" "${SETUP_PY}")

python/MaterialX/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,5 @@
2020
os.add_dll_directory(bindir)
2121

2222
from .main import *
23-
from .colorspace import *
24-
25-
try:
26-
from .legacy import *
27-
except ImportError:
28-
pass
2923

3024
__version__ = getVersionString()

python/MaterialX/colorspace.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)