-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix bitECS loop-animation #6183
Merged
Merged
Conversation
This file contains 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
takahirox
force-pushed
the
CompatibleLoopAnimation
branch
from
July 24, 2023 21:48
50176fc
to
3fe1e07
Compare
takahirox
force-pushed
the
CompatibleLoopAnimation
branch
from
July 24, 2023 22:18
3fe1e07
to
055ad12
Compare
keianhzo
approved these changes
Aug 8, 2023
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.
Yeah, I think this approach is better. Ideally we should migrate this in the Blender Add-on so we hit this as little as possible.
**Problem** loop-animation with bitECS may not work correctly if multiple loop-animation components use the same animation name to refer to glTF.animation(s). **Root issue** Mozilla Hubs loop-animation component has a problem in the spec. A loop-animation component can refer to glTF.animations with animation names but the glTF specification allows non-unique names in glTF.animations so if there are multiple glTF.animations that have the same name no one can know what glTF.animations a loop-animation using that names refers to. Refer to #6153 for details. **Solution** Preprocesses glTF content before parsing to avoid the problem by adding a glTF loader plugin that converts name based animation reference in loop-animation component to index based. **Note** The old loop-animation component handler (without bitECS) seems to assume that multiple glTF.animations that have the same name have the same animation data and loop-animation refers to the first glTF.animation of the ones having the same name. The plugin follows the assumption for the compatibility, not sure if it is the best approach. With this commit we may remove name based animation reference processing codes from the loop-animation handlers but until we are confident for the change we may keep them. **Change** - Add a glTF loader plugin to convert name based animation reference in loop-animation component to index based.
takahirox
force-pushed
the
CompatibleLoopAnimation
branch
from
August 8, 2023 23:27
055ad12
to
1601593
Compare
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.
Problem
loop-animation
with bitECS may not work correctly if multipleloop-animation
components use the same animation name to refer toglTF.animation(s)
.Root issue
Mozilla Hubs
loop-animation
component has a problem in the spec. Aloop-animation
component can refer toglTF.animations
with animation names but the glTF specification allows non-unique names inglTF.animations
so if there are multipleglTF.animations
that have the same name no one can know whatglTF.animations
aloop-animation
component using that names refers to.Refer to #6153 for details.
Solution
Preprocesses glTF content before parsing to avoid the problem by adding a glTF loader plugin that converts name based animation reference in
loop-animation
component to index based.Note
The old
loop-animation
component handler (without bitECS) seems to assume that multipleglTF.animations
that have the same name have the same animation data and loop-animation refers to the firstglTF.animation
of the ones having the same name. The plugin follows the assumption for the compatibility, not sure if it is the best approach.With this commit we may remove name based animation reference processing codes from the
loop-animation
handlers but until we are confident for the change we may keep them.Change
loop-animation
component to index based.Another approach: #6153