Fix Animation dumper.

This commit is contained in:
Syoyo Fujita 2017-05-30 00:52:00 +09:00
parent 90e1ed21bc
commit d7ec19c3dc

View File

@ -384,7 +384,7 @@ static void Dump(const tinygltf::Model &model) {
std::cout << Indent(1) << "samplers(items=" << animation.samplers.size() std::cout << Indent(1) << "samplers(items=" << animation.samplers.size()
<< ")" << std::endl; << ")" << std::endl;
for (size_t j = 0; j < animation.samplers.size(); j++) { for (size_t j = 0; j < animation.samplers.size(); j++) {
const tinygltf::AnimationSampler &sampler = animation.samplers[i]; const tinygltf::AnimationSampler &sampler = animation.samplers[j];
std::cout << Indent(2) << "input : " << sampler.input std::cout << Indent(2) << "input : " << sampler.input
<< std::endl; << std::endl;
std::cout << Indent(2) std::cout << Indent(2)
@ -514,9 +514,11 @@ int main(int argc, char **argv) {
bool ret = false; bool ret = false;
if (ext.compare("glb") == 0) { if (ext.compare("glb") == 0) {
std::cout << "Reading binary glTF" << std::endl;
// assume binary glTF. // assume binary glTF.
ret = loader.LoadBinaryFromFile(&model, &err, input_filename.c_str()); ret = loader.LoadBinaryFromFile(&model, &err, input_filename.c_str());
} else { } else {
std::cout << "Reading ASCII glTF" << std::endl;
// assume ascii glTF. // assume ascii glTF.
ret = loader.LoadASCIIFromFile(&model, &err, input_filename.c_str()); ret = loader.LoadASCIIFromFile(&model, &err, input_filename.c_str());
} }