Blender glTF exporter - Export UVmap as target

Dear community,

I’m trying to find a way to export a glTF from Blender with a UVmap as TEXCOORD_n target in the target array.

The specs declare it is MAY. I guess that’s why there is nothing implemented in the exporter yet:
Client implementations SHOULD support at least three attributes — POSITION , NORMAL , and TANGENT — for morphing. Client implementations MAY optionally support morphed TEXCOORD_n and/or COLOR_n attributes.

Usecase:

  1. mesh with position target (shape key)
  2. define other UV than UV0 as target
  3. Export glTF with deltas (of UVn to UV0) as target TEXCOORD_n

It seems the def __gather_targets(blender_primitive, blender_mesh, modifiers, export_settings): function in gltf2_blender_gather_primitives.py is where the targets are defined.

I guess I would need to create another entry for “TEXCOORD” to being able to properly use the exporters functions?

Every help or pointing into the right direction is very much appreciated. It is much more complex than I anticipated.

Thanks!

I took this discussion to github https://github.com/KhronosGroup/glTF-Blender-IO/issues/1661

Best,

David