From 7c55e9e749a1ea8c70ea7c1077c596e86cffc5c4 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 28 Oct 2025 15:19:45 -0700 Subject: [PATCH] GLTF: Don't serialize empty material extensions --- modules/gltf/gltf_document.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index adeebde5211..de3d50ebc08 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -4661,7 +4661,9 @@ Error GLTFDocument::_serialize_materials(Ref p_state) { extensions["KHR_materials_emissive_strength"] = mat_emissive_strength; p_state->add_used_extension("KHR_materials_emissive_strength"); } - mat_dict["extensions"] = extensions; + if (!extensions.is_empty()) { + mat_dict["extensions"] = extensions; + } _attach_meta_to_extras(material, mat_dict); materials.push_back(mat_dict);