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

Method path

perro_editor/res/scripts/ui/editor_ui.rs:2760–2774  ·  view source on GitHub ↗
(&self, doc: &SceneDoc, key: SceneKey)

Source from the content-addressed store, hash-verified

2758 return asset_kind_from_row_kind(&row.kind);
2759 }
2760 if state.inspector_picker_field == "script" {
2761 return Some(perro_scene::SceneAssetKind::Script);
2762 }
2763 let key = state.selected_key?;
2764 let doc = cached_scene_doc_shared(&state.doc_text);
2765 let node = doc
2766 .scene
2767 .nodes
2768 .iter()
2769 .find(|node| node.key.as_u32() == key)?;
2770 let field = perro_scene::scene_node_field(node.data.node_type, &state.inspector_picker_field)?;
2771 match field.ty {
2772 perro_scene::NodeFieldType::Asset(kind) => Some(kind),
2773 _ => None,
2774 }
2775}
2776
2777fn asset_kind_from_row_kind(kind: &str) -> Option<perro_scene::SceneAssetKind> {

Callers 10

scan_innerFunction · 0.45
copy_dir_recursiveFunction · 0.45
scene_node_pathFunction · 0.45
merge_script_schema_dirFunction · 0.45
emit_rerun_for_treeFunction · 0.45
newest_mtimeFunction · 0.45
copy_dirFunction · 0.45
collect_markdownFunction · 0.45

Calls 6

key_name_or_idMethod · 0.80
joinMethod · 0.80
pushMethod · 0.45
nodeMethod · 0.45
as_u32Method · 0.45
lenMethod · 0.45

Tested by 1

merge_script_schema_dirFunction · 0.36