[Bf-extensions-cvs] [c5a84e2e] master: gltf exporter: Fix T83188: avoid crash when background exporting (without UI)

Julien Duroure noreply at git.blender.org
Sun Dec 6 07:50:19 CET 2020


Commit: c5a84e2e1ad002f55ace47eeefe4f7deedeb75b5
Author: Julien Duroure
Date:   Sun Dec 6 07:49:04 2020 +0100
Branches: master
https://developer.blender.org/rBAc5a84e2e1ad002f55ace47eeefe4f7deedeb75b5

gltf exporter: Fix T83188: avoid crash when background exporting (without UI)

===================================================================

M	io_scene_gltf2/__init__.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index eec978a3..50dab718 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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, 5, 6),
+    "version": (1, 5, 7),
     'blender': (2, 91, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
@@ -73,6 +73,8 @@ extension_panel_unregister_functors = []
 def on_export_format_changed(self, context):
     # Update the file extension when the format (.glb/.gltf) changes
     sfile = context.space_data
+    if sfile is None:
+        return # Avoid error when export from background
     operator = sfile.active_operator
     if operator.bl_idname != "EXPORT_SCENE_OT_gltf":
         return



More information about the Bf-extensions-cvs mailing list