ColorSpaceSet

Caution

API Docs are a work in progress, expect them to improve over time.

class ColorSpaceSet

The ColorSpaceSet is a set of color spaces (i.e. no color space duplication) which could be the result of :cpp:func:`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 :cpp:func:`Config::addColorSpace`_ to update the configuration.

ColorSpaceSetRcPtr createEditableCopy() const

Create a set containing a copy of all the color spaces.

bool operator==(const ColorSpaceSet &css) const

Return true if the two sets are equal.

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

bool operator!=(const ColorSpaceSet &css) const

Return true if the two sets are different.

int getNumColorSpaces() const

Return the number of color spaces.

const char *getColorSpaceNameByIndex(int index) const

Return the color space name using its index. This will be null if an invalid index is specified.

ConstColorSpaceRcPtr getColorSpaceByIndex(int index) const

Return the color space using its index. This will be empty if an invalid index is specified.

ConstColorSpaceRcPtr getColorSpace(const char *name) const

Will return null if the name is not found.

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

int getColorSpaceIndex(const char *name) const

Will return -1 if the name is not found.

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

bool hasColorSpace(const char *name) const

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

Return true

Return false

Parameters * name:

void addColorSpace(const ConstColorSpaceRcPtr &cs)

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).

void addColorSpaces(const ConstColorSpaceSetRcPtr &cs)
void removeColorSpace(const char *name)

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

Note The removal of a missing color space does nothing.

void removeColorSpaces(const ConstColorSpaceSetRcPtr &cs)
void clearColorSpaces()

Clear all color spaces.

~ColorSpaceSet()

-[ Public Static Functions ]-

ColorSpaceSetRcPtr Create()

Create an empty set of color spaces.

class PyOpenColorIO.ColorSpaceSet
class ColorSpaceIterator
class ColorSpaceNameIterator
addColorSpace(self: PyOpenColorIO.ColorSpaceSet, colorSpace: PyOpenColorIO.ColorSpace) → None
addColorSpaces(self: PyOpenColorIO.ColorSpaceSet, colorSpace: PyOpenColorIO.ColorSpaceSet) → None
clearColorSpaces(self: PyOpenColorIO.ColorSpaceSet) → None
getColorSpace(self: PyOpenColorIO.ColorSpaceSet, name: str)PyOpenColorIO.ColorSpace
getColorSpaceNames(self: PyOpenColorIO.ColorSpaceSet) → OpenColorIO_v2_0dev::PyIterator<std::shared_ptr<OpenColorIO_v2_0dev::ColorSpaceSet>, 0>
getColorSpaces(self: PyOpenColorIO.ColorSpaceSet) → OpenColorIO_v2_0dev::PyIterator<std::shared_ptr<OpenColorIO_v2_0dev::ColorSpaceSet>, 1>
removeColorSpace(self: PyOpenColorIO.ColorSpaceSet, colorSpace: str) → None
removeColorSpaces(self: PyOpenColorIO.ColorSpaceSet, colorSpace: PyOpenColorIO.ColorSpaceSet) → None