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

Function set_active_tab

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

Source from the content-addressed store, hash-verified

751 };
752 if count == 0 {
753 state.log = format!("glb {kind}\nnone");
754 return;
755 }
756 let current = match kind {
757 "mesh" => state.active_glb_mesh_index,
758 "mat" => state.active_glb_mat_index,
759 "animation" => state.active_glb_anim_index,
760 _ => 0,
761 };
762 let next = offset_index(current.min(count - 1), count, dir);
763 match kind {
764 "mesh" => state.active_glb_mesh_index = next,
765 "mat" => state.active_glb_mat_index = next,
766 "animation" => state.active_glb_anim_index = next,
767 _ => {}
768 }
769 state.active_glb_summary = gltf_summary(
770 &path,
771 info.mesh_count,
772 info.material_count,
773 info.animation_count,
774 info.skeleton_count,
775 info.texture_count,
776 state.active_glb_mesh_index,
777 state.active_glb_mat_index,
778 state.active_glb_anim_index,

Callers 1

cycle_scene_tabFunction · 0.85

Calls 3

refresh_allFunction · 0.85
open_scene_pathFunction · 0.85

Tested by

no test coverage detected