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

Function offset_duplicated_node

perro_editor/res/scripts/scene/editor_nodes.rs:2043–2051  ·  view source on GitHub ↗
(data: &mut SceneNodeData)

Source from the content-addressed store, hash-verified

2041 .iter()
2042 .filter(|node| node.parent.map(|parent| parent.as_u32()) == current_parent)
2043 .map(|node| node.key.as_u32())
2044 .collect::<Vec<_>>();
2045 let Some(pos) = siblings.iter().position(|sibling| *sibling == key) else {
2046 return false;
2047 };
2048 if pos == 0 {
2049 state.log = "reparent\nno previous sibling".to_string();
2050 return false;
2051 }
2052 Some(siblings[pos - 1])
2053 };
2054 if next_parent == Some(key) || current_parent == next_parent {

Callers

nothing calls this directly

Calls 4

find_vec3_valueFunction · 0.85
set_scene_vec3Function · 0.85
find_vec2_valueFunction · 0.85
set_scene_vec2Function · 0.85

Tested by

no test coverage detected