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

Function scene_row_label

perro_editor/res/scripts/ui/editor_ui.rs:2962–2985  ·  view source on GitHub ↗
(
    _depth: usize,
    name: &str,
    type_name: &str,
    badges: &str,
    children: usize,
    parent: Option<&str>,
)

Source from the content-addressed store, hash-verified

2960 for node in doc.scene.nodes.iter() {
2961 if !node_uses_asset_path(node, path) {
2962 continue;
2963 }
2964 users.push(format!(
2965 "{} : {}",
2966 doc.scene.key_name_or_id(node.key),
2967 node.data.type_name()
2968 ));
2969 if users.len() >= 4 {
2970 break;
2971 }
2972 }
2973 let total = doc
2974 .scene
2975 .nodes
2976 .iter()
2977 .filter(|node| node_uses_asset_path(node, path))
2978 .count();
2979 if users.is_empty() {
2980 "users: -".to_string()
2981 } else if total > users.len() {
2982 format!(
2983 "users: {total}\n{}\n+{} more",
2984 users.join("\n"),
2985 total - users.len()
2986 )
2987 } else {
2988 format!("users: {total}\n{}", users.join("\n"))

Callers 2

push_scene_tree_rowFunction · 0.85

Calls 1

short_pathFunction · 0.85

Tested by

no test coverage detected