Fixed shape keys
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user