Skip to content

fix(#921): glTF export carries per-target extras.targetNames natively - #1045

Merged
fernandotonon merged 1 commit into
masterfrom
fix/gltf-target-names-921
Sep 16, 2026
Merged

fernandotonon merged 1 commit into
masterfrom
fix/gltf-target-names-921

Conversation

@fernandotonon

Copy link
Copy Markdown
Owner

Summary

Assimp's glTF2 exporter already knows how to write mesh.extras.targetNames (the convention Blender/Godot/three.js read) from aiAnimMesh::mName — which our exporter has always set — but only under the export property GLTF2_TARGETNAMES_EXP, which nothing ever set. Every glb we wrote therefore carried nameless blend shapes and relied on the <file>.arkit.json sidecar to restore the 52 ARKit names on re-import.

Changes

  • assimpExportProperties() sets GLTF2_TARGETNAMES_EXP; passed at all three Assimp::Exporter sites (exporter, exportCurrentPose, sceneExporter).
  • The .arkit.json sidecar 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 (MeshProcessor already preferred aiAnimMesh::mName).
  • The existing morph export test (Exporter_GltfWritesMorphTargetsIntoFile) now asserts extras.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 whose targetNames are JawOpen/Smileconvert → the exported glb has extras.targetNames == [JawOpen, Smile], qtmesh morph --list on that export shows the same names, and no .arkit.json is written. Before the change the identical export produced extras: None plus 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

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>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4f1e5b10-ec4e-4f35-9b07-03166e355ee1

📥 Commits

Reviewing files that changed from the base of the PR and between 516969b and 540650d.

📒 Files selected for processing (5)
  • CLAUDE.md
  • src/Assimp/Importer.cpp
  • src/CLIPipeline.cpp
  • src/MeshImporterExporter.cpp
  • src/MeshImporterExporter_test.cpp

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fernandotonon
fernandotonon merged commit 8720dc9 into master Sep 16, 2026
22 checks passed
@fernandotonon
fernandotonon deleted the fix/gltf-target-names-921 branch September 16, 2026 19:35
@sonarqubecloud

Copy link
Copy Markdown

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.

FaceRig/Morph follow-up: export per-target extras.targetNames to glTF

1 participant