Merge branch 'master' of github.com:syoyo/tinygltf into animation_extension_properties

This commit is contained in:
Selmar Kok 2019-08-16 17:54:14 +02:00
commit af5a5ef026

View File

@ -3685,6 +3685,8 @@ static bool ParseNode(Node *node, std::string *err, const json &o) {
node->children.clear(); node->children.clear();
ParseIntegerArrayProperty(&node->children, err, o, "children", false); ParseIntegerArrayProperty(&node->children, err, o, "children", false);
ParseNumberArrayProperty(&node->weights, err, o, "weights", false);
ParseExtensionsProperty(&node->extensions, err, o); ParseExtensionsProperty(&node->extensions, err, o);
ParseExtrasProperty(&(node->extras), o); ParseExtrasProperty(&(node->extras), o);
@ -5599,6 +5601,10 @@ static void SerializeGltfNode(Node &node, json &o) {
SerializeNumberProperty<int>("camera", node.camera, o); SerializeNumberProperty<int>("camera", node.camera, o);
} }
if (node.weights.size() > 0) {
SerializeNumberArrayProperty<double>("weights", node.weights, o);
}
if (node.extras.Type() != NULL_TYPE) { if (node.extras.Type() != NULL_TYPE) {
SerializeValue("extras", node.extras, o); SerializeValue("extras", node.extras, o);
} }