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: Fix undefined node name bug in mergeMorphTargetTracks() #20799

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

takahirox
Copy link
Collaborator

Related issue: Resolves #20792
Related PR: #19042

Description

This PR resolves an issue that ""GLTFExporter: parse - individual morph targets" unit test never ends". Refer to #20792 for the detail about the problem and the root issue.

/cc @donmccurdy

@mrdoob mrdoob added this to the r124 milestone Dec 2, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 2, 2020

Where does sourceTrackBinding.nodeName come from?
We usually initialise foo.name as '' 🤔

@takahirox
Copy link
Collaborator Author

takahirox commented Dec 2, 2020

PropertyBinding.parseTrackName()

https://github.com/mrdoob/three.js/blob/dev/src/animation/PropertyBinding.js#L141

sourceTrackBinding is the result of this regex https://github.com/mrdoob/three.js/blob/dev/src/animation/PropertyBinding.js#L1-L33 The regex allows some of properties can be unmatch (undefined).

We might be able to force to empty string rather than undefined in parseTrackName() side? I'm not sure how the change affects the existing modules tho.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 3, 2020

We might be able to force to empty string rather than undefined in parseTrackName() side?

I vote for this approach.

Although I think the PR can still be merged and the refactoring done with a separate one later.

@mrdoob
Copy link
Owner

mrdoob commented Dec 3, 2020

Sounds good 👍

@mrdoob mrdoob merged commit c642d2e into mrdoob:dev Dec 3, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 3, 2020

Thanks!

@takahirox takahirox deleted the FixGLTFExporter branch December 3, 2020 17:00
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.

Tests: "GLTFExporter: parse - individual morph targets" unit test never ends
4 participants