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_2::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_2::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_2::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_2::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_2::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_2::LoggingFunction = std::function<void(const char*)>¶
Define the logging function signature.
-
void OpenColorIO_v2_2::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_2::ResetToDefaultLoggingFunction()¶
-
void OpenColorIO_v2_2::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.
This is not used when using CreateFromFile with an OCIOZ archive or CreateFromConfigIOProxy.
- Parameters:
ComputeHashFunction –
- PyOpenColorIO.ResetComputeHashFunction() None ¶
-
using OpenColorIO_v2_2::ComputeHashFunction = std::function<std::string(const std::string&)>¶
Define Compute Hash function signature.
-
void OpenColorIO_v2_2::SetComputeHashFunction(ComputeHashFunction hashFunction)¶
Set the Compute Hash Function to use; otherwise, use the default.
This is not used when using CreateFromFile with an OCIOZ archive or CreateFromConfigIOProxy.
- Parameters:
ComputeHashFunction –
-
void OpenColorIO_v2_2::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_2::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_2::SetEnvVariable(const char *name, const char *value)¶
Warning
This method is not thread safe.
-
void OpenColorIO_v2_2::UnsetEnvVariable(const char *name)¶
Warning
This method is not thread safe.
-
bool OpenColorIO_v2_2::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_2::LoggingLevelToString(LoggingLevel level)¶
-
LoggingLevel OpenColorIO_v2_2::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_2::TransformDirectionToString(TransformDirection dir)¶
-
TransformDirection OpenColorIO_v2_2::TransformDirectionFromString(const char *s)¶
Will throw if string is not recognized.
-
TransformDirection OpenColorIO_v2_2::GetInverseTransformDirection(TransformDirection dir)¶
-
TransformDirection OpenColorIO_v2_2::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_2::AllocationToString(Allocation allocation)¶
-
Allocation OpenColorIO_v2_2::AllocationFromString(const char *s)¶
Interpolation¶
- PyOpenColorIO.InterpolationToString(interpolation: PyOpenColorIO.Interpolation) str ¶
- PyOpenColorIO.InterpolationFromString(str: str) PyOpenColorIO.Interpolation ¶
-
const char *OpenColorIO_v2_2::InterpolationToString(Interpolation interp)¶
-
Interpolation OpenColorIO_v2_2::InterpolationFromString(const char *s)¶
GpuLanguage¶
- PyOpenColorIO.GpuLanguageToString(language: PyOpenColorIO.GpuLanguage) str ¶
- PyOpenColorIO.GpuLanguageFromString(str: str) PyOpenColorIO.GpuLanguage ¶
-
const char *OpenColorIO_v2_2::GpuLanguageToString(GpuLanguage language)¶
-
GpuLanguage OpenColorIO_v2_2::GpuLanguageFromString(const char *s)¶
EnvironmentMode¶
- PyOpenColorIO.EnvironmentModeToString(mode: PyOpenColorIO.EnvironmentMode) str ¶
- PyOpenColorIO.EnvironmentModeFromString(str: str) PyOpenColorIO.EnvironmentMode ¶
-
const char *OpenColorIO_v2_2::EnvironmentModeToString(EnvironmentMode mode)¶
-
EnvironmentMode OpenColorIO_v2_2::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_2::RangeStyleToString(RangeStyle style)¶
-
RangeStyle OpenColorIO_v2_2::RangeStyleFromString(const char *style)¶
FixedFunctionStyle¶
- PyOpenColorIO.FixedFunctionStyleToString(style: PyOpenColorIO.FixedFunctionStyle) str ¶
- PyOpenColorIO.FixedFunctionStyleFromString(str: str) PyOpenColorIO.FixedFunctionStyle ¶
-
const char *OpenColorIO_v2_2::FixedFunctionStyleToString(FixedFunctionStyle style)¶
-
FixedFunctionStyle OpenColorIO_v2_2::FixedFunctionStyleFromString(const char *style)¶
GradingStyle¶
- PyOpenColorIO.GradingStyleToString(style: PyOpenColorIO.GradingStyle) str ¶
- PyOpenColorIO.GradingStyleFromString(str: str) PyOpenColorIO.GradingStyle ¶
-
const char *OpenColorIO_v2_2::GradingStyleToString(GradingStyle style)¶
-
GradingStyle OpenColorIO_v2_2::GradingStyleFromString(const char *s)¶
ExposureContrastStyle¶
- PyOpenColorIO.ExposureContrastStyleToString(style: PyOpenColorIO.ExposureContrastStyle) str ¶
- PyOpenColorIO.ExposureContrastStyleFromString(str: str) PyOpenColorIO.ExposureContrastStyle ¶
-
const char *OpenColorIO_v2_2::ExposureContrastStyleToString(ExposureContrastStyle style)¶
-
ExposureContrastStyle OpenColorIO_v2_2::ExposureContrastStyleFromString(const char *style)¶
NegativeStyle¶
- PyOpenColorIO.NegativeStyleToString(style: PyOpenColorIO.NegativeStyle) str ¶
- PyOpenColorIO.NegativeStyleFromString(str: str) PyOpenColorIO.NegativeStyle ¶
-
const char *OpenColorIO_v2_2::NegativeStyleToString(NegativeStyle style)¶
-
NegativeStyle OpenColorIO_v2_2::NegativeStyleFromString(const char *style)¶