mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-18 04:25:53 +08:00
Merge branch 'master' of github.com:syoyo/tinygltf into animation_extension_properties
This commit is contained in:
commit
af5a5ef026
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user