Keep root FBX model names

This commit is contained in:
Dylan M. Taylor
2026-11-15 19:02:01 +00:00
parent 12168ad475
commit da1e2df96d
+1 -1
View File
@@ -107,7 +107,7 @@ fn read_inner(bytes: &[u8], files: &mut Files) -> Result<RawMesh> {
}
let world = parent * to_mat(node.transform);
let parent_name = inherited.and_then(|i| scene.nodes.get(i)).map_or("", |n| n.name.as_str());
let synthetic = node.mesh.is_some() && node.name.strip_suffix(" geometry") == Some(parent_name);
let synthetic = inherited.is_some() && node.mesh.is_some() && node.name.strip_suffix(" geometry") == Some(parent_name);
let next_parent = if synthetic { inherited } else { Some(id) };
for child in node.children.iter().rev() {
if stack.len() >= stack_limit {