pub struct MaterialEditorState {Show 16 fields
pub library: MaterialLibrary,
pub selected_material: Option<u64>,
pub active_tab: MaterialEditorTab,
pub preview_shape: PreviewShape,
pub preview_lighting: PreviewLighting,
pub preview_rotate: bool,
pub preview_rotation: f32,
pub preview_zoom: f32,
pub show_wireframe: bool,
pub show_uv_grid: bool,
pub show_tangent_space: bool,
pub search_query: String,
pub category_filter: Option<String>,
pub history: Vec<Material>,
pub history_pos: usize,
pub compare_material: Option<u64>,
}Fields§
§library: MaterialLibrary§selected_material: Option<u64>§active_tab: MaterialEditorTab§preview_shape: PreviewShape§preview_lighting: PreviewLighting§preview_rotate: bool§preview_rotation: f32§preview_zoom: f32§show_wireframe: bool§show_uv_grid: bool§show_tangent_space: bool§search_query: String§category_filter: Option<String>§history: Vec<Material>§history_pos: usize§compare_material: Option<u64>Implementations§
Source§impl MaterialEditorState
impl MaterialEditorState
pub fn new() -> Self
pub fn selected_material(&self) -> Option<&Material>
pub fn selected_material_mut(&mut self) -> Option<&mut Material>
pub fn snapshot(&mut self)
pub fn undo(&mut self)
pub fn redo(&mut self)
pub fn update(&mut self, dt: f32)
pub fn search_results(&self) -> Vec<&Material>
pub fn duplicate_selected(&mut self) -> Option<u64>
pub fn create_variant(&mut self) -> Option<u64>
Trait Implementations§
Source§impl Clone for MaterialEditorState
impl Clone for MaterialEditorState
Auto Trait Implementations§
impl Freeze for MaterialEditorState
impl RefUnwindSafe for MaterialEditorState
impl Send for MaterialEditorState
impl Sync for MaterialEditorState
impl Unpin for MaterialEditorState
impl UnsafeUnpin for MaterialEditorState
impl UnwindSafe for MaterialEditorState
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.