diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-28 09:47:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 09:47:09 +0100 |
commit | 5c76225e0d1c6b7312e749b070e0bacefdc9bf58 (patch) | |
tree | 090dd6f86cafa59e227595a63b80d60800b465e3 /modules/gltf | |
parent | 6fd9a1bb10636a9e4f24b3bbb0a77ad33b7e7b84 (diff) | |
parent | 47710046647d4b5b14ef28fd12780c18dbfc32f4 (diff) |
Merge pull request #44745 from adamscott/fix-accessor-normalized
Add missing "normalized" accessor property to glTF document
Diffstat (limited to 'modules/gltf')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 675f5002f7..55f2cd0c43 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -846,6 +846,7 @@ Error GLTFDocument::_encode_accessors(Ref<GLTFState> state) { d["count"] = accessor->count; d["type"] = _get_accessor_type_name(accessor->type); d["byteOffset"] = accessor->byte_offset; + d["normalized"] = accessor->normalized; d["max"] = accessor->max; d["min"] = accessor->min; d["bufferView"] = accessor->buffer_view; //optional because it may be sparse... @@ -961,6 +962,10 @@ Error GLTFDocument::_parse_accessors(Ref<GLTFState> state) { accessor->byte_offset = d["byteOffset"]; } + if (d.has("normalized")) { + accessor->normalized = d["normalized"]; + } + if (d.has("max")) { accessor->max = d["max"]; } |