pub struct Parameter {
pub keyframes: BTreeMap<i64, ParameterValue>,
pub interpolation: InterpolationMode,
}Expand description
Effect parameter with keyframe support.
Fields§
§keyframes: BTreeMap<i64, ParameterValue>Parameter keyframes.
interpolation: InterpolationModeInterpolation mode.
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn constant(value: ParameterValue) -> Self
pub fn constant(value: ParameterValue) -> Self
Create a new parameter with a constant value.
Sourcepub fn add_keyframe(&mut self, time: i64, value: ParameterValue)
pub fn add_keyframe(&mut self, time: i64, value: ParameterValue)
Add a keyframe.
Sourcepub fn remove_keyframe(&mut self, time: i64) -> Option<ParameterValue>
pub fn remove_keyframe(&mut self, time: i64) -> Option<ParameterValue>
Remove a keyframe.
Sourcepub fn evaluate_at(
&self,
time: i64,
_timebase: Rational,
) -> EditResult<ParameterValue>
pub fn evaluate_at( &self, time: i64, _timebase: Rational, ) -> EditResult<ParameterValue>
Evaluate parameter at a specific time.
Sourcepub fn keyframe_times(&self) -> Vec<i64>
pub fn keyframe_times(&self) -> Vec<i64>
Get all keyframe times.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnsafeUnpin for Parameter
impl UnwindSafe for Parameter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more