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

glTF export removes XMP extension #2149

Open
madjin opened this issue Mar 3, 2024 · 1 comment
Open

glTF export removes XMP extension #2149

madjin opened this issue Mar 3, 2024 · 1 comment

Comments

@madjin
Copy link

madjin commented Mar 3, 2024

Describe the bug
When I import a glTF file with metadata provided by KHR_xmp_json_ld, then export without changing anything else, the model loses the metadata information

To Reproduce
Steps to reproduce the behavior:

  1. Import 1.glb to blender (model that has XMP metadata information encoded inside)
  2. Export 1.glb from blender
  3. Test with https://madjin.github.io/glTF-Compressor/ or https://gltf-viewer.donmccurdy.com/
  4. See error (no XMP information)

Expected behavior
Metadata information does not get lost between import / export

Screenshots
image

.blend file/ .gltf (mandatory)
1.glb.zip Model with xmp information

Version

  • OS: PopOS / Ubuntu 22.04
  • Blender 4.0.2

Additional context
There's no way to even inspect metadata for imported glTF files either

@donmccurdy
Copy link
Contributor

donmccurdy commented Mar 5, 2024

Note that Blender itself has no concept of XMP metadata, and importing a GLB does not retain the entire GLB — it simply "imports" compatible parts of the model into Blender's internal representation, and that is all. The easiest workaround here would be to map XMP metadata into Blender's Custom Properties , but it's definitely not a perfect mapping. Not all XMP metadata will fit, and certainly it would be inconvenient for most users to to edit or inspect XMP metadata jammed into string fields. This also gets tricky if multiple GLBs are imported, and then exported as one GLB... what happens then?

My feeling is that solving this well would require some concept of XMP metadata to exist in Blender itself, which I think is both outside the scope of this addon and unlikely to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants