Add get_attributes_mut for Mesh#18976
Open
hukasu wants to merge 10 commits into
Open
Conversation
Contributor
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
IceSentry
reviewed
May 21, 2026
Contributor
IceSentry
left a comment
There was a problem hiding this comment.
I thinks this could be useful, can you fix the conflicts?
IceSentry
approved these changes
May 22, 2026
ChristopherBiscardi
approved these changes
May 22, 2026
IceSentry
reviewed
May 22, 2026
| if let Some(pos) = attrs_slice[1..].iter().position(Option::is_none) { | ||
| attrs_slice.swap(0, pos + 1); | ||
| } else { | ||
| unimplemented!( |
Contributor
There was a problem hiding this comment.
Is it possible to avoid this unimplemented branch? I'd prefer if it returned and error instead of panicking.
Contributor
Author
There was a problem hiding this comment.
that is actually supposed to be an unreachable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Closes #2134
Solution
Create a method in
Meshto retrieve multiple attributes mutably.Testing
New test on
bevy_mesh/mesh.rsAlternatives
Leave to the users collect the desired attributes through the
Mesh::attributes_mutmethodShowcase