Skip to content

docs and tests for on_primitive#23130

Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom
ChristopherBiscardi:on_primitive_cleanup
Mar 2, 2026
Merged

docs and tests for on_primitive#23130
alice-i-cecile merged 3 commits intobevyengine:mainfrom
ChristopherBiscardi:on_primitive_cleanup

Conversation

@ChristopherBiscardi
Copy link
Contributor

Objective

Add additional tests and docs for the on_primitive hook introduced in #22907

Solution

Tests currently only test failure conditions such as

  • 0, 2, or more Meshes
  • 0, 2, or more Primitives
  • 0, 2, or more buffers

Which is the most important place to notify users early, considering the additional complexity incurred by following the gltf crate's types here.

Testing

cargo test -p bevy_gltf

@ChristopherBiscardi ChristopherBiscardi added S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-glTF Related to the glTF 3D scene/model format A-Assets Load files from disk to use for things like images, models, and sounds labels Feb 24, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Assets Feb 24, 2026
@andriyDev andriyDev added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 25, 2026
@Smerom
Copy link
Contributor

Smerom commented Feb 26, 2026

Based on your description, did you intend to add tests for the 2+ case? I'm only seeing one for the 0 case. Otherwise looks good!

@ChristopherBiscardi
Copy link
Contributor Author

@Smerom I don't currently plan to. The 0 test case exercises the same code paths that 2+ would, including failing the same if conditions.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 2, 2026
Merged via the queue into bevyengine:main with commit d0e45d8 Mar 2, 2026
42 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in Assets Mar 2, 2026
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 A-glTF Related to the glTF 3D scene/model format D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants