Blender V5.0
blender::ocio::Config Class Referenceabstract

#include <OCIO_config.hh>

Inherited by blender::ocio::FallbackConfig.

Public Member Functions

Color space information
virtual float3 get_default_luma_coefs () const =0
virtual float3x3 get_xyz_to_scene_linear_matrix () const =0
virtual const char * get_color_space_from_filepath (const char *filepath) const =0
Color space API
virtual const ColorSpaceget_color_space (StringRefNull name) const =0
virtual int get_num_color_spaces () const =0
virtual const ColorSpaceget_color_space_by_index (int index) const =0
virtual const ColorSpaceget_sorted_color_space_by_index (int index) const =0
virtual const ColorSpaceget_color_space_by_interop_id (StringRefNull interop_id) const =0
virtual const ColorSpaceget_color_space_for_hdr_image (StringRefNull name) const =0
Working colorspace API
virtual void set_scene_linear_role (StringRefNull name)=0
Display API
virtual const Displayget_default_display () const =0
virtual const Displayget_display_by_name (StringRefNull name) const =0
virtual int get_num_displays () const =0
virtual const Displayget_display_by_index (int index) const =0
Display colorspace API
virtual const ColorSpaceget_display_view_color_space (StringRefNull display, StringRefNull view) const =0
Look API
virtual const Lookget_look_by_name (StringRefNull name) const =0
virtual int get_num_looks () const =0
virtual const Lookget_look_by_index (int index) const =0
Processor API
virtual std::shared_ptr< const CPUProcessorget_display_cpu_processor (const DisplayParameters &display_parameters) const =0
virtual std::shared_ptr< const CPUProcessorget_cpu_processor (StringRefNull from_colorspace, StringRefNull to_colorspace) const =0
GPU-side processing
virtual const GPUShaderBinderget_gpu_shader_binder () const =0

Construction

virtual ~Config ()=default
static std::unique_ptr< Configcreate_from_environment ()
static std::unique_ptr< Configcreate_from_file (StringRefNull filename)
static std::unique_ptr< Configcreate_fallback ()

Detailed Description

Definition at line 46 of file OCIO_config.hh.

Constructor & Destructor Documentation

◆ ~Config()

virtual blender::ocio::Config::~Config ( )
virtualdefault

Member Function Documentation

◆ create_fallback()

std::unique_ptr< Config > blender::ocio::Config::create_fallback ( )
static

Create fallback implementation which is always guaranteed to work.

It is used in cases actual OpenColorIO configuration has failed to be created so that Blender interface can be displayed.

The fallback implementation is also used implicitly when BLender is compiled without OpenColorIO support.

Definition at line 35 of file config.cc.

Referenced by colormanagement_init().

◆ create_from_environment()

std::unique_ptr< Config > blender::ocio::Config::create_from_environment ( )
static

Create OpenColorIO configuration using configuration from the environment variables. If there is an error creating the configuration nullptr is returned.

Definition at line 15 of file config.cc.

Referenced by colormanagement_init().

◆ create_from_file()

std::unique_ptr< Config > blender::ocio::Config::create_from_file ( StringRefNull filename)
static

Create OpenColorIO configuration using configuration from the given configuration file. If there is an error creating the configuration nullptr is returned.

Definition at line 24 of file config.cc.

Referenced by colormanagement_init().

◆ get_color_space()

virtual const ColorSpace * blender::ocio::Config::get_color_space ( StringRefNull name) const
pure virtual

Get color space with the given name, role name, or alias. Color space names take precedence over roles. If the color space does not exist nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

References name.

Referenced by colormanage_role_color_space_name_get().

◆ get_color_space_by_index()

virtual const ColorSpace * blender::ocio::Config::get_color_space_by_index ( int index) const
pure virtual

Get color space with the given index within the configuration. If the index is invalid nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_color_space_by_interop_id()

virtual const ColorSpace * blender::ocio::Config::get_color_space_by_interop_id ( StringRefNull interop_id) const
pure virtual

Get color space for the given interop ID. If not found a nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_color_space_for_hdr_image()

virtual const ColorSpace * blender::ocio::Config::get_color_space_for_hdr_image ( StringRefNull name) const
pure virtual

Get colorspace to be used for saving and loading HDR image files, which may need adjustments compared to the colorspace as chosen by the user.

Implemented in blender::ocio::FallbackConfig.

References name.

◆ get_color_space_from_filepath()

virtual const char * blender::ocio::Config::get_color_space_from_filepath ( const char * filepath) const
pure virtual

Get the color space of the first rule that matched filepath. If there is no such color space nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_cpu_processor()

virtual std::shared_ptr< const CPUProcessor > blender::ocio::Config::get_cpu_processor ( StringRefNull from_colorspace,
StringRefNull to_colorspace ) const
pure virtual

Get processor which converts color between given color spaces.

Implemented in blender::ocio::FallbackConfig.

◆ get_default_display()

virtual const Display * blender::ocio::Config::get_default_display ( ) const
pure virtual

Get the default display in this configuration.

Implemented in blender::ocio::FallbackConfig.

◆ get_default_luma_coefs()

virtual float3 blender::ocio::Config::get_default_luma_coefs ( ) const
pure virtual

Get the default coefficients for computing luma.

Implemented in blender::ocio::FallbackConfig.

◆ get_display_by_index()

virtual const Display * blender::ocio::Config::get_display_by_index ( int index) const
pure virtual

Get display with the given index within the configuration. If the index is invalid nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_display_by_name()

virtual const Display * blender::ocio::Config::get_display_by_name ( StringRefNull name) const
pure virtual

Get display with the given name. If the display does not exist nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

References name.

◆ get_display_cpu_processor()

virtual std::shared_ptr< const CPUProcessor > blender::ocio::Config::get_display_cpu_processor ( const DisplayParameters & display_parameters) const
pure virtual

Get processor which converts color space from the given from_colorspace to the display space.

Implemented in blender::ocio::FallbackConfig.

◆ get_display_view_color_space()

virtual const ColorSpace * blender::ocio::Config::get_display_view_color_space ( StringRefNull display,
StringRefNull view ) const
pure virtual

Returns the colorspace of the (display, view) pair. Note that this may be either a color space or a display color space.

Implemented in blender::ocio::FallbackConfig.

References view.

◆ get_gpu_shader_binder()

virtual const GPUShaderBinder & blender::ocio::Config::get_gpu_shader_binder ( ) const
pure virtual

Get API which can be used to bind GPU shaders for color space conversion.

Implemented in blender::ocio::FallbackConfig.

◆ get_look_by_index()

virtual const Look * blender::ocio::Config::get_look_by_index ( int index) const
pure virtual

Get look with the given index within the configuration. If the index is invalid nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_look_by_name()

virtual const Look * blender::ocio::Config::get_look_by_name ( StringRefNull name) const
pure virtual

Get look with the given name. If the look does not exist nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

References name.

◆ get_num_color_spaces()

virtual int blender::ocio::Config::get_num_color_spaces ( ) const
pure virtual

Get the number of color spaces in this configuration.

Implemented in blender::ocio::FallbackConfig.

◆ get_num_displays()

virtual int blender::ocio::Config::get_num_displays ( ) const
pure virtual

Get the number of displays in this configuration.

Implemented in blender::ocio::FallbackConfig.

◆ get_num_looks()

virtual int blender::ocio::Config::get_num_looks ( ) const
pure virtual

Get the number of looks in this configuration.

Implemented in blender::ocio::FallbackConfig.

◆ get_sorted_color_space_by_index()

virtual const ColorSpace * blender::ocio::Config::get_sorted_color_space_by_index ( int index) const
pure virtual

Get color space with the given index within the sorted array. This function allows to iterate color spaces in their alphabetical order.

If the index is invalid nullptr is returned.

Implemented in blender::ocio::FallbackConfig.

◆ get_xyz_to_scene_linear_matrix()

virtual float3x3 blender::ocio::Config::get_xyz_to_scene_linear_matrix ( ) const
pure virtual

Get conversion matrix from XYZ space to the scene linear. TODO(sergey): Specialize which exactly XYZ space it is.

Implemented in blender::ocio::FallbackConfig.

Referenced by blender::ocio::calculate_white_point_matrix().

◆ set_scene_linear_role()

virtual void blender::ocio::Config::set_scene_linear_role ( StringRefNull name)
pure virtual

Implemented in blender::ocio::FallbackConfig.

References name.


The documentation for this class was generated from the following files: