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

Function quick_asset_dir

perro_editor/res/scripts/assets/editor_assets.rs:1815–1844  ·  view source on GitHub ↗
(state: &EditorState, kind: &str)

Source from the content-addressed store, hash-verified

1813 let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| {
1814 if let Ok(paths) = scan_res_paths(Path::new(&state.project_root)) {
1815 state.file_paths = paths;
1816 }
1817 state.active_asset_path = out_path.clone();
1818 state.active_anim_path = out_path.clone();
1819 state.active_glb_path.clear();
1820 state.active_glb_summary.clear();
1821 state.activity_mode = "scene".to_string();
1822 state.anim_drawer_open = true;
1823 if player_key.is_none() {
1824 state.active_anim_player_key = None;
1825 }
1826 state.log = format!("glb anim -> panim\n{out_path}");
1827 });
1828 if player_key.is_some() {
1829 attach_animation_to_selected_player(ctx, &out_path);
1830 } else {
1831 refresh_all(ctx);
1832 }
1833 }
1834 Err(err) => set_log(ctx, &format!("glb anim write fail\n{out_path}\n{err}")),
1835 }
1836 }
1837 Err(err) => set_log(ctx, &format!("glb anim fail\n{glb_path}\n{err}")),
1838 }
1839}
1840
1841pub fn export_selected_glb_material<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) {
1842 let request = with_state!(ctx.run, EditorState, ctx.id, |state| {
1843 let path = active_gltf_asset_path(state)?;
1844 Some((
1845 state.project_root.clone(),
1846 path,
1847 state.active_glb_mat_index,

Callers

nothing calls this directly

Calls 3

res_folder_dirFunction · 0.85
parent_res_folderFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected