[Bf-extensions-cvs] [78e0a5f9] master: glTF importer: fix bug adding alpha channel more than once when material is used multiple times

Julien Duroure noreply at git.blender.org
Wed Jan 8 21:55:02 CET 2020


Commit: 78e0a5f90786338d2bfd2152c5ec09a4d2a2a974
Author: Julien Duroure
Date:   Wed Jan 8 21:54:25 2020 +0100
Branches: master
https://developer.blender.org/rBA78e0a5f90786338d2bfd2152c5ec09a4d2a2a974

glTF importer: fix bug adding alpha channel more than once when material is used multiple times

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

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 782ffffd..311a2b46 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, 34),
+    "version": (1, 1, 35),
     'blender': (2, 81, 6),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py b/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
index f2b3e05a..35edd212 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
@@ -78,8 +78,7 @@ class BlenderEmissiveMap():
                 node_tree.links.new(emit.inputs[0], text.outputs[0])
 
         else:
-            emissive_color = pymaterial.emissive_factor
-            emissive_color.append(1.0) # add alpha
+            emissive_color = pymaterial.emissive_factor + [1] # add alpha
             emit.inputs[0].default_value = emissive_color



More information about the Bf-extensions-cvs mailing list