Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

alradish
Copy link
Contributor

@alradish alradish commented Dec 17, 2022

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

Comment on lines 371 to 376
extras: node
.mesh()
.and_then(|mesh| mesh.extras().as_ref())
.map(|extras| super::GltfExtras {
value: extras.get().to_string(),
}),
Copy link
Member

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?

Copy link
Contributor Author

@alradish alradish Jan 26, 2023

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

@james7132 james7132 added C-Enhancement A new feature A-Assets Load files from disk to use for things like images, models, and sounds labels Jan 2, 2023
@alradish alradish marked this pull request as draft January 22, 2023 20:39
@alradish alradish marked this pull request as ready for review January 26, 2023 17:52
@JoshuaBatty
Copy link

Just wanted to add my support for having extras added to GltfNode.

@mockersf did you still have any concerns? Is there anything I can do to help shepherd this through?

@mockersf
Copy link
Member

mockersf commented Feb 8, 2023

@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!

@mockersf
Copy link
Member

mockersf commented Feb 8, 2023

bors try

bors bot added a commit that referenced this pull request Feb 8, 2023
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 8, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a 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+

bors bot pushed a commit that referenced this pull request Feb 13, 2023
# 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
@bors bors bot changed the title Add extras field to GltfNode [Merged by Bors] - Add extras field to GltfNode Feb 13, 2023
@bors bors bot closed this Feb 13, 2023
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 14, 2023
# 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
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 15, 2023
# 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
@mockersf mockersf mentioned this pull request Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Enhancement A new feature S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants