Skip to content

Commit

Permalink
Wrapper : Default to ACES Studio OCIO context
Browse files Browse the repository at this point in the history
On Windows we were setting the `OCIO` environment variable in the wrapper, and on Linux we were doing it in `GafferImage/__init__.py`. We now consistently do it in the wrapper on both platforms.
  • Loading branch information
johnhaddon committed Apr 26, 2023
1 parent 3459d5a commit d7a7bf2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
11 changes: 7 additions & 4 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Improvements
- UVInspector : Added exposure, gamma and solo channel settings.
- ImageReader : The `colorSpace` widget now displays the name of the assumed colorspace when in `Automatic` mode.
- ImageReader, ImageWriter : The `colorSpace` menu is now filtered using the `file-io` category, if the current OpenColorIO config provides it.
- OpenColorIO : Improved colorspace menus :
- Organised colorspaces into submenus by family.
- Removed unwanted title-casing, so that names are now displayed verbatim.
- Removed Roles submenu, which is deemed unsuitable by the OpenColorIO UX working group. It may be reintroduced by registering `openColorIO:includeRoles` metadata to the relevant plugs.
- OpenColorIO :
- Updated default config to ACES Studio 1.3.
- Improved colorspace menus :
- Organised colorspaces into submenus by family.
- Removed unwanted title-casing, so that names are now displayed verbatim.
- Removed Roles submenu, which is deemed unsuitable by the OpenColorIO UX working group. It may be reintroduced by registering `openColorIO:includeRoles` metadata to the relevant plugs.
- VectorDataPlugValueWidget : Computation errors are now reflected by a red background colour.

Fixes
Expand Down Expand Up @@ -56,6 +58,7 @@ Breaking Changes
- UVInspector : Moved the `displayTransform` plug to `displayTransform.name`.
- ImageReader : Renamed `None` preset to `Automatic`.
- OpenColorIOTransform : Removed `availableColorSpaces()` and `availableRoles()` methods.
- OpenColorIO : Changed default config.

Build
-----
Expand Down
7 changes: 7 additions & 0 deletions bin/gaffer
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ if [[ $GAFFER_JEMALLOC != "0" ]] ; then
fi
fi

# Set up OCIO
##########################################################################

if [[ -z $OCIO ]] ; then
export OCIO="ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1"
fi

# Run gaffer itself
##########################################################################

Expand Down
2 changes: 1 addition & 1 deletion bin/gaffer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set QT_QPA_PLATFORM_PLUGIN_PATH=%GAFFER_ROOT%\qt\plugins
call :prependToPath "%GAFFER_ROOT%\bin" PATH

if "%OCIO%" EQU "" (
set OCIO=%GAFFER_ROOT%\openColorIO\config.ocio
set OCIO=ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1
)

rem Arnold
Expand Down
8 changes: 0 additions & 8 deletions python/GafferImage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@
__import__( "Gaffer" )
__import__( "GafferDispatch" )

def __setupEnvironment() :

import os
if "OCIO" not in os.environ :
os.environ["OCIO"] = os.path.expandvars( "$GAFFER_ROOT/openColorIO/config.ocio" )

__setupEnvironment()

from ._GafferImage import *
from .CatalogueSelect import CatalogueSelect
from .BleedFill import BleedFill
Expand Down
2 changes: 1 addition & 1 deletion startup/gui/ocio.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@

import IECore

import GafferImage # this sets the OCIO environment variable
import PyOpenColorIO as OCIO

import Gaffer
import GafferUI
import GafferImage
import GafferImageUI

# get default display setup
Expand Down

0 comments on commit d7a7bf2

Please sign in to comment.