Skip to main content

FileTransform

Struct FileTransform 

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

A transform backed by an external LUT or color-correction file.

The source path is resolved by OCIO using the active config/context.

Implementations§

Source§

impl FileTransform

Source

pub fn create() -> Result<Self>

Create an empty file transform.

Source

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

Return the source path or URI attached to the transform.

Source

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

Set the source path or URI used to load the external transform data.

Source

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

Return the optional CCC identifier used with multi-grade CDL files.

Source

pub fn set_ccc_id(&self, id: impl AsRef<str>) -> Result<()>

Set the optional CCC identifier used with multi-grade CDL files.

Source

pub fn interpolation(&self) -> Interpolation

Return the interpolation mode requested for LUT sampling.

Source

pub fn set_interpolation(&self, interp: Interpolation)

Set the interpolation mode requested for LUT sampling.

Source

pub fn try_set_interpolation(&self, interp: Interpolation) -> Result<()>

Set interpolation and surface any OCIO validation error.

Source

pub fn cdl_style(&self) -> CDLStyle

Return the CDL style used when the file source is CDL-based.

Source

pub fn set_cdl_style(&self, style: CDLStyle)

Set the CDL style used when the file source is CDL-based.

Source

pub fn try_set_cdl_style(&self, style: CDLStyle) -> Result<()>

Set the CDL style and surface any OCIO validation error.

Source

pub fn direction(&self) -> TransformDirection

Return the transform direction used when this op is evaluated.

Source

pub fn set_direction(&self, direction: TransformDirection)

Set the transform direction used when this op is evaluated.

Source

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

Set the transform 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 validate(&self) -> Result<()>

Ask OCIO to validate the transform in place.

Source

pub fn num_formats() -> i32

Return the number of reader formats supported by FileTransform.

Source

pub fn format_name_by_index(index: i32) -> Option<String>

Return the reader format name at index, or None for an invalid index.

Source

pub fn format_extension_by_index(index: i32) -> Option<String>

Return the reader format extension at index, without a leading dot. Returns None for an invalid index.

Source

pub fn is_format_extension_supported(extension: impl AsRef<str>) -> bool

Return whether extension is recognized by the upstream file readers.

Trait Implementations§

Source§

impl Drop for FileTransform

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 FileTransform

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.