-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add extras field to GltfNode #6973
Conversation
crates/bevy_gltf/src/loader.rs
Outdated
extras: node | ||
.mesh() | ||
.and_then(|mesh| mesh.extras().as_ref()) | ||
.map(|extras| super::GltfExtras { | ||
value: extras.get().to_string(), | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are not the node extras, those are the node' mesh extras
Maybe add a extras
field with the node extras, and a mesh_extras
field with those from the mesh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Because nodes, meshes, primitives and materials can have extra properties, I added the appropriate fields to the Gltf structs
6bfd317
to
0598aad
Compare
2dc87aa
to
1502ab3
Compare
Just wanted to add my support for having extras added to @mockersf did you still have any concerns? Is there anything I can do to help shepherd this through? |
Looks good to me, I'm just bad at managing my notifications... thanks for the ping! |
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Let's see if this can merge; those CI failures don't seem to be your fault.
bors r+
# Objective In our project we parse `GltfNode` from `*.gltf` file, and we need extra properties information from Blender. Right now there is no way to get this properties from GltfNode (only through query when you spawn scene), so objective of this PR is to add extra properties to `GltfNode` ## Solution Store extra properties inside `Gltf` structs --- ## Changelog - Add pub field `extras` to `GltfNode`/`GltfMesh`/`GltfPrimitive` which store extras - Add pub field `material_extras` to `GltfPrimitive` which store material extras
Pull request successfully merged into main. Build succeeded:
|
# Objective In our project we parse `GltfNode` from `*.gltf` file, and we need extra properties information from Blender. Right now there is no way to get this properties from GltfNode (only through query when you spawn scene), so objective of this PR is to add extra properties to `GltfNode` ## Solution Store extra properties inside `Gltf` structs --- ## Changelog - Add pub field `extras` to `GltfNode`/`GltfMesh`/`GltfPrimitive` which store extras - Add pub field `material_extras` to `GltfPrimitive` which store material extras
# Objective In our project we parse `GltfNode` from `*.gltf` file, and we need extra properties information from Blender. Right now there is no way to get this properties from GltfNode (only through query when you spawn scene), so objective of this PR is to add extra properties to `GltfNode` ## Solution Store extra properties inside `Gltf` structs --- ## Changelog - Add pub field `extras` to `GltfNode`/`GltfMesh`/`GltfPrimitive` which store extras - Add pub field `material_extras` to `GltfPrimitive` which store material extras
Objective
In our project we parse
GltfNode
from*.gltf
file, and we need extra properties information from Blender. Right now there is no way to get this properties from GltfNode (only through query when you spawn scene), so objective of this PR is to add extra properties toGltfNode
Solution
Store extra properties inside
Gltf
structsChangelog
extras
toGltfNode
/GltfMesh
/GltfPrimitive
which store extrasmaterial_extras
toGltfPrimitive
which store material extras