ColorSpace

class PyOpenColorIO.ColorSpace
ColorSpace(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyOpenColorIO.ColorSpace) -> None

  2. __init__(self: PyOpenColorIO.ColorSpace, referenceSpace: PyOpenColorIO.ReferenceSpaceType) -> None

  3. __init__(self: PyOpenColorIO.ColorSpace, referenceSpace: PyOpenColorIO.ReferenceSpaceType = <ReferenceSpaceType.REFERENCE_SPACE_SCENE: 0>, name: str = ‘’, aliases: List[str] = [], family: str = ‘’, encoding: str = ‘’, equalityGroup: str = ‘’, description: str = ‘’, bitDepth: PyOpenColorIO.BitDepth = <BitDepth.BIT_DEPTH_UNKNOWN: 0>, isData: bool = False, allocation: PyOpenColorIO.Allocation = <Allocation.ALLOCATION_UNIFORM: 1>, allocationVars: List[float] = [], toReference: PyOpenColorIO.Transform = None, fromReference: PyOpenColorIO.Transform = None, categories: List[str] = []) -> None

addAlias(alias: str) → None

Add an alias for the color space name (the aliases may be used as a synonym for the name). Nothing will be added if the alias is already the color space name, one of its aliases, or the argument is null. The aliases must not conflict with existing roles, color space names, named transform names, or other aliases. This is verified when adding the color space to the config.

addCategory(category: str) → None

Add a single category.

Note

Will do nothing if the category already exists.

clearAliases() → None
clearCategories() → None

Clear all the categories.

getAliases()PyOpenColorIO.ColorSpace.ColorSpaceAliasIterator
getAllocation()PyOpenColorIO.Allocation
getAllocationVars() → List[float]
getBitDepth()PyOpenColorIO.BitDepth
getCategories()PyOpenColorIO.ColorSpace.ColorSpaceCategoryIterator
getDescription() → str
getEncoding() → str
getEqualityGroup() → str

Get the ColorSpace group name (used for equality comparisons) This allows no-op transforms between different colorspaces. If an equalityGroup is not defined (an empty string), it will be considered unique (i.e., it will not compare as equal to other ColorSpaces with an empty equality group). This is often, though not always, set to the same value as ‘family’.

getFamily() → str

Get the family, for use in user interfaces (optional) The family string could use a ‘/’ separator to indicate levels to be used by hierarchical menus.

getName() → str
getReferenceSpaceType()PyOpenColorIO.ReferenceSpaceType

A display color space will use the display-referred reference space.

getTransform(direction: PyOpenColorIO.ColorSpaceDirection)PyOpenColorIO.Transform

If a transform in the specified direction has been specified, return it. Otherwise return a null ConstTransformRcPtr

hasCategory(category: str) → bool

Return true if the category is present.

isData() → bool
removeAlias(alias: str) → None

Does nothing if alias is not present.

removeCategory(category: str) → None

Remove a category.

Note

Will do nothing if the category is missing.

setAllocation(allocation: PyOpenColorIO.Allocation) → None
setAllocationVars(vars: List[float]) → None
setBitDepth(bitDepth: PyOpenColorIO.BitDepth) → None
setDescription(description: str) → None
setEncoding(encoding: str) → None
setEqualityGroup(equalityGroup: str) → None
setFamily(family: str) → None

Set the family, for use in user interfaces (optional)

setIsData(isData: bool) → None
setName(name: str) → None

If the name is already an alias, that alias is removed.

setTransform(transform: PyOpenColorIO.Transform, direction: PyOpenColorIO.ColorSpaceDirection) → None

Specify the transform for the appropriate direction. Setting the transform to null will clear it.

class PyOpenColorIO.ColorSpace.ColorSpaceCategoryIterator
self[arg0: int] → str
iter(self)PyOpenColorIO.ColorSpace.ColorSpaceCategoryIterator
len(self) → int
next(self) → str
class PyOpenColorIO.ColorSpace.ColorSpaceAliasIterator
self[arg0: int] → str
iter(self)PyOpenColorIO.ColorSpace.ColorSpaceAliasIterator
len(self) → int
next(self) → str

ColorSpaceSet

class PyOpenColorIO.ColorSpaceSet

The :ref:`ColorSpaceSet` is a set of color spaces (i.e. no color space duplication) which could be the result of :ref:`Config::getColorSpaces`() or built from scratch.

Note

The color spaces are decoupled from the config ones, i.e., any changes to the set itself or to its color spaces do not affect the original color spaces from the configuration. If needed, use :ref:`Config::addColorSpace`() to update the configuration.

self & arg0: PyOpenColorIO.ColorSpaceSetPyOpenColorIO.ColorSpaceSet

Perform the intersection of two sets.

Note

This function provides operations on two color space sets where the result contains copied color spaces and no duplicates.

Parameters
  • lcss

  • rcss

self == arg0: PyOpenColorIO.ColorSpaceSet → bool

Return true if the two sets are equal.

Note

The comparison is done on the color space names (not a deep comparison).

ColorSpaceSet() → None

Create an empty set of color spaces.

self != arg0: PyOpenColorIO.ColorSpaceSet → bool

Return true if the two sets are different.

self | arg0: PyOpenColorIO.ColorSpaceSetPyOpenColorIO.ColorSpaceSet

Perform the union of two sets.

Note

This function provides operations on two color space sets where the result contains copied color spaces and no duplicates.

Parameters
  • lcss

  • rcss

self - arg0: PyOpenColorIO.ColorSpaceSetPyOpenColorIO.ColorSpaceSet

Perform the difference of two sets.

Note

This function provides operations on two color space sets where the result contains copied color spaces and no duplicates.

Parameters
  • lcss

  • rcss

addColorSpace(colorSpace: PyOpenColorIO.ColorSpace) → None

Add color space(s).

Note

If another color space is already registered with the same name, this will overwrite it. This stores a copy of the specified color space(s). Throws if one of the aliases is already assigned as a name or alias to an existing color space.

addColorSpaces(colorSpaces: PyOpenColorIO.ColorSpaceSet) → None
clearColorSpaces() → None

Clear all color spaces.

getColorSpace(name: str)PyOpenColorIO.ColorSpace

Note

Only accepts color space names (i.e. no role name).

Will return null if the name is not found.

getColorSpaceNames()PyOpenColorIO.ColorSpaceSet.ColorSpaceNameIterator
getColorSpaces()PyOpenColorIO.ColorSpaceSet.ColorSpaceIterator
removeColorSpace(colorSpace: str) → None

Remove color space(s) using color space names (i.e. no role name).

Note

The removal of a missing color space does nothing.

removeColorSpaces(colorSpaces: PyOpenColorIO.ColorSpaceSet) → None
class PyOpenColorIO.ColorSpaceSet.ColorSpaceNameIterator
self[arg0: int] → str
iter(self)PyOpenColorIO.ColorSpaceSet.ColorSpaceNameIterator
len(self) → int
next(self) → str
class PyOpenColorIO.ColorSpaceSet.ColorSpaceIterator
self[arg0: int]PyOpenColorIO.ColorSpace
iter(self)PyOpenColorIO.ColorSpaceSet.ColorSpaceIterator
len(self) → int
next(self)PyOpenColorIO.ColorSpace