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

Function open_asset_ref_path

perro_editor/res/scripts/scene/editor_nodes.rs:585–604  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>, path: &str)

Source from the content-addressed store, hash-verified

583 "find user {}/{}\n{}",
584 next_idx + 1,
585 users.len(),
586 doc.scene.key_name_or_id(SceneKey::new(key))
587 );
588 true
589 })
590 .unwrap_or(false);
591 if changed {
592 refresh_all(ctx);
593 }
594}
595
596pub fn selected_node_asset_refs(node: &SceneNodeEntry) -> Vec<String> {
597 let mut out = Vec::new();
598 if let Some(root_of) = node.root_of.as_ref()
599 && root_of.starts_with("res://")
600 {
601 out.push(format!("root_of: {root_of}"));
602 }
603 if let Some(script) = node.script.as_ref()
604 && script.starts_with("res://")
605 {
606 out.push(format!("script: {script}"));
607 }

Callers 1

Calls 6

base_res_asset_pathFunction · 0.85
open_animation_pathFunction · 0.85
open_gltf_pathFunction · 0.85
open_scene_pathFunction · 0.85
refresh_allFunction · 0.85
is_gltf_pathFunction · 0.50

Tested by

no test coverage detected