diff --git a/libs/gfx/include/psemek/gfx/gltf_parser.hpp b/libs/gfx/include/psemek/gfx/gltf_parser.hpp index 1a117e31..3c6bd2c8 100644 --- a/libs/gfx/include/psemek/gfx/gltf_parser.hpp +++ b/libs/gfx/include/psemek/gfx/gltf_parser.hpp @@ -80,6 +80,7 @@ namespace psemek::gfx { std::vector joints; std::optional inverse_bind_matrices; // accessor + std::string name; }; struct animation diff --git a/libs/gfx/source/gltf_parser.cpp b/libs/gfx/source/gltf_parser.cpp index 932368a2..6e04abf3 100644 --- a/libs/gfx/source/gltf_parser.cpp +++ b/libs/gfx/source/gltf_parser.cpp @@ -303,6 +303,9 @@ namespace psemek::gfx if (skin.HasMember("inverseBindMatrices")) target.inverse_bind_matrices = skin["inverseBindMatrices"].GetUint64(); + + if (skin.HasMember("name")) + target.name = skin["name"].GetString(); } if (document.HasMember("animations")) for (auto const & animation : document["animations"].GetArray())