mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 16:10:19 +00:00
5f2570eb4c
# Objective - Make skin data of glTF meshes available for users, so it would be possible to create skinned meshes without spawning a scene. - I believe it contributes to https://github.com/bevyengine/bevy/issues/13681 ? ## Solution - Add a new `GltfSkin`, representing skin data from a glTF file, new member `skin` to `GltfNode` and both `skins` + `named_skins` to `Gltf` (a la meshes/nodes). - Rewrite glTF nodes resolution as an iterator which sorts nodes by their dependencies (nodes without dependencies first). So when we create `GltfNodes` with their associated `GltfSkin` while iterating, their dependencies already have been loaded. - Make a distinction between `GltfSkin` and `SkinnedMeshInverseBindposes` in assets: prior to this PR, `GltfAssetLabel::Skin(n)` was responsible not for a skin, but for one of skin's components. Now `GltfAssetLabel::InverseBindMatrices(n)` will map to `SkinnedMeshInverseBindposes`, and `GltfAssetLabel::Skin(n)` will map to `GltfSkin`. ## Testing - New test `skin_node` does just that; it tests whether or not `GltfSkin` was loaded properly. ## Migration Guide - Change `GltfAssetLabel::Skin(..)` to `GltfAssetLabel::InverseBindMatrices(..)`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |