glTF export: Do not export empty node when camera or light export is disable

This commit is contained in:
Julien Duroure 2021-08-23 19:06:55 +02:00
parent 669b89d6a5
commit 060d0e76fb
2 changed files with 7 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, 18),
"version": (1, 7, 19),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -140,6 +140,12 @@ def __filter_node(blender_object, blender_scene, export_settings):
if not found:
return False
if blender_object.type == 'LIGHT':
return export_settings[gltf2_blender_export_keys.LIGHTS]
if blender_object.type == 'CAMERA':
return export_settings[gltf2_blender_export_keys.CAMERAS]
return True