Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OCIO v2 introduced several new mechanisms for reducing the clutter of color space menus in applications. Previously, all color spaces would be visible in most app menus, which can mean hundreds of options in some configs, and an overwhelming experience for users without careful organization of color spaces into families. This was particularly problematic for config authors introducing utility or deprecated color spaces, which were not intended to be selected by users directly, but needed to be present in the config for the color pipeline to function. They could be hidden away in clearly named family menus, but remained available for errant selection.

...

Inactive color spaces are intentionally inactive, which implies they are deprecated or for internal use only. An application developer does not have to check if a color space is inactive since the Config config API will not return inactive color spaces unless explicitly requested. If a previously active color spaces space is now inactive, but still referenced in the an app's parameters, it will continue to function as expected when constructing processors, despite being omitted from default queries.

Color spaces can be made inactive by a user through the OCIO_INACTIVE_COLORSPACES environment variable, which defines a comma delimited list of color space names, overridding the overriding the base definition in the config.

...

Inactive color spaces should not be included in any menus, and are not returned by the config by default when parsing available color spaces, or when creating menus with OCIO's color space menu helper. There is one exception to this rule however, where an application should manually add an inactive color space to a menu, as outlined in the case below.

Since inactive color spaces are still valid in a processor, existing use of these spaces should be preserved in an application. If a menu selection already references an inactive space in a scene file, the selection should be preserved. Apps can test the validity of a seemingly undefined color space via Config::getColorSpace(name), and if using OCIO's a color space menu helper, add that space to a menu with ColorSpaceMenuHelper::addColorSpace(name)The added (inactive) color space should be included as the topmost item in the menu, optionally with an a trailing indicator that it is inactive like “(inactive)”.