Skip to content

Commit

Permalink
https://github.com/KhronosGroup/glTF/issues/110
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrobinet committed Oct 2, 2013
1 parent b7a4300 commit 6c39102
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions converter/COLLADA2GLTF/GLTF/GLTFWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,15 @@ namespace GLTF
effectObject->setString("name", effect->getName());
effectObject->setValue("instanceTechnique", instanceTechnique);
instanceTechnique->setString("technique", techniqueID);
shared_ptr<JSONArray> outputs(new JSONArray());
shared_ptr<JSONObject> outputs(new JSONObject());
shared_ptr <JSONObject> values = effect->getValues();
std::vector <std::string> keys = values->getAllKeys();
for (size_t i = 0 ; i < keys.size() ; i++) {
shared_ptr <JSONObject> parameter = static_pointer_cast <JSONObject> (values->getValue(keys[i]));
shared_ptr <JSONObject> parameterValue = static_pointer_cast <JSONObject> (parameter->getValue("value"));
shared_ptr<JSONObject> output(new JSONObject());
if (parameterValue) {
output->setValue("value", parameterValue);
output->setString("parameter", keys[i]);
outputs->appendValue(output);
outputs->setValue(keys[i], parameterValue);
}
}
instanceTechnique->setValue("values", outputs);
Expand Down

0 comments on commit 6c39102

Please sign in to comment.