Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-11-23 10:32:18 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-11-23 10:32:18 +0300
commitc172be1c93a6f583e29b5f0b2473c59673670b5d (patch)
treef7c253f38fa959e80092e54d429617b6716ebae2 /io_scene_gltf2
parentda9a0d0c51d87e96aa04cbaf84e790a606f76d5f (diff)
glTF exporter: fix crash trying to export area lights (not supported)
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 0d8a517d..1de1ed62 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, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (1, 1, 11),
+ "version": (1, 1, 12),
'blender': (2, 81, 6),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
index 43a6e5d1..cccfbd9d 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
@@ -74,7 +74,8 @@ def __gather_node(blender_object, blender_scene, export_settings):
node.translation, node.rotation, node.scale = __gather_trans_rot_scale(blender_object, export_settings)
if export_settings[gltf2_blender_export_keys.YUP]:
- if blender_object.type == 'LIGHT' and export_settings[gltf2_blender_export_keys.LIGHTS]:
+ # Checking node.extensions is making sure that the type of lamp is managed, and will be exported
+ if blender_object.type == 'LIGHT' and export_settings[gltf2_blender_export_keys.LIGHTS] and node.extensions:
correction_node = __get_correction_node(blender_object, export_settings)
correction_node.extensions = {"KHR_lights_punctual": node.extensions["KHR_lights_punctual"]}
del node.extensions["KHR_lights_punctual"]