mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-16 12:18:52 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fea6786129 | ||
|
|
fb58f88a4e | ||
|
|
143ff45b61 | ||
|
|
cfbec35dc7 | ||
|
|
4ad8c82c9e | ||
|
|
2e7ba45a6c |
@@ -9,7 +9,7 @@ If you are looking for old, C++03 version, please use `devel-picojson` branch (b
|
||||
## Status
|
||||
|
||||
Currently TinyGLTF is stable and maintenance mode. No drastic changes and feature additions planned.
|
||||
|
||||
- v2.9.0 Various fixes and improvements. Filesystem callback API change.
|
||||
- v2.8.0 Add URICallbacks for custom URI handling in Buffer and Image. PR#397
|
||||
- v2.7.0 Change WriteImageDataFunction user callback function signature. PR#393
|
||||
- v2.6.0 Support serializing sparse accessor(Thanks to @fynv).
|
||||
|
||||
BIN
tests/issue-492.glb
Normal file
BIN
tests/issue-492.glb
Normal file
Binary file not shown.
@@ -1182,3 +1182,21 @@ TEST_CASE("images-as-is", "[issue-487]") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("inverse-bind-matrices-optional", "[issue-492]") {
|
||||
tinygltf::Model model;
|
||||
tinygltf::TinyGLTF ctx;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
bool ret = ctx.LoadBinaryFromFile(&model, &err, &warn, "issue-492.glb");
|
||||
if (!warn.empty()) {
|
||||
std::cout << "WARN:" << warn << std::endl;
|
||||
}
|
||||
if (!err.empty()) {
|
||||
std::cerr << "ERR:" << err << std::endl;
|
||||
}
|
||||
|
||||
REQUIRE(true == ret);
|
||||
REQUIRE(err.empty());
|
||||
}
|
||||
14
tiny_gltf.h
14
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,
|
||||
@@ -6108,16 +6108,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
||||
}
|
||||
}
|
||||
|
||||
model->buffers.clear();
|
||||
model->bufferViews.clear();
|
||||
model->accessors.clear();
|
||||
model->meshes.clear();
|
||||
model->cameras.clear();
|
||||
model->nodes.clear();
|
||||
model->extensionsUsed.clear();
|
||||
model->extensionsRequired.clear();
|
||||
model->extensions.clear();
|
||||
model->defaultScene = -1;
|
||||
// Reset the model
|
||||
(*model) = Model();
|
||||
|
||||
// 1. Parse Asset
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user