fix(#921): glTF export carries per-target extras.targetNames natively - #1045
Merged
Merged
Conversation
Assimp's glTF2 exporter already writes `mesh.extras.targetNames` (the Blender/Godot/three.js convention) from aiAnimMesh::mName — which our exporter has always set — but only under the export property GLTF2_TARGETNAMES_EXP, which nothing set. So every glb we wrote carried nameless blend shapes and needed the `<file>.arkit.json` sidecar to get the 52 ARKit names back on re-import. - assimpExportProperties() sets the property; passed at all three Assimp::Exporter sites (exporter, exportCurrentPose, sceneExporter). - The sidecar is no longer written for glTF/glb (exporter + `qtmesh facerig`); still written for formats that cannot carry names, and still READ for files from older builds. Native names win over hints (MeshProcessor already preferred aiAnimMesh::mName). - Test: the existing morph export test now asserts extras.targetNames == ["JawOpen","Smile"], no sidecar, and the names as Ogre pose names after re-import (previously it documented the gap and asserted geometry only). Verified e2e with qtmesh: fixture with targetNames JawOpen/Smile → convert → exported glb extras.targetNames == [JawOpen, Smile], re-import lists the same names, no .arkit.json written. Before the change the same export had extras=None and a sidecar. Fixes #921 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
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.



Summary
Assimp's glTF2 exporter already knows how to write
mesh.extras.targetNames(the convention Blender/Godot/three.js read) fromaiAnimMesh::mName— which our exporter has always set — but only under the export propertyGLTF2_TARGETNAMES_EXP, which nothing ever set. Every glb we wrote therefore carried nameless blend shapes and relied on the<file>.arkit.jsonsidecar to restore the 52 ARKit names on re-import.Changes
assimpExportProperties()setsGLTF2_TARGETNAMES_EXP; passed at all threeAssimp::Exportersites (exporter,exportCurrentPose,sceneExporter)..arkit.jsonsidecar is no longer written for glTF/glb (exporter +qtmesh facerig). It is still written for formats whose exporter cannot carry names, and still read for files produced by older builds; native names win over the hints (MeshProcessoralready preferredaiAnimMesh::mName).Exporter_GltfWritesMorphTargetsIntoFile) now assertsextras.targetNames == ["JawOpen","Smile"], that no sidecar is written, and that the names come back as Ogre pose names after re-import — it previously documented the gap and asserted geometry only.Verification
End to end with the built
qtmesh: a fixture whosetargetNamesareJawOpen/Smile→convert→ the exported glb hasextras.targetNames == [JawOpen, Smile],qtmesh morph --liston that export shows the same names, and no.arkit.jsonis written. Before the change the identical export producedextras: Noneplus a sidecar. The unit test needs Ogre/Xvfb and runs in CI.Note
Per your instruction this PR is not merged automatically — it waits for your review.
Fixes #921
🤖 Generated with Claude Code