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

Register bevy_animation::PlayingAnimation #9023

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Register bevy_animation::PlayingAnimation #9023

merged 1 commit into from
Jul 4, 2023

Conversation

525c1e21-bd67-4735-ac99-b4b0e5262290
Copy link
Contributor

Objective

bevy_animation::PlayingAnimation derives Reflect but is not registered.

Solution

Register bevy_animation::PlayingAnimation.

Copy link
Contributor

@nicopap nicopap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meaningful in any way? Given that PlayingAnimation contains (1) Entity, shouldn't it also reflect MapEntities as well? Also (2) it contains a Handle<T> which I think need special handling as well?

@nicopap nicopap added C-Feature A new feature, making something new possible C-Code-Quality A section of code that is hard to understand or change A-Animation Make things move and change over time A-Reflection Runtime information about types labels Jul 2, 2023
@525c1e21-bd67-4735-ac99-b4b0e5262290
Copy link
Contributor Author

I believe you might be viewing these changes as something that improves persistence/loading/saving but that is not exactly the intended effect of this change. If you're wondering how this is useful:

This allows you to build tooling, such as inspectors/editors, that display or otherwise utilise the currently playing animation, including its elapsed time, speed, whether it's repeating, etc.

animation_clip: Handle<AnimationClip> allows such tooling to link to the definition of the animation; in the defining GlTF, for instance.

path_cache: Vec<Vec<Option<Entity>>> is fairly inconsequential/not very useful from the perspective of something like an inspector or editor. It could arguably be #[reflect(ignore)] but it's fairly innocuous and potentially quite useful for a script or debugger to be able to access.

I have mostly used the example use case of editor/inspector here but the same can be said for scripting.

@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 Jul 2, 2023
@james7132 james7132 added this pull request to the merge queue Jul 4, 2023
Merged via the queue into bevyengine:main with commit 8aa84ba Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time A-Reflection Runtime information about types C-Code-Quality A section of code that is hard to understand or change C-Feature A new feature, making something new possible 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.

4 participants