Global¶
Caching¶
-
PyOpenColorIO.
ClearAllCaches
() → None¶ During normal usage, OpenColorIO tends to cache certain global information (such as the contents of LUTs on disk, intermediate results, etc.). Calling this function will flush all such information. The global information are related to LUT file identifications, loaded LUT file content and CDL transforms from loaded CDL files.
Under normal usage, this is not necessary, but it can be helpful in particular instances, such as designing OCIO profiles, and wanting to re-read luts without restarting.
Note
The method does not apply to instance specific caches such as the processor cache in a config instance or the GPU and CPU processor caches in a processor instance. Here deleting the instance flushes the cache.
-
void
OpenColorIO_v2_0
::
ClearAllCaches
()¶ During normal usage, OpenColorIO tends to cache certain global information (such as the contents of LUTs on disk, intermediate results, etc.). Calling this function will flush all such information. The global information are related to LUT file identifications, loaded LUT file content and CDL transforms from loaded CDL files.
Under normal usage, this is not necessary, but it can be helpful in particular instances, such as designing OCIO profiles, and wanting to re-read luts without restarting.
- Note
The method does not apply to instance specific caches such as the processor cache in a config instance or the GPU and CPU processor caches in a processor instance. Here deleting the instance flushes the cache.
Constants: Caches
Version¶
-
PyOpenColorIO.
GetVersion
() → str¶ Get the version number for the library, as a dot-delimited string (e.g., “1.0.0”).
This is also available at compile time as OCIO_VERSION_FULL_STR.
-
PyOpenColorIO.
GetVersionHex
() → int¶ Get the version number for the library, as a single 4-byte hex number (e.g., 0x01050200 for “1.5.2”), to be used for numeric comparisons.
This is also at compile time as OCIO_VERSION_HEX.
-
const char *
OpenColorIO_v2_0
::
GetVersion
()¶ Get the version number for the library, as a dot-delimited string (e.g., “1.0.0”).
This is also available at compile time as OCIO_VERSION_FULL_STR.
-
int
OpenColorIO_v2_0
::
GetVersionHex
()¶ Get the version number for the library, as a single 4-byte hex number (e.g., 0x01050200 for “1.5.2”), to be used for numeric comparisons.
This is also at compile time as OCIO_VERSION_HEX.
Logging¶
-
PyOpenColorIO.
GetLoggingLevel
() → PyOpenColorIO.LoggingLevel¶ Get the global logging level.
You can override this at runtime using the OCIO_LOGGING_LEVEL environment variable. The client application that sets this should use SetLoggingLevel, and not the environment variable. The default value is INFO.
-
PyOpenColorIO.
SetLoggingLevel
(level: PyOpenColorIO.LoggingLevel) → None¶ Set the global logging level.
-
LoggingLevel
OpenColorIO_v2_0
::
GetLoggingLevel
()¶ Get the global logging level.
You can override this at runtime using the OCIO_LOGGING_LEVEL environment variable. The client application that sets this should use SetLoggingLevel, and not the environment variable. The default value is INFO.
-
void
OpenColorIO_v2_0
::
SetLoggingLevel
(LoggingLevel level)¶ Set the global logging level.
Logging Function¶
-
PyOpenColorIO.
SetLoggingFunction
(logFunction: Callable[[str], None]) → None¶ Set the logging function to use; otherwise, use the default (i.e. std::cerr).
Note
The logging mechanism is thread-safe.
-
PyOpenColorIO.
ResetToDefaultLoggingFunction
() → None¶
-
PyOpenColorIO.
LogMessage
(level: PyOpenColorIO.LoggingLevel, message: str) → None¶ Log a message using the library logging function.
-
using
OpenColorIO_v2_0
::
LoggingFunction
= std::function<void(const char*)>¶ Define the logging function signature.
-
void
OpenColorIO_v2_0
::
SetLoggingFunction
(LoggingFunction logFunction)¶ Set the logging function to use; otherwise, use the default (i.e. std::cerr).
- Note
The logging mechanism is thread-safe.
-
void
OpenColorIO_v2_0
::
ResetToDefaultLoggingFunction
()¶
-
void
OpenColorIO_v2_0
::
LogMessage
(LoggingLevel level, const char *message)¶ Log a message using the library logging function.
Compute Hash Function¶
-
PyOpenColorIO.
SetComputeHashFunction
(hashFunction: Callable[[str], str]) → None¶ Set the Compute Hash Function to use; otherwise, use the default.
- Parameters
ComputeHashFunction –
-
PyOpenColorIO.
ResetComputeHashFunction
() → None¶
-
using
OpenColorIO_v2_0
::
ComputeHashFunction
= std::function<std::string(const std::string&)>¶ Define Compute Hash function signature.
-
void
OpenColorIO_v2_0
::
SetComputeHashFunction
(ComputeHashFunction hashFunction)¶ Set the Compute Hash Function to use; otherwise, use the default.
- Parameters
ComputeHashFunction
:
-
void
OpenColorIO_v2_0
::
ResetComputeHashFunction
()¶
Environment Variables¶
-
PyOpenColorIO.
GetEnvVariable
(name: str) → str¶ Another call modifies the string obtained from a previous call as the method always uses the same memory buffer.
-
PyOpenColorIO.
SetEnvVariable
(name: str, value: str) → None¶ Warning
This method is not thread safe.
-
PyOpenColorIO.
UnsetEnvVariable
(name: str) → None¶ Warning
This method is not thread safe.
-
PyOpenColorIO.
IsEnvVariablePresent
(name: str) → bool¶ cpp:function:
-
const char *
OpenColorIO_v2_0
::
GetEnvVariable
(const char *name)¶ Another call modifies the string obtained from a previous call as the method always uses the same memory buffer.
-
void
OpenColorIO_v2_0
::
SetEnvVariable
(const char *name, const char *value)¶ - Warning
This method is not thread safe.
-
void
OpenColorIO_v2_0
::
UnsetEnvVariable
(const char *name)¶ - Warning
This method is not thread safe.
-
bool
OpenColorIO_v2_0
::
IsEnvVariablePresent
(const char *name)¶ cpp:function::
Constants: Environment Variables
Casting¶
Conversions¶
Bool¶
LoggingLevel¶
-
PyOpenColorIO.
LoggingLevelToString
(level: PyOpenColorIO.LoggingLevel) → str¶
-
PyOpenColorIO.
LoggingLevelFromString
(str: str) → PyOpenColorIO.LoggingLevel¶
-
const char *
OpenColorIO_v2_0
::
LoggingLevelToString
(LoggingLevel level)¶
-
LoggingLevel
OpenColorIO_v2_0
::
LoggingLevelFromString
(const char *s)¶
TransformDirection¶
-
PyOpenColorIO.
TransformDirectionToString
(direction: PyOpenColorIO.TransformDirection) → str¶
-
PyOpenColorIO.
TransformDirectionFromString
(str: str) → PyOpenColorIO.TransformDirection¶ Will throw if string is not recognized.
-
PyOpenColorIO.
GetInverseTransformDirection
(direction: PyOpenColorIO.TransformDirection) → PyOpenColorIO.TransformDirection¶
-
PyOpenColorIO.
CombineTransformDirections
(direction1: PyOpenColorIO.TransformDirection, direction2: PyOpenColorIO.TransformDirection) → PyOpenColorIO.TransformDirection¶
-
const char *
OpenColorIO_v2_0
::
TransformDirectionToString
(TransformDirection dir)¶
-
TransformDirection
OpenColorIO_v2_0
::
TransformDirectionFromString
(const char *s)¶ Will throw if string is not recognized.
-
TransformDirection
OpenColorIO_v2_0
::
GetInverseTransformDirection
(TransformDirection dir)¶
-
TransformDirection
OpenColorIO_v2_0
::
CombineTransformDirections
(TransformDirection d1, TransformDirection d2)¶
BitDepth¶
-
PyOpenColorIO.
BitDepthToString
(bitDepth: PyOpenColorIO.BitDepth) → str¶
-
PyOpenColorIO.
BitDepthFromString
(str: str) → PyOpenColorIO.BitDepth¶
-
PyOpenColorIO.
BitDepthIsFloat
(bitDepth: PyOpenColorIO.BitDepth) → bool¶
-
PyOpenColorIO.
BitDepthToInt
(bitDepth: PyOpenColorIO.BitDepth) → int¶
Allocation¶
-
PyOpenColorIO.
AllocationToString
(allocation: PyOpenColorIO.Allocation) → str¶
-
PyOpenColorIO.
AllocationFromString
(str: str) → PyOpenColorIO.Allocation¶
-
const char *
OpenColorIO_v2_0
::
AllocationToString
(Allocation allocation)¶
-
Allocation
OpenColorIO_v2_0
::
AllocationFromString
(const char *s)¶
Interpolation¶
-
PyOpenColorIO.
InterpolationToString
(interpolation: PyOpenColorIO.Interpolation) → str¶
-
PyOpenColorIO.
InterpolationFromString
(str: str) → PyOpenColorIO.Interpolation¶
-
const char *
OpenColorIO_v2_0
::
InterpolationToString
(Interpolation interp)¶
-
Interpolation
OpenColorIO_v2_0
::
InterpolationFromString
(const char *s)¶
GpuLanguage¶
-
PyOpenColorIO.
GpuLanguageToString
(language: PyOpenColorIO.GpuLanguage) → str¶
-
PyOpenColorIO.
GpuLanguageFromString
(str: str) → PyOpenColorIO.GpuLanguage¶
-
const char *
OpenColorIO_v2_0
::
GpuLanguageToString
(GpuLanguage language)¶
-
GpuLanguage
OpenColorIO_v2_0
::
GpuLanguageFromString
(const char *s)¶
EnvironmentMode¶
-
PyOpenColorIO.
EnvironmentModeToString
(mode: PyOpenColorIO.EnvironmentMode) → str¶
-
PyOpenColorIO.
EnvironmentModeFromString
(str: str) → PyOpenColorIO.EnvironmentMode¶
-
const char *
OpenColorIO_v2_0
::
EnvironmentModeToString
(EnvironmentMode mode)¶
-
EnvironmentMode
OpenColorIO_v2_0
::
EnvironmentModeFromString
(const char *s)¶
CDLStyle¶
-
PyOpenColorIO.
CDLStyleToString
(style: PyOpenColorIO.CDLStyle) → str¶
-
PyOpenColorIO.
CDLStyleFromString
(str: str) → PyOpenColorIO.CDLStyle¶
RangeStyle¶
-
PyOpenColorIO.
RangeStyleToString
(style: PyOpenColorIO.RangeStyle) → str¶
-
PyOpenColorIO.
RangeStyleFromString
(str: str) → PyOpenColorIO.RangeStyle¶
-
const char *
OpenColorIO_v2_0
::
RangeStyleToString
(RangeStyle style)¶
-
RangeStyle
OpenColorIO_v2_0
::
RangeStyleFromString
(const char *style)¶
FixedFunctionStyle¶
-
PyOpenColorIO.
FixedFunctionStyleToString
(style: PyOpenColorIO.FixedFunctionStyle) → str¶
-
PyOpenColorIO.
FixedFunctionStyleFromString
(str: str) → PyOpenColorIO.FixedFunctionStyle¶
-
const char *
OpenColorIO_v2_0
::
FixedFunctionStyleToString
(FixedFunctionStyle style)¶
-
FixedFunctionStyle
OpenColorIO_v2_0
::
FixedFunctionStyleFromString
(const char *style)¶
GradingStyle¶
-
PyOpenColorIO.
GradingStyleToString
(style: PyOpenColorIO.GradingStyle) → str¶
-
PyOpenColorIO.
GradingStyleFromString
(str: str) → PyOpenColorIO.GradingStyle¶
-
const char *
OpenColorIO_v2_0
::
GradingStyleToString
(GradingStyle style)¶
-
GradingStyle
OpenColorIO_v2_0
::
GradingStyleFromString
(const char *s)¶
ExposureContrastStyle¶
-
PyOpenColorIO.
ExposureContrastStyleToString
(style: PyOpenColorIO.ExposureContrastStyle) → str¶
-
PyOpenColorIO.
ExposureContrastStyleFromString
(str: str) → PyOpenColorIO.ExposureContrastStyle¶
-
const char *
OpenColorIO_v2_0
::
ExposureContrastStyleToString
(ExposureContrastStyle style)¶
-
ExposureContrastStyle
OpenColorIO_v2_0
::
ExposureContrastStyleFromString
(const char *style)¶
NegativeStyle¶
-
PyOpenColorIO.
NegativeStyleToString
(style: PyOpenColorIO.NegativeStyle) → str¶
-
PyOpenColorIO.
NegativeStyleFromString
(str: str) → PyOpenColorIO.NegativeStyle¶
-
const char *
OpenColorIO_v2_0
::
NegativeStyleToString
(NegativeStyle style)¶
-
NegativeStyle
OpenColorIO_v2_0
::
NegativeStyleFromString
(const char *style)¶