From 2e7ba45a6c46a1b733011b451ffbf56744817efd Mon Sep 17 00:00:00 2001 From: danwillm <39023874+danwillm@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:25:59 +0100 Subject: [PATCH 1/2] Make inverseBindMatrices optional --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 4a8d073..e0f99cc 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -5660,7 +5660,7 @@ static bool ParseSkin(Skin *skin, std::string *err, const detail::json &o, skin->skeleton = skeleton; int invBind = -1; - ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", true, "Skin"); + ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", false, "Skin"); skin->inverseBindMatrices = invBind; ParseExtrasAndExtensions(skin, err, o, From 4ad8c82c9e24ae53b35e2d9d924a43154de9158e Mon Sep 17 00:00:00 2001 From: danwillm <39023874+danwillm@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:32:17 +0100 Subject: [PATCH 2/2] Add test for inverse bind matrices being optional --- tests/issue-492.glb | Bin 0 -> 372 bytes tests/tester.cc | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/issue-492.glb diff --git a/tests/issue-492.glb b/tests/issue-492.glb new file mode 100644 index 0000000000000000000000000000000000000000..3a46d0c301036513bbc8693a4abd2d376dba9e13 GIT binary patch literal 372 zcmbu5!3x4K42G*uA~~1R)>|LIg9kn6Z44}1(dulWDPBh3-OM>~;BALM$oJ>xPp;j0 zw`Ppx6=N5w{pon