glTF: Fix: bad check type in a previous commit

This commit is contained in:
Julien Duroure
2025-02-27 11:49:44 +01:00
parent 255dec2c51
commit a8e476531b
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,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": (4, 4, 50),
"version": (4, 4, 51),
'blender': (4, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -25,14 +25,14 @@ def gather_gltf2(export_settings):
animations = [] # unfortunately animations in gltf2 are just as 'root' as scenes.
active_scene = None
store_user_scene = bpy.context.scene
if export_settings['gltf_collection'] is None and export_settings['gltf_active_scene'] is False:
if export_settings['gltf_collection'] == "" and export_settings['gltf_active_scene'] is False:
# If no collection export and no active scene export, we need to export all scenes
scenes_to_export = bpy.data.scenes
elif export_settings['gltf_collection'] is None and export_settings['gltf_active_scene'] is True:
elif export_settings['gltf_collection'] == "" and export_settings['gltf_active_scene'] is True:
# If no collection export and active scene export, we need to export only the active scene
scenes_to_export = [
scene for scene in bpy.data.scenes if scene.name == store_user_scene.name]
elif export_settings['gltf_collection'] is not None:
elif export_settings['gltf_collection'] != "":
# If collection export, we need to export only the collection, so keeping only the active scene
scenes_to_export = [
scene for scene in bpy.data.scenes if scene.name == store_user_scene.name]