pub struct MorphLayer {
pub name: String,
pub blend_mode: LayerBlend,
pub opacity: f32,
pub enabled: bool,
pub weights: HashMap<String, f32>,
pub mask: Option<Vec<f32>>,
}Expand description
A single morph layer
Fields§
§name: String§blend_mode: LayerBlend§opacity: f32§enabled: bool§weights: HashMap<String, f32>Per-morph weights in this layer
mask: Option<Vec<f32>>Optional per-morph mask (vertex group influence)
Implementations§
Source§impl MorphLayer
impl MorphLayer
pub fn new(name: impl Into<String>) -> Self
pub fn with_blend(self, blend: LayerBlend) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
pub fn set_weight(&mut self, morph: impl Into<String>, weight: f32)
pub fn get_weight(&self, morph: &str) -> f32
pub fn morph_names(&self) -> Vec<&str>
Auto Trait Implementations§
impl Freeze for MorphLayer
impl RefUnwindSafe for MorphLayer
impl Send for MorphLayer
impl Sync for MorphLayer
impl Unpin for MorphLayer
impl UnsafeUnpin for MorphLayer
impl UnwindSafe for MorphLayer
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
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