glTF exporter: dont erase empty dict extras

This commit is contained in:
Julien Duroure 2021-07-04 19:41:07 +02:00
parent 0cdaac6f9a
commit 6c1a227b3f
2 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (1, 7, 16),
"version": (1, 7, 17),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -106,6 +106,9 @@ def __fix_json(obj):
if isinstance(obj, dict):
fixed = {}
for key, value in obj.items():
if key == 'extras' and value is not None:
fixed[key] = value
continue
if not __should_include_json_value(key, value):
continue
fixed[key] = __fix_json(value)