Blender V4.5
blender::ocio Namespace Reference

Namespaces

namespace  internal

Classes

class  CPUProcessorCache
class  FallbackColorSpace
class  FallbackConfig
class  FallbackNOOPCPUProcessor
class  FallbackCustomCPUProcessor
class  FallbackDefaultDisplay
class  FallbackDefaultLook
class  FallbackDefaultView
class  FallbackGPUShaderBinder
class  FallbackProcessorCache
class  ColorSpace
struct  DisplayParameters
class  Config
class  CPUProcessor
class  Display
struct  GPUDisplayParameters
class  GPUShaderBinder
class  Look
class  PackedImage
struct  Version
class  View

Typedefs

using FallbackLinearRGBToSRGBCPUProcessor = FallbackCustomCPUProcessor<linearrgb_to_srgb_v3_v3>
using FallbackSRGBToLinearRGBCPUProcessor = FallbackCustomCPUProcessor<srgb_to_linearrgb_v3_v3>

Enumerations

enum class  BitDepth { BIT_DEPTH_UNKNOWN , BIT_DEPTH_F32 }

Functions

std::string cleanup_description (const StringRef description)
 TEST (ocio_description, cleanup_description)
std::shared_ptr< const CPUProcessorcreate_fallback_display_cpu_processor (const Config &config, const DisplayParameters &display_parameters)
void source_comment_out_uniforms (std::string &source)
 TEST (ocio_source_processor, source_comment_out_uniforms)
Version get_version ()
bool split_view_specific_look (const StringRef look_name, StringRef &view, StringRef &ui_name)
 TEST (ocio_view_look, split_view_specific_look)
float3x3 calculate_white_point_matrix (const Config &config, const float temperature, const float tint)

Variables

static const float3x3 XYZ_TO_REC709
static const float3x3 ACES_TO_XYZ

Typedef Documentation

◆ FallbackLinearRGBToSRGBCPUProcessor

◆ FallbackSRGBToLinearRGBCPUProcessor

Enumeration Type Documentation

◆ BitDepth

Enumerator
BIT_DEPTH_UNKNOWN 
BIT_DEPTH_F32 

Definition at line 17 of file OCIO_packed_image.hh.

Function Documentation

◆ calculate_white_point_matrix()

float3x3 blender::ocio::calculate_white_point_matrix ( const Config & config,
const float temperature,
const float tint )

◆ cleanup_description()

std::string blender::ocio::cleanup_description ( StringRef description)

Cleanup description making it possible to easily show in the interface as a tooltip.

This includes:

  • Stripping all trailing line break character.
  • Replacing all inner line break character with space.

Definition at line 11 of file description.cc.

References ELEM, blender::StringRefBase::is_empty(), result, and blender::StringRefBase::trim().

Referenced by TEST().

◆ create_fallback_display_cpu_processor()

◆ get_version()

Version blender::ocio::get_version ( )

Get OpenColorIO library version. When compiled without OpenColorIO library returns {0, 0, 0}.

Definition at line 11 of file version.cc.

Referenced by make_ocio_info().

◆ source_comment_out_uniforms()

void blender::ocio::source_comment_out_uniforms ( std::string & source)

Comment out all uniform statements. This avoids double declarations from the backend. This function modifies source in-place without adding extra characters. This means that statement like uniform vec3 pos; becomes //iform vec3 pos;.

Definition at line 9 of file source_processor.cc.

Referenced by TEST().

◆ split_view_specific_look()

bool blender::ocio::split_view_specific_look ( StringRef look_name,
StringRef & view,
StringRef & ui_name )

Split the view-specific look name to a view name and look name for the interface.

Look is considered to be view-specific when it contains dash in its name. In this case the part of the look name is considered to be the name of the view the look is specific to.

If the look is not view-specific view is an empty string and ui name is the look name.

Returns true if the look name is view-specific.

Definition at line 9 of file view_specific_look.cc.

References blender::StringRefBase::find(), blender::StringRefBase::substr(), and view.

Referenced by TEST().

◆ TEST() [1/3]

blender::ocio::TEST ( ocio_description ,
cleanup_description  )

Definition at line 11 of file description_test.cc.

References cleanup_description(), and EXPECT_EQ().

◆ TEST() [2/3]

blender::ocio::TEST ( ocio_source_processor ,
source_comment_out_uniforms  )

Definition at line 11 of file source_processor_test.cc.

References EXPECT_EQ(), and source_comment_out_uniforms().

◆ TEST() [3/3]

blender::ocio::TEST ( ocio_view_look ,
split_view_specific_look  )

Definition at line 11 of file view_specific_look_test.cc.

References EXPECT_EQ(), split_view_specific_look(), and view.

Variable Documentation

◆ ACES_TO_XYZ

const float3x3 blender::ocio::ACES_TO_XYZ
static
Initial value:
= {{0.938280f, 0.337369f, 0.001174f},
{-0.004451f, 0.729522f, -0.003711f},
{0.016628f, -0.066890f, 1.091595f}}

Definition at line 18 of file OCIO_matrix.hh.

Referenced by colormanage_load_config().

◆ XYZ_TO_REC709

const float3x3 blender::ocio::XYZ_TO_REC709
static
Initial value:
{{3.2404542f, -0.9692660f, 0.0556434f},
{-1.5371385f, 1.8760108f, -0.2040259f},
{-0.4985314f, 0.0415560f, 1.0572252f}}

Definition at line 12 of file OCIO_matrix.hh.

Referenced by colormanage_load_config(), and blender::ocio::FallbackConfig::get_xyz_to_scene_linear_matrix().