MCPcopy Create free account
hub / github.com/PerroEngine/Perro / undo_active_scene

Function undo_active_scene

perro_editor/res/scripts/scene/editor_nav.rs:522–528  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>)

Source from the content-addressed store, hash-verified

520pub fn undo_active_scene<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) {
521 let changed = with_state_mut!(ctx.run, EditorState, ctx.id, undo_scene_doc).unwrap_or(false);
522 if changed {
523 rebuild_preview(ctx);
524 }
525 refresh_all(ctx);
526}
527
528pub fn redo_active_scene<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) {
529 let changed = with_state_mut!(ctx.run, EditorState, ctx.id, redo_scene_doc).unwrap_or(false);
530 if changed {
531 rebuild_preview(ctx);

Callers 1

update_editor_shortcutsFunction · 0.85

Calls 2

rebuild_previewFunction · 0.85
refresh_allFunction · 0.85

Tested by

no test coverage detected