Skip to content

Conversation

@m0ppers
Copy link

@m0ppers m0ppers commented Dec 20, 2025

had a problem trying to animate an object that was parented. the problem was that nodes_in_scene would only collect the nodes referenced by the scene directly (without including their children)

Copy link
Owner

@schell schell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR 🙇 ! I just had a quick suggestion about how to make the difference between the root nodes and recursively collected nodes more explicit.

}
}

pub fn nodes_in_scene(&self, scene_index: usize) -> impl Iterator<Item = &GltfNode> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is lacking documentation, which is my fault. It should mention that this function roughly follows the gltf::Scene::nodes function.

I think what we need here is a new pub recursive_nodes_in_scene(&self, scene_index: usize) -> impl Iterator<Item = &GltfNode>, and maybe we should rename nodes_in_scene to root_nodes_in_scene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants