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

Function open_animation_path

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

Source from the content-addressed store, hash-verified

620 path: scene_path.to_string(),
621 ..SceneSession::default()
622 });
623 state.active_asset_path = scene_path.to_string();
624 state.active_open = state.open_paths.len() - 1;
625 state.activity_mode = "scene".to_string();
626 state.sidebar_mode = "scene".to_string();
627 set_state_scene_doc_loaded(state, &doc);
628 state.selected_key = first_key;
629 state.collapsed_scene_keys.clear();
630 state.inspector_expanded_paths.clear();
631 state.inspector_collapsed_sections.clear();
632 state.viewport_mode = mode.to_string();
633 if mode == "3D" {
634 reset_freecam(state);
635 } else if mode == "2D" {
636 reset_freecam_2d(state);
637 }
638 state.dirty = false;
639 state.dirty_scene_paths.retain(|path| path != scene_path);
640 state.active_glb_path.clear();
641 state.active_glb_summary.clear();
642 state.log = format!("open scene\n{}", editor_files::rel_label(scene_path));
643 capture_active_scene_session(state);
644 });
645 rebuild_preview(ctx);
646 refresh_all(ctx);
647}
648
649pub fn open_animation_path<API: ScriptAPI + ?Sized>(
650 ctx: &mut ScriptContext<'_, API>,
651 anim_path: &str,
652) {

Callers 4

open_asset_ref_pathFunction · 0.85
open_file_slotFunction · 0.85
open_active_assetFunction · 0.85

Calls 4

refresh_allFunction · 0.85
set_logFunction · 0.85
res_to_absFunction · 0.50
load_stringFunction · 0.50

Tested by

no test coverage detected