ViewTransform¶
- class PyOpenColorIO.ViewTransform¶
A :ref:`ViewTransform` provides a conversion from the main (usually scene-referred) reference space to the display-referred reference space. This allows splitting the conversion from the main reference space to a display into two parts: the ViewTransform plus a display color space.
It is also possible to provide a ViewTransform that converts from the display-referred reference space back to that space. This is useful in cases when a ViewTransform is needed when converting between displays (such as HDR to SDR).
The ReferenceSpaceType indicates whether the ViewTransform converts from scene-to-display reference or display-to-display reference.
The from_reference transform direction is the one that is used when going out towards a display.
- ViewTransform(*args, **kwargs)¶
Overloaded function.
__init__(self: PyOpenColorIO.PyOpenColorIO.ViewTransform, referenceSpace: PyOpenColorIO.PyOpenColorIO.ReferenceSpaceType) -> None
__init__(self: PyOpenColorIO.PyOpenColorIO.ViewTransform, referenceSpace: PyOpenColorIO.PyOpenColorIO.ReferenceSpaceType = <ReferenceSpaceType.REFERENCE_SPACE_SCENE: 0>, name: str = ‘’, family: str = ‘’, description: str = ‘’, toReference: PyOpenColorIO.PyOpenColorIO.Transform = None, fromReference: PyOpenColorIO.PyOpenColorIO.Transform = None, categories: collections.abc.Sequence[str] = []) -> None
- addCategory(category: str) None¶
- clearCategories() None¶
- getDescription() str¶
- getFamily() str¶
- getInterchangeAttribute(attrName: str) str¶
Get/Set the interchange attributes.
Currently the only supported attribute name is “amf_transform_ids”. Using any other name will throw. If the attribute is not defined, it will return an empty string. Setting the value to an empty string will effectively delete the attribute.
The AMF transform IDs are used to identify specific transforms in the ACES Metadata File. Multiple transform IDs can be specified in a newline-separated string.
- getInterchangeAttributes() dict[str, str]¶
- getName() str¶
- getReferenceSpaceType() PyOpenColorIO.PyOpenColorIO.ReferenceSpaceType¶
- getTransform(direction: PyOpenColorIO.PyOpenColorIO.ViewTransformDirection) PyOpenColorIO.PyOpenColorIO.Transform¶
If a transform in the specified direction has been specified, return it. Otherwise return a null ConstTransformRcPtr
- hasCategory(category: str) bool¶
- removeCategory(category: str) None¶
- setDescription(description: str) None¶
- setFamily(family: str) None¶
- setInterchangeAttribute(attrName: str, attrValue: str) None¶
- setName(name: str) None¶
- setTransform(transform: PyOpenColorIO.PyOpenColorIO.Transform, direction: PyOpenColorIO.PyOpenColorIO.ViewTransformDirection) None¶
Specify the transform for the appropriate direction. Setting the transform to null will clear it.
-
class ViewTransform¶
A ViewTransform provides a conversion from the main (usually scene-referred) reference space to the display-referred reference space. This allows splitting the conversion from the main reference space to a display into two parts: the ViewTransform plus a display color space.
It is also possible to provide a ViewTransform that converts from the display-referred reference space back to that space. This is useful in cases when a ViewTransform is needed when converting between displays (such as HDR to SDR).
The ReferenceSpaceType indicates whether the ViewTransform converts from scene-to-display reference or display-to-display reference.
The from_reference transform direction is the one that is used when going out towards a display.
Public Functions
-
ViewTransformRcPtr createEditableCopy() const¶
-
const char *getName() const noexcept¶
-
void setName(const char *name) noexcept¶
-
const char *getFamily() const noexcept¶
See also
-
void setFamily(const char *family)¶
See also
-
const char *getDescription() const noexcept¶
-
void setDescription(const char *description)¶
-
const char *getInterchangeAttribute(const char *attrName) const¶
Get/Set the interchange attributes.
Currently the only supported attribute name is “amf_transform_ids”. Using any other name will throw. If the attribute is not defined, it will return an empty string. Setting the value to an empty string will effectively delete the attribute.
The AMF transform IDs are used to identify specific transforms in the ACES Metadata File. Multiple transform IDs can be specified in a newline-separated string.
-
void setInterchangeAttribute(const char *attrName, const char *value)¶
-
std::map<std::string, std::string> getInterchangeAttributes() const noexcept¶
-
bool hasCategory(const char *category) const¶
See also
-
void addCategory(const char *category)¶
See also
-
void removeCategory(const char *category)¶
See also
-
int getNumCategories() const¶
See also
-
const char *getCategory(int index) const¶
See also
-
void clearCategories()¶
See also
-
ReferenceSpaceType getReferenceSpaceType() const noexcept¶
-
ConstTransformRcPtr getTransform(ViewTransformDirection dir) const noexcept¶
If a transform in the specified direction has been specified, return it. Otherwise return a null ConstTransformRcPtr
-
void setTransform(const ConstTransformRcPtr &transform, ViewTransformDirection dir)¶
Specify the transform for the appropriate direction. Setting the transform to null will clear it.
-
ViewTransform(const ViewTransform&) = delete¶
-
ViewTransform &operator=(const ViewTransform&) = delete¶
-
~ViewTransform()¶
Do not use (needed only for pybind11).
Public Static Functions
-
static ViewTransformRcPtr Create(ReferenceSpaceType referenceSpace)¶
-
ViewTransformRcPtr createEditableCopy() const¶
-
std::ostream &OpenColorIO_v2_5::operator<<(std::ostream&, const ViewTransform&)¶
-
typedef std::shared_ptr<const ViewTransform> OpenColorIO_v2_5::ConstViewTransformRcPtr¶
-
typedef std::shared_ptr<ViewTransform> OpenColorIO_v2_5::ViewTransformRcPtr¶