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
@@ -614,7 +614,13 @@ void CharacterSlotSystem::applyShapeKeys(flecs::entity e, Ogre::Entity *ent,
as->setEnabled(true);
as->setLoop(false);
/* Build name -> pose index map from catalog */
/* Build name -> pose index map from catalog.
*
* IMPORTANT: The catalog now skips "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 in the catalog.
* This means catalog index i directly maps to OGRE pose index i.
*/
const auto &shapeKeys =
entry->value("shape_keys", nlohmann::json::array());
std::unordered_map<Ogre::String, size_t> nameToIndex;