Skip to main content

LookTransform

Struct LookTransform 

Source
pub struct LookTransform { /* private fields */ }
Expand description

Applies an OCIO look string between source and destination color spaces.

Implementations§

Source§

impl LookTransform

Source

pub fn result_color_space( config: &Config, context: &ConstContext, looks: impl AsRef<str>, ) -> Result<String>

Resolve the final process space of a look expression, including OCIO’s fallbacks. An empty expression returns an empty string, as in native OCIO.

Source

pub fn create() -> Result<Self>

Create a look transform with default settings.

Source

pub fn src(&self) -> Option<String>

Return the source color space name.

Source

pub fn set_src(&self, src: impl AsRef<str>) -> Result<()>

Set the source color space name.

Source

pub fn dst(&self) -> Option<String>

Return the destination color space name.

Source

pub fn set_dst(&self, dst: impl AsRef<str>) -> Result<()>

Set the destination color space name.

Source

pub fn looks(&self) -> Option<String>

Return the comma-separated look names.

Source

pub fn set_looks(&self, looks: impl AsRef<str>) -> Result<()>

Set the comma-separated look names.

Source

pub fn direction(&self) -> TransformDirection

Return the evaluation direction.

Source

pub fn set_direction(&self, direction: TransformDirection)

Set the evaluation direction, panicking on validation error.

Source

pub fn try_set_direction(&self, direction: TransformDirection) -> Result<()>

Set evaluation direction and surface any OCIO validation error.

Source

pub fn create_editable_copy(&self) -> Result<Self>

Create an editable copy that is independent from the original transform.

Source

pub fn format_metadata(&self) -> Option<FormatMetadata>

Return format metadata attached to the transform, when available.

Source

pub fn skip_color_space_conversion(&self) -> bool

Return whether color-space conversion is skipped for this look.

Source

pub fn set_skip_color_space_conversion(&self, skip: bool)

Set whether to skip color-space conversion, panicking on validation error.

Source

pub fn try_set_skip_color_space_conversion(&self, skip: bool) -> Result<()>

Set color-space conversion bypass and surface any OCIO validation error.

Source

pub fn validate(&self) -> Result<()>

Validate the transform configuration and return any errors.

Trait Implementations§

Source§

impl Drop for LookTransform

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl TransformHandle for LookTransform

Source§

fn as_ptr(&self) -> *mut c_void

Source§

fn diagnostic_text(&self) -> Result<String>

Return OCIO’s diagnostic representation, which may include file paths. This text is not a stable interchange format.
Source§

fn try_type_tag(&self) -> Result<i32>

Return the version-independent tag corresponding to crate::TransformType.
Source§

fn try_set_direction(&mut self, direction: TransformDirection) -> Result<()>

Change the native evaluation direction without modifying the stored parameters.
Source§

fn try_validate(&self) -> Result<()>

Validate the native transform without copying it or building a processor.
Source§

fn try_create_editable_copy(&self) -> Result<Transform>

Create a native editable copy, preserving the concrete transform type. A copied group shares its children with the original. For an independent built-in group graph, use GroupTransform::create_deep_copy.
Source§

fn try_direction(&self) -> Result<TransformDirection>

Query the native direction with validation, for any supported transform.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.