Load gltf skin names
This commit is contained in:
parent
b9a6fbf99f
commit
6d13bfa407
2 changed files with 4 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ namespace psemek::gfx
|
||||||
{
|
{
|
||||||
std::vector<std::size_t> joints;
|
std::vector<std::size_t> joints;
|
||||||
std::optional<std::size_t> inverse_bind_matrices; // accessor
|
std::optional<std::size_t> inverse_bind_matrices; // accessor
|
||||||
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct animation
|
struct animation
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,9 @@ namespace psemek::gfx
|
||||||
|
|
||||||
if (skin.HasMember("inverseBindMatrices"))
|
if (skin.HasMember("inverseBindMatrices"))
|
||||||
target.inverse_bind_matrices = skin["inverseBindMatrices"].GetUint64();
|
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())
|
if (document.HasMember("animations")) for (auto const & animation : document["animations"].GetArray())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue