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

Function open_first_scene

perro_editor/res/scripts/assets/editor_assets.rs:878–888  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>)

Source from the content-addressed store, hash-verified

876 }
877 let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| {
878 let closed = state.open_paths.len();
879 state.open_paths.clear();
880 state.scene_sessions.clear();
881 state.dirty_scene_paths.clear();
882 state.active_open = 0;
883 state.doc_text.clear();
884 state.selected_key = None;
885 state.dirty = false;
886 state.log = format!("close all tabs\n{closed}");
887 closed
888 })
889 .unwrap_or(0);
890 clear_preview(ctx);
891 refresh_all(ctx);

Callers

nothing calls this directly

Calls 1

open_file_slotFunction · 0.85

Tested by

no test coverage detected