pub struct SceneEdit { /* private fields */ }Implementations§
Source§impl SceneEdit
impl SceneEdit
pub fn open(path: impl AsRef<Path>) -> Result<Self, EditError>
pub fn path(&self) -> PathBuf
pub fn root(&self) -> &Path
pub fn scene(&self) -> &Scene
pub fn project(&self) -> &Project
pub fn files(&self) -> impl Iterator<Item = PathBuf> + '_
pub fn text(&self, file: impl AsRef<Path>) -> Option<&str>
pub fn reload(&mut self) -> Result<(), EditError>
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
pub fn undo_label(&self) -> Option<&str>
pub fn redo_label(&self) -> Option<&str>
pub fn begin(&mut self, label: &str) -> Result<(), EditError>
pub fn end(&mut self) -> Option<PatchGroup>
pub fn cancel(&mut self) -> Result<(), EditError>
pub fn apply(&mut self, group: &PatchGroup) -> Result<(), EditError>
pub fn dry_run<T>( &mut self, edits: impl FnOnce(&mut Self) -> Result<T, EditError>, ) -> Result<PatchGroup, EditError>
pub fn undo(&mut self) -> Result<Option<PatchGroup>, EditError>
pub fn redo(&mut self) -> Result<Option<PatchGroup>, EditError>
pub fn set( &mut self, target: &Target, path: &[&str], value: impl Into<Value>, ) -> Result<PatchGroup, EditError>
pub fn unset( &mut self, target: &Target, path: &[&str], ) -> Result<PatchGroup, EditError>
pub fn push( &mut self, target: &Target, path: &[&str], value: impl Into<Value>, ) -> Result<PatchGroup, EditError>
pub fn remove(&mut self, target: &Target) -> Result<PatchGroup, EditError>
pub fn add( &mut self, kind: Kind, id: Id, name: &str, fields: &[(&str, Value)], file: Option<&Path>, ) -> Result<PatchGroup, EditError>
pub fn add_material( &mut self, name: &str, id: Id, material: &Material, file: Option<&Path>, ) -> Result<PatchGroup, EditError>
pub fn duplicate_object( &mut self, name: &str, new: &str, id: Id, ) -> Result<PatchGroup, EditError>
pub fn rename_object( &mut self, name: &str, new: &str, ) -> Result<PatchGroup, EditError>
pub fn set_at( &mut self, object: &str, at: [f32; 3], ) -> Result<PatchGroup, EditError>
pub fn set_rotate( &mut self, object: &str, rotate: [f32; 3], ) -> Result<PatchGroup, EditError>
pub fn set_scale( &mut self, object: &str, scale: impl Into<Value>, ) -> Result<PatchGroup, EditError>
pub fn set_object_material( &mut self, object: &str, material: Option<&str>, ) -> Result<PatchGroup, EditError>
pub fn set_object_materials( &mut self, object: &str, materials: &[(&str, &str)], ) -> Result<PatchGroup, EditError>
pub fn set_shadow( &mut self, object: &str, shadow: &str, ) -> Result<PatchGroup, EditError>
pub fn set_two_sided( &mut self, object: &str, on: bool, ) -> Result<PatchGroup, EditError>
pub fn set_clip( &mut self, object: &str, planes: &[[f32; 4]], ) -> Result<PatchGroup, EditError>
pub fn set_parent( &mut self, object: &str, parent: Option<&str>, ) -> Result<PatchGroup, EditError>
pub fn add_mesh( &mut self, id: Id, name: &str, file: &str, node: Option<&str>, ) -> Result<PatchGroup, EditError>
pub fn set_node( &mut self, mesh: &str, node: &str, key: &str, value: impl Into<Value>, ) -> Result<PatchGroup, EditError>
pub fn set_material( &mut self, name: &str, path: &[&str], value: impl Into<Value>, ) -> Result<PatchGroup, EditError>
Auto Trait Implementations§
impl Freeze for SceneEdit
impl RefUnwindSafe for SceneEdit
impl Send for SceneEdit
impl Sync for SceneEdit
impl Unpin for SceneEdit
impl UnsafeUnpin for SceneEdit
impl UnwindSafe for SceneEdit
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