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

GLTFExporter: Remove unnecessary early return. #28938

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

POPOBE97
Copy link
Contributor

@POPOBE97 POPOBE97 commented Jul 22, 2024

Remove unnecessary early return

Related issue: No related issues

Description

When deleting nodes within the imported GLB/GLTF model, if the deleted node is referenced by some animation, exporting the GLB again will cause the entire animation track to be discarded, instead of only discarding the animation related to the deleted node. This issue is caused by unnecessary early returns in the GLTFExporter. Changing the return statements to continue resolves this problem.

Prevent from uneccessary early return
@POPOBE97 POPOBE97 changed the title Update GLTFExporter.js Remove unnecessary early return in GLTFExporter.js Jul 22, 2024
Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

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

This was intentional as of #12713, to avoid exporting what might be an invalid AnimationClip, but I'm OK with changing as you suggest to skip only the invalid KeyframeTrack, not the entire clip.

@Mugen87 Mugen87 added this to the r167 milestone Jul 22, 2024
@Mugen87 Mugen87 changed the title Remove unnecessary early return in GLTFExporter.js GLTFExporter: Remove unnecessary early return. Jul 22, 2024
@Mugen87 Mugen87 merged commit 4e4badd into mrdoob:dev Jul 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants