glTF export: Do not export empty node when camera or light export is disable
This commit is contained in:
parent
669b89d6a5
commit
060d0e76fb
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue