Fixed shape keys

This commit is contained in:
2026-05-22 22:03:31 +03:00
parent 3a3edf785c
commit c7ef9283cd
3 changed files with 27 additions and 7 deletions
+5 -1
View File
@@ -376,10 +376,14 @@ for mapping in[CommandLineMapping()]:
save_data["tags"] = unique_tags
# Export shape keys if present
# IMPORTANT: Skip "Basis" to match OGRE's pose indexing.
# OGRE's blender2ogre exporter skips the Basis shape key (index 0),
# so pose index 0 in OGRE = first non-Basis shape key.
shape_keys = []
if obj.data.shape_keys and obj.data.shape_keys.key_blocks:
for sk in obj.data.shape_keys.key_blocks:
shape_keys.append(sk.name)
if sk.name != 'Basis':
shape_keys.append(sk.name)
save_data["shape_keys"] = shape_keys
save_data["mesh"] = obj.data.name + ".mesh"