From 47710046647d4b5b14ef28fd12780c18dbfc32f4 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 28 Dec 2020 01:29:35 -0500 Subject: [PATCH] Add missing "normalized" accessor property to glTF document --- modules/gltf/gltf_document.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 675f5002f75d..55f2cd0c4392 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -846,6 +846,7 @@ Error GLTFDocument::_encode_accessors(Ref 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 state) { accessor->byte_offset = d["byteOffset"]; } + if (d.has("normalized")) { + accessor->normalized = d["normalized"]; + } + if (d.has("max")) { accessor->max = d["max"]; }