Applications Helpers¶
ConfigCompatibilityHelpers¶
-
namespace ConfigCompatibilityHelpers¶
Functions
-
bool CheckCompatibility(const ConstConfigRcPtr &config, ConfigCompatibility compatibility)¶
Check the config for compatibility with a specific requirement.
Returns false if the config is not compatible with the requirement identified by the given ConfigCompatibility value.
-
bool CheckCompatibility(const ConstConfigRcPtr &config, ConfigCompatibility compatibility)¶
ConfigMergingHelpers¶
- PyOpenColorIO.ConfigMergingHelpers.MergeConfigs(params: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters, baseConfig: PyOpenColorIO.PyOpenColorIO.Config, inputConfig: PyOpenColorIO.PyOpenColorIO.Config) PyOpenColorIO.PyOpenColorIO.Config¶
- PyOpenColorIO.ConfigMergingHelpers.MergeColorSpace(params: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters, baseConfig: PyOpenColorIO.PyOpenColorIO.Config, colorspace: PyOpenColorIO.PyOpenColorIO.ColorSpace) PyOpenColorIO.PyOpenColorIO.Config¶
- class PyOpenColorIO.ConfigMergingParameters¶
- static Create() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters¶
- STRATEGY_BASE_ONLY = <MergeStrategies.STRATEGY_BASE_ONLY: 3>¶
- STRATEGY_INPUT_ONLY = <MergeStrategies.STRATEGY_INPUT_ONLY: 2>¶
- STRATEGY_PREFER_BASE = <MergeStrategies.STRATEGY_PREFER_BASE: 1>¶
- STRATEGY_PREFER_INPUT = <MergeStrategies.STRATEGY_PREFER_INPUT: 0>¶
- STRATEGY_REMOVE = <MergeStrategies.STRATEGY_REMOVE: 4>¶
- STRATEGY_UNSPECIFIED = <MergeStrategies.STRATEGY_UNSPECIFIED: 5>¶
- ConfigMergingParameters(*args, **kwargs)¶
- addEnvironmentVar(name: str, defaultValue: str) None¶
- addSearchPath(path: str) None¶
- getActiveDisplays() str¶
- getActiveViews() str¶
- getBaseConfigName() str¶
- getBaseFamilyPrefix() str¶
- getColorspaces() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
- getDefaultStrategy() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
- getDescription() str¶
- getDisplayViews() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
- getEnvironmentVar(index: SupportsInt) str¶
- getEnvironmentVarValue(index: SupportsInt) str¶
- getInactiveColorSpaces() str¶
- getInputConfigName() str¶
- getInputFamilyPrefix() str¶
- getName() str¶
- getNamedTransforms() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
- getNumEnvironmentVars() int¶
- getOutputName() str¶
- getSearchPath() str¶
- getViewTransforms() PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
- isAdjustInputReferenceSpace() bool¶
- isAvoidDuplicates() bool¶
- isErrorOnConflict() bool¶
- isInputFirst() bool¶
- setActiveDisplays(displays: str) None¶
- setActiveViews(views: str) None¶
- setAdjustInputReferenceSpace(enabled: bool) None¶
- setAvoidDuplicates(enabled: bool) None¶
- setBaseConfigName(baseConfig: str) None¶
- setBaseFamilyPrefix(prefix: str) None¶
- setColorspaces(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setDefaultStrategy(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setDescription(mergedConfigDesc: str) None¶
- setDisplayViews(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setErrorOnConflict(enabled: bool) None¶
- setFileRules(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setInactiveColorSpaces(colorspaces: str) None¶
- setInputConfigName(inputConfig: str) None¶
- setInputFamilyPrefix(prefix: str) None¶
- setInputFirst(enabled: bool) None¶
- setLooks(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setName(mergedConfigName: str) None¶
- setNamedTransforms(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setOutputName(outputName: str) None¶
- setRoles(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- setSearchPath(path: str) None¶
- setViewTransforms(strategy: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters.MergeStrategies) None¶
- class PyOpenColorIO.ConfigMergingParameters.MergeStrategies¶
Members:
STRATEGY_PREFER_INPUT :
STRATEGY_PREFER_BASE :
STRATEGY_INPUT_ONLY :
STRATEGY_BASE_ONLY :
STRATEGY_REMOVE :
STRATEGY_UNSPECIFIED :
- STRATEGY_BASE_ONLY = <MergeStrategies.STRATEGY_BASE_ONLY: 3>¶
- STRATEGY_INPUT_ONLY = <MergeStrategies.STRATEGY_INPUT_ONLY: 2>¶
- STRATEGY_PREFER_BASE = <MergeStrategies.STRATEGY_PREFER_BASE: 1>¶
- STRATEGY_PREFER_INPUT = <MergeStrategies.STRATEGY_PREFER_INPUT: 0>¶
- STRATEGY_REMOVE = <MergeStrategies.STRATEGY_REMOVE: 4>¶
- STRATEGY_UNSPECIFIED = <MergeStrategies.STRATEGY_UNSPECIFIED: 5>¶
- property value¶
- class PyOpenColorIO.ConfigMerger¶
- static Create() PyOpenColorIO.PyOpenColorIO.ConfigMerger¶
- static CreateFromFile(filepath: str) PyOpenColorIO.PyOpenColorIO.ConfigMerger¶
- ConfigMerger(*args, **kwargs)¶
- addParams(params: PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters) None¶
- addSearchPath(path: str) None¶
- getMajorVersion() int¶
- getMergedConfig(*args, **kwargs)¶
Overloaded function.
getMergedConfig(self: PyOpenColorIO.PyOpenColorIO.ConfigMerger) -> PyOpenColorIO.PyOpenColorIO.Config
getMergedConfig(self: PyOpenColorIO.PyOpenColorIO.ConfigMerger, index: typing.SupportsInt) -> PyOpenColorIO.PyOpenColorIO.Config
- getMinorVersion() int¶
- getNumConfigMergingParameters() int¶
- getNumMergedConfigs() int¶
- getNumSearchPaths() int¶
- getParams(index: SupportsInt) PyOpenColorIO.PyOpenColorIO.ConfigMergingParameters¶
- getSearchPath(index: SupportsInt) str¶
- getWorkingDir() str¶
- mergeConfigs() PyOpenColorIO.PyOpenColorIO.ConfigMerger¶
- serialize() str¶
- setSearchPath(path: str) None¶
- setVersion(major: SupportsInt, minor: SupportsInt) None¶
- setWorkingDir(dirname: str) None¶
-
class ConfigMergingParameters¶
The ConfigMergingParameters class holds the options that control how a merge is done.
In terms of OCIOM file, it represent one of the merges in an OCIOM file.
Public Types
-
enum MergeStrategies¶
Values:
-
enumerator STRATEGY_PREFER_INPUT¶
Combine elements of the base and input configs, with the input taking priority.
-
enumerator STRATEGY_PREFER_BASE¶
Combine elements of the base and input configs, with the base taking priority.
-
enumerator STRATEGY_INPUT_ONLY¶
Use only the input elements for that section of the config.
-
enumerator STRATEGY_BASE_ONLY¶
Use only the base elements for that section of the config.
-
enumerator STRATEGY_REMOVE¶
The elements in the input config are removed from the base config. (If the names match, the item is removed, even if the content is not identical.)
-
enumerator STRATEGY_UNSPECIFIED¶
Strategy has not been set yet.
-
enumerator STRATEGY_PREFER_INPUT¶
Public Functions
-
ConfigMergingParametersRcPtr createEditableCopy() const¶
-
void setBaseConfigName(const char *baseConfig)¶
Set the file name of the base config. This is used along with the search path of the ConfigMerger object.
-
const char *getBaseConfigName() const¶
-
void setInputConfigName(const char *inputConfig)¶
Set the file name of the input config. This is used along with the search path of the ConfigMerger object.
-
const char *getInputConfigName() const¶
-
void setOutputName(const char *outputName)¶
Set a name to use for this merger. This may be used as the input or base config name in subsequent mergers.
-
const char *getOutputName() const¶
-
void setDefaultStrategy(const ConfigMergingParameters::MergeStrategies strategy)¶
Set the default strategy. This will be used if the strategy for a given config section is not set, and will be used for basic attributes such as the config description. Default = STRATEGY_PREFER_INPUT.
-
ConfigMergingParameters::MergeStrategies getDefaultStrategy() const¶
-
void setInputFamilyPrefix(const char *prefix)¶
Set a prefix to add to the family of input config items. (It must use ‘/’ as the separator and will be replaced by the actual family separator of the config.)
-
const char *getInputFamilyPrefix() const¶
-
void setBaseFamilyPrefix(const char *prefix)¶
Set a prefix to add to the family of base config items. (It must use ‘/’ as the separator and will be replaced by the actual family separator of the config.)
-
const char *getBaseFamilyPrefix() const¶
-
void setInputFirst(bool enabled)¶
If true, items from the input config will be higher in the file than those of the base config. Default = true.
-
bool isInputFirst() const¶
-
void setErrorOnConflict(bool enabled)¶
If true, throw an exception rather than log a warning when a conflict is detected. Default = false.
-
bool isErrorOnConflict() const¶
-
void setAvoidDuplicates(bool enabled)¶
If true, a color space from the input config is compared against those of the base config. If it is mathematically equivalent, it is not added. Instead, its name and aliases are added to the original color space. Default = true.
-
bool isAvoidDuplicates() const¶
-
void setAdjustInputReferenceSpace(bool enabled)¶
If true, the reference spaces of the base and input config are compared and color spaces from the input config will be adjusted to use the reference space of the base. If the interchange roles are not set, heuristics will be used to try and determine the reference space. Default = true.
-
bool isAdjustInputReferenceSpace() const¶
-
void setName(const char *mergedConfigName)¶
Override the name of the merged config.
-
const char *getName() const¶
-
void setDescription(const char *mergedConfigDesc)¶
Override the description of the merged config.
-
const char *getDescription() const¶
-
void addEnvironmentVar(const char *name, const char *defaultValue)¶
Override a context variable in the merged config.
-
int getNumEnvironmentVars() const¶
Get the number of context variable overrides.
-
const char *getEnvironmentVar(int index) const¶
-
const char *getEnvironmentVarValue(int index) const¶
-
void setSearchPath(const char *path)¶
Override the search_path of the merged config.
-
void addSearchPath(const char *path)¶
-
const char *getSearchPath() const¶
-
void setActiveDisplays(const char *displays)¶
Override the active_displays of the merged config.
-
const char *getActiveDisplays() const¶
-
void setActiveViews(const char *views)¶
Override the active_views of the merged config.
-
const char *getActiveViews() const¶
-
void setInactiveColorSpaces(const char *colorspaces)¶
Override the inactive_colorspaces of the merged config.
-
const char *getInactiveColorSpaces() const¶
-
void setRoles(MergeStrategies strategy)¶
Set the merge strategy for the roles section.
-
MergeStrategies getRoles() const¶
-
void setFileRules(MergeStrategies strategy)¶
Set the merge strategy for the file_rules section.
-
MergeStrategies getFileRules() const¶
-
void setDisplayViews(MergeStrategies strategy)¶
Set the merge strategy for the displays/views section. This includes shared_views, displays, viewing_rules, virtual_display, active_display, and active_views.
-
MergeStrategies getDisplayViews() const¶
-
void setViewTransforms(MergeStrategies strategy)¶
Set the merge strategy for the view_transforms section. This includes the view_transforms and default_view_transform.
-
MergeStrategies getViewTransforms() const¶
-
void setLooks(MergeStrategies strategy)¶
Set the merge strategy for the looks section.
-
MergeStrategies getLooks() const¶
-
void setColorspaces(MergeStrategies strategy)¶
Set the merge strategy for the color spaces section. This includes colorspaces, display_colorspaces, environment, search_path, family_separator, and inactive_colorspaces.
-
MergeStrategies getColorspaces() const¶
-
void setNamedTransforms(MergeStrategies strategy)¶
Set the merge strategy for the named_transforms section.
-
MergeStrategies getNamedTransforms() const¶
-
ConfigMergingParameters(const ConfigMergingParameters&) = delete¶
-
ConfigMergingParameters &operator=(const ConfigMergingParameters&) = delete¶
-
~ConfigMergingParameters()¶
Do not use (needed only for pybind11).
Public Static Functions
-
static ConfigMergingParametersRcPtr Create()¶
-
enum MergeStrategies¶
-
std::ostream &OpenColorIO_v2_6::operator<<(std::ostream&, const ConfigMergingParameters&)¶
-
class ConfigMerger¶
The ConfigMerger class is the controller for the merging process.
It may be read from or serialized to an OCIOM file.
It is controlling the search_path to find the base and input config, and the merge parameters.
It contains an instance of ConfigMergingParameters for each merge present under the “merge” section.
For example, consider the following OCIOM file contents:
ociom_version: 1.0 search_path:
/usr/local/configs
. merge: Merge_ADD_THIS: […] Merge_ADD_THAT: […]
For this OCIOM, there would be two instances of ConfigMergingParameters. One for the merge with output name “Merge_ADD_THIS” and one for “Merge_ADD_THAT”.
Where the […] sections have the following structure:
Merge_ADD_THIS: base: base.ocio input: input.ocio options: input_family_prefix: “” base_family_prefix: “” input_first: true error_on_conflict: false default_strategy: PreferInput avoid_duplicates: true adjust_input_reference_space: true overrides: name: “” description: “” search_path: “” environment: {} active_displays: [] active_views: [] inactive_colorspaces: [] params: roles: strategy: PreferBase file_rules: strategy: PreferInput display-views: strategy: InputOnly view_transforms: strategy: InputOnly looks: strategy: BaseOnly colorspaces: strategy: PreferInput named_transform: strategy: Remove
The indentation is significant and must be as shown. Default items may be omitted.
Public Functions
-
ConfigMergerRcPtr createEditableCopy() const¶
-
void setSearchPath(const char *path)¶
These search paths are used to locate the input and base config. Set the entire search path. The ‘:’ character is used to separate paths.
-
void addSearchPath(const char *path)¶
Add a single path to the search paths.
-
int getNumSearchPaths() const¶
Get the number of search paths.
-
const char *getSearchPath(int index) const¶
-
void setWorkingDir(const char *dirname)¶
Set the home directory used to resolve relative search paths.
The working directory defaults to the location of the OCIOM file. It is used to convert any relative paths to absolute. If no search paths have been set, the working directory will be used as the fallback search path.
-
const char *getWorkingDir() const¶
-
ConfigMergingParametersRcPtr getParams(int index) const¶
Get the parameters for one of the merges. Returns null if index is out of range.
-
int getNumConfigMergingParameters() const¶
-
void addParams(ConfigMergingParametersRcPtr params)¶
-
ConstConfigMergerRcPtr mergeConfigs() const¶
Execute the merge(s) based on the merger object.
Execute the merge(s) based on the merger object that was previously populated by using ConfigMerger::CreateFromFile or created from scratch by using ConfigMerger::Create() and programmatically configuring it.
- Returns:
a merger object (call getMergedConfig to obtain the result)
-
ConstConfigRcPtr getMergedConfig() const¶
Get the final merged config.
-
ConstConfigRcPtr getMergedConfig(int index) const¶
Get one of the merged configs (if there are a series of merges). Returns null if index is out of range.
-
int getNumMergedConfigs() const¶
-
void serialize(std::ostream &os) const¶
Serialize to the OCIOM file format.
-
void setVersion(unsigned int major, unsigned int minor)¶
Set the version of the OCIOM file format.
-
unsigned int getMajorVersion() const¶
-
unsigned int getMinorVersion() const¶
-
ConfigMerger(const ConfigMerger&) = delete¶
-
ConfigMerger &operator=(const ConfigMerger&) = delete¶
-
~ConfigMerger()¶
Do not use (needed only for pybind11).
-
std::ostream &OpenColorIO_v2_6::operator<<(std::ostream&, const ConfigMerger&)¶
-
namespace ConfigMergingHelpers¶
Functions
-
ConfigRcPtr MergeConfigs(const ConfigMergingParametersRcPtr ¶ms, const ConstConfigRcPtr &baseConfig, const ConstConfigRcPtr &inputConfig)¶
Merge the input into the base config, using the supplied merge parameters.
- Parameters:
params – ConfigMergingParameters controlling the merger.
params – The base config.
params – The input config to merge.
- Returns:
The merged config object.
-
ConfigRcPtr MergeColorSpace(const ConfigMergingParametersRcPtr ¶ms, const ConstConfigRcPtr &baseConfig, const ConstColorSpaceRcPtr &colorspace)¶
Merge a single color space into the base config, using the supplied merge parameters.
Note that the AdjustInputReferenceSpace merge parameter will be ignored and set to false. To use automatic reference space conversion, add the color space to an input config that has the necessary interchange role set.
- Parameters:
params – ConfigMergingParameters controlling the merger.
params – The base config.
params – The input color space to merge.
- Returns:
The merged config object.
-
ConfigRcPtr MergeConfigs(const ConfigMergingParametersRcPtr ¶ms, const ConstConfigRcPtr &baseConfig, const ConstConfigRcPtr &inputConfig)¶
DisplayViewHelpers¶
- PyOpenColorIO.DisplayViewHelpers.GetProcessor(config: PyOpenColorIO.PyOpenColorIO.Config, context: PyOpenColorIO.PyOpenColorIO.Context = None, workingSpaceName: str, displayName: str, viewName: str, channelView: PyOpenColorIO.PyOpenColorIO.MatrixTransform = None, direction: PyOpenColorIO.PyOpenColorIO.TransformDirection = <TransformDirection.TRANSFORM_DIR_FORWARD: 0>) PyOpenColorIO.PyOpenColorIO.Processor¶
- PyOpenColorIO.DisplayViewHelpers.GetIdentityProcessor(config: PyOpenColorIO.PyOpenColorIO.Config) PyOpenColorIO.PyOpenColorIO.Processor¶
- PyOpenColorIO.DisplayViewHelpers.AddDisplayView(config: PyOpenColorIO.PyOpenColorIO.Config, displayName: str, viewName: str, lookName: str = '', colorSpaceName: str = '', colorSpaceFamily: str = '', colorSpaceDescription: str = '', colorSpaceCategories: str = '', transformFilePath: str, connectionColorSpaceName: str) None¶
- PyOpenColorIO.DisplayViewHelpers.RemoveDisplayView(config: PyOpenColorIO.PyOpenColorIO.Config, displayName: str, viewName: str) None¶
-
namespace DisplayViewHelpers¶
Functions
-
ConstProcessorRcPtr GetProcessor(const ConstConfigRcPtr &config, const ConstContextRcPtr &context, const char *workingName, const char *displayName, const char *viewName, const ConstMatrixTransformRcPtr &channelView, TransformDirection direction)¶
Get the processor from the working color space to (display, view) pair (forward) or (display, view) pair to working (inverse). The working color space name could be a role name or a color space name. ChannelView can be empty. If not already present, each of these functions adds ExposureContrastTransforms to enable changing exposure, contrast, and gamma after the processor has been created using dynamic properties.
-
ConstProcessorRcPtr GetProcessor(const ConstConfigRcPtr &config, const char *workingName, const char *displayName, const char *viewName, const ConstMatrixTransformRcPtr &channelView, TransformDirection direction)¶
-
ConstProcessorRcPtr GetIdentityProcessor(const ConstConfigRcPtr &config)¶
Get an identity processor containing only the ExposureContrastTransforms.
-
void AddDisplayView(ConfigRcPtr &config, const char *displayName, const char *viewName, const char *lookDefinition, const char *colorSpaceName, const char *colorSpaceFamily, const char *colorSpaceDescription, const char *categories, const char *transformFilePath, const char *connectionColorSpaceName)¶
Add a new (display, view) pair and the new color space to a configuration instance. The input to the userTransform must be in the specified connectionColorSpace.
-
void RemoveDisplayView(ConfigRcPtr &config, const char *displayName, const char *viewName)¶
Remove a (display, view) pair including the associated color space (only if not used). Note that the view is always removed but the display is only removed if empty.
-
ConstProcessorRcPtr GetProcessor(const ConstConfigRcPtr &config, const ConstContextRcPtr &context, const char *workingName, const char *displayName, const char *viewName, const ConstMatrixTransformRcPtr &channelView, TransformDirection direction)¶
LegacyViewingPipeline¶
- class PyOpenColorIO.LegacyViewingPipeline¶
- LegacyViewingPipeline() None¶
- getChannelView() PyOpenColorIO.PyOpenColorIO.Transform¶
- getColorTimingCC() PyOpenColorIO.PyOpenColorIO.Transform¶
- getDisplayCC() PyOpenColorIO.PyOpenColorIO.Transform¶
- getDisplayViewTransform() PyOpenColorIO.PyOpenColorIO.DisplayViewTransform¶
- getLinearCC() PyOpenColorIO.PyOpenColorIO.Transform¶
- getLooksOverride() str¶
- getLooksOverrideEnabled() bool¶
- getProcessor(config: PyOpenColorIO.PyOpenColorIO.Config, context: PyOpenColorIO.PyOpenColorIO.Context = None) PyOpenColorIO.PyOpenColorIO.Processor¶
- setChannelView(arg0: PyOpenColorIO.PyOpenColorIO.Transform) None¶
- setColorTimingCC(arg0: PyOpenColorIO.PyOpenColorIO.Transform) None¶
- setDisplayCC(arg0: PyOpenColorIO.PyOpenColorIO.Transform) None¶
- setDisplayViewTransform(arg0: PyOpenColorIO.PyOpenColorIO.DisplayViewTransform) None¶
- setLinearCC(arg0: PyOpenColorIO.PyOpenColorIO.Transform) None¶
- setLooksOverride(looks: str) None¶
- setLooksOverrideEnabled(arg0: bool) None¶
-
class LegacyViewingPipeline¶
Whereas the DisplayViewTransform simply applies a specific view from an OCIO display, the LegacyViewingPipeline provides an example of a complete viewing pipeline of the sort that could be used to implement a viewport in a typical application. It therefore adds, around the DisplayViewTransform, various optional color correction steps and RGBA channel view swizzling. The direction of the DisplayViewTranform is used as the direction of the pipeline. Note: The LegacyViewingPipeline class provides the same functionality as the OCIO v1 DisplayTransform.
Legacy viewing pipeline:
Start in display transform input color space.
If linearCC is provided:
Go to scene_linear colorspace.
Apply linearCC transform.
If colorTimingCC is provided:
Go to color_timing colorspace.
Apply colorTimingCC transform.
Apply looks (from display transform or from looks override).
Go to first look color space.
Apply first look transform.
Iterate for all looks.
Apply channelView transform.
Apply display transform (without looks).
Apply displayCC. Note that looks are applied even if the display transform involves data color spaces.
Public Functions
-
virtual ConstDisplayViewTransformRcPtr getDisplayViewTransform() const noexcept = 0¶
-
virtual void setDisplayViewTransform(const ConstDisplayViewTransformRcPtr &dt) noexcept = 0¶
-
virtual ConstTransformRcPtr getLinearCC() const noexcept = 0¶
-
virtual void setLinearCC(const ConstTransformRcPtr &cc) noexcept = 0¶
-
virtual ConstTransformRcPtr getColorTimingCC() const noexcept = 0¶
-
virtual void setColorTimingCC(const ConstTransformRcPtr &cc) noexcept = 0¶
-
virtual ConstTransformRcPtr getChannelView() const noexcept = 0¶
-
virtual void setChannelView(const ConstTransformRcPtr &transform) noexcept = 0¶
-
virtual ConstTransformRcPtr getDisplayCC() const noexcept = 0¶
-
virtual void setDisplayCC(const ConstTransformRcPtr &cc) noexcept = 0¶
-
virtual void setLooksOverrideEnabled(bool enable) = 0¶
Specify whether the lookOverride should be used, or not. This is a separate flag, as it’s often useful to override “looks” to an empty string.
-
virtual bool getLooksOverrideEnabled() const = 0¶
-
virtual void setLooksOverride(const char *looks) = 0¶
A user can optionally override the looks that are, by default, used with the expected display / view combination. A common use case for this functionality is in an image viewing app, where per-shot looks are supported. If for some reason a per-shot look is not defined for the current Context, the Config::getProcessor fcn will not succeed by default. Thus, with this mechanism the viewing app could override to looks = “”, and this will allow image display to continue (though hopefully) the interface would reflect this fallback option.
Looks is a potentially comma (or colon) delimited list of lookNames, where +/- prefixes are optionally allowed to denote forward/inverse look specification (and forward is assumed in the absence of either).
-
virtual const char *getLooksOverride() const = 0¶
-
virtual ConstProcessorRcPtr getProcessor(const ConstConfigRcPtr &config, const ConstContextRcPtr &context) const = 0¶
-
virtual ConstProcessorRcPtr getProcessor(const ConstConfigRcPtr &config) const = 0¶
-
LegacyViewingPipeline(const LegacyViewingPipeline&) = delete¶
-
LegacyViewingPipeline &operator=(const LegacyViewingPipeline&) = delete¶
-
virtual ~LegacyViewingPipeline() = default¶
Do not use (needed only for pybind11).
Public Static Functions
-
static LegacyViewingPipelineRcPtr Create()¶
-
std::ostream &OpenColorIO_v2_6::operator<<(std::ostream&, const LegacyViewingPipeline&)¶
-
typedef std::shared_ptr<const LegacyViewingPipeline> OpenColorIO_v2_6::ConstLegacyViewingPipelineRcPtr¶
-
typedef std::shared_ptr<LegacyViewingPipeline> OpenColorIO_v2_6::LegacyViewingPipelineRcPtr¶
MixingHelpers¶
- class PyOpenColorIO.MixingSlider¶
- MixingSlider(*args, **kwargs)¶
- getSliderMaxEdge() float¶
- getSliderMinEdge() float¶
- mixingToSlider(mixingUnits: SupportsFloat) float¶
- setSliderMaxEdge(arg0: SupportsFloat) None¶
- setSliderMinEdge(arg0: SupportsFloat) None¶
- sliderToMixing(sliderUnits: SupportsFloat) float¶
- class PyOpenColorIO.MixingColorSpaceManager¶
- MixingColorSpaceManager(config: PyOpenColorIO.PyOpenColorIO.Config) None¶
- getMixingEncodings() PyOpenColorIO.PyOpenColorIO.MixingColorSpaceManager.MixingEncodingIterator¶
- getMixingSpaces() PyOpenColorIO.PyOpenColorIO.MixingColorSpaceManager.MixingSpaceIterator¶
- getProcessor(workingSpaceName: str, displayName: str, viewName: str, direction: PyOpenColorIO.PyOpenColorIO.TransformDirection = <TransformDirection.TRANSFORM_DIR_FORWARD: 0>) PyOpenColorIO.PyOpenColorIO.Processor¶
- getSelectedMixingEncodingIdx() int¶
- getSelectedMixingSpaceIdx() int¶
- getSlider(*args, **kwargs)¶
Overloaded function.
getSlider(self: PyOpenColorIO.PyOpenColorIO.MixingColorSpaceManager) -> PyOpenColorIO.PyOpenColorIO.MixingSlider
getSlider(self: PyOpenColorIO.PyOpenColorIO.MixingColorSpaceManager, sliderMixingMinEdge: typing.SupportsFloat, sliderMixingMaxEdge: typing.SupportsFloat) -> PyOpenColorIO.PyOpenColorIO.MixingSlider
- isPerceptuallyUniform() bool¶
- refresh(config: PyOpenColorIO.PyOpenColorIO.Config) None¶
- setSelectedMixingEncoding(mixingEncoding: str) None¶
- setSelectedMixingEncodingIdx(arg0: SupportsInt) None¶
- setSelectedMixingSpace(mixingSpace: str) None¶
- setSelectedMixingSpaceIdx(arg0: SupportsInt) None¶
-
class MixingSlider¶
The MixingSlider and MixingColorSpaceManager classes are to help applications implement correct color pickers. The term “color mixing” is used here to describe what is done in a typical application “color picker” user interface.
A user may want to mix colors in different color spaces. The two most common mixing space options are a scene-linear working space or the display space.
Since scene-linear color spaces are not perceptually uniform, it is necessary to compensate UI widgets such as sliders. For example, it is nice if mid-gray falls near the center of mixing controls rather than way over near the black end. This may be done by using a mapping from linear into an approximately perceptually uniform space.
Also note that a color picking/mixing UI may want to present a given color space in several different encodings. The most common two encodings for color mixing are RGB and HSV.
Note that these helpers anticipate that a user may want to mix colors using values that extend outside the typical [0,1] domain.
Public Functions
-
virtual void setSliderMinEdge(float sliderMixingMinEdge) noexcept = 0¶
Set the minimum edge of a UI slider for conversion to mixing space.
-
virtual float getSliderMinEdge() const noexcept = 0¶
Minimum edge of a UI slider for conversion to mixing space.
-
virtual void setSliderMaxEdge(float sliderMixingMaxEdge) noexcept = 0¶
Set the maximum edge of a UI slider for conversion to mixing space.
-
virtual float getSliderMaxEdge() const noexcept = 0¶
Maximum edge of a UI slider for conversion to mixing space.
-
virtual float sliderToMixing(float sliderUnits) const noexcept = 0¶
Convert from units in distance along the slider to mixing space units.
-
virtual float mixingToSlider(float mixingUnits) const noexcept = 0¶
Convert from mixing space units to distance along the slider.
-
MixingSlider(const MixingSlider&) = delete¶
-
MixingSlider &operator=(const MixingSlider&) = delete¶
-
virtual ~MixingSlider() = default¶
Do not use (needed only for pybind11).
-
virtual void setSliderMinEdge(float sliderMixingMinEdge) noexcept = 0¶
-
std::ostream &OpenColorIO_v2_6::operator<<(std::ostream&, const MixingSlider&)¶
-
class MixingColorSpaceManager¶
Used to mix (or pick/choose) colors.
Public Functions
-
virtual size_t getNumMixingSpaces() const noexcept = 0¶
Access to the mixing spaces.
-
virtual const char *getMixingSpaceUIName(size_t idx) const = 0¶
-
virtual size_t getSelectedMixingSpaceIdx() const noexcept = 0¶
-
virtual void setSelectedMixingSpaceIdx(size_t idx) = 0¶
-
virtual void setSelectedMixingSpace(const char *mixingSpace) = 0¶
-
virtual bool isPerceptuallyUniform() const noexcept = 0¶
-
virtual size_t getNumMixingEncodings() const noexcept = 0¶
Access to the mixing encodings.
-
virtual const char *getMixingEncodingName(size_t idx) const = 0¶
-
virtual size_t getSelectedMixingEncodingIdx() const noexcept = 0¶
-
virtual void setSelectedMixingEncodingIdx(size_t idx) = 0¶
-
virtual void setSelectedMixingEncoding(const char *mixingEncoding) = 0¶
-
virtual void refresh(ConstConfigRcPtr config) = 0¶
Refresh the instance (i.e. needed following a configuration change for example).
-
virtual ConstProcessorRcPtr getProcessor(const char *workingName, const char *displayName, const char *viewName, TransformDirection direction) const = 0¶
-
virtual MixingSlider &getSlider() noexcept = 0¶
-
virtual MixingSlider &getSlider(float sliderMixingMinEdge, float sliderMixingMaxEdge) noexcept = 0¶
-
MixingColorSpaceManager(const MixingColorSpaceManager&) = delete¶
-
MixingColorSpaceManager &operator=(const MixingColorSpaceManager&) = delete¶
-
virtual ~MixingColorSpaceManager() = default¶
Do not use (needed only for pybind11).
Public Static Functions
-
static MixingColorSpaceManagerRcPtr Create(ConstConfigRcPtr &config)¶
-
virtual size_t getNumMixingSpaces() const noexcept = 0¶
-
std::ostream &OpenColorIO_v2_6::operator<<(std::ostream&, const MixingColorSpaceManager&)¶
-
typedef std::shared_ptr<const MixingColorSpaceManager> OpenColorIO_v2_6::ConstMixingColorSpaceManagerRcPtr¶
-
typedef std::shared_ptr<MixingColorSpaceManager> OpenColorIO_v2_6::MixingColorSpaceManagerRcPtr¶