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>2020-01-11 23:28:52 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-01-11 23:28:52 +0300
commit329f2c4a8b9fd0cc5a22f0d938757b7749e34b7e (patch)
treed36bd52836021629d060efe1619e4dfd5018e66b /io_scene_gltf2
parent8304b9bac7dcd34a85e93cbb23c25a28cbee763d (diff)
glTF exporter: fix export of light with shader node
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index ab7946b5..bbb7f12d 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, 37),
+ "version": (1, 1, 38),
'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_lights.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
index dbb59e21..05284163 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
@@ -67,7 +67,7 @@ def __gather_intensity(blender_lamp, _) -> Optional[float]:
if blender_lamp.type != 'SUN':
# When using cycles, the strength should be influenced by a LightFalloff node
result = gltf2_blender_search_node_tree.from_socket(
- emission_node.get("Strength"),
+ emission_node.inputs.get("Strength"),
gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeLightFalloff)
)
if result:
@@ -121,7 +121,8 @@ def __gather_extras(blender_lamp, export_settings) -> Optional[Any]:
def __get_cycles_emission_node(blender_lamp) -> Optional[bpy.types.ShaderNodeEmission]:
if blender_lamp.use_nodes and blender_lamp.node_tree:
for currentNode in blender_lamp.node_tree.nodes:
- if isinstance(currentNode, bpy.types.ShaderNodeOutputLamp):
+ is_shadernode_output = isinstance(currentNode, bpy.types.ShaderNodeOutputLight)
+ if is_shadernode_output:
if not currentNode.is_active_output:
continue
result = gltf2_blender_search_node_tree.from_socket(