Set morphtarget names from mesh extras, to better support models exported from Blender.#70
Closed
emperorofmars wants to merge 0 commit intoprefrontalcortex:devfrom
Closed
Set morphtarget names from mesh extras, to better support models exported from Blender.#70emperorofmars wants to merge 0 commit intoprefrontalcortex:devfrom
emperorofmars wants to merge 0 commit intoprefrontalcortex:devfrom
Conversation
|
Thanks! Could you rebase on dev please? |
Author
|
@hybridherbst done, i retested that it still works. |
|
Thanks! Looks good. I merged the PR. It would be great if you could check (and potentially make a small follow-up PR) to guard against the targetNames list being a different length than the actual target count, similar to https://github.com/mrdoob/three.js/blob/d45acc1dad2fce10c6fb496b9466de98d9042ab0/examples/jsm/loaders/GLTFLoader.js#LL2245C8-L2245C8 Thanks! |
Author
|
Awesome! |
f504fb5 to
6965721
Compare
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.
Blender exports morphtarget names not into mesh primitives extras, but into mesh extras.
Added code to read the mesh extras field after deserialisation and get the TargetNames.
The TargetNames are then added to each mesh privitive.
In GLTFSceneImporter.cs at line 1975 the TargetNames are then read from the mesh's first mesh primitive.
The way i've implemented it will not 'consume' the extras data, like its currently done for mesh primitives in MeshPrimitive.cs. Maybe that should be adapted as well.