[Bf-extensions-cvs] [48b38ec3] master: glTF importer: fix alpha for unlit material

Julien Duroure noreply at git.blender.org
Wed Jun 19 22:59:06 CEST 2019


Commit: 48b38ec3065627117318c26a1949135360213d12
Author: Julien Duroure
Date:   Wed Jun 19 22:58:03 2019 +0200
Branches: master
https://developer.blender.org/rBA48b38ec3065627117318c26a1949135360213d12

glTF importer: fix alpha for unlit material

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

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

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index b3662b15..6e41c1a8 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": (0, 9, 28),
+    "version": (0, 9, 29),
     'blender': (2, 80, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_material.py b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
index cdfc34c1..55be1626 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_material.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
@@ -98,8 +98,8 @@ class BlenderMaterial():
             if pymaterial.occlusion_texture is not None:
                 BlenderOcclusionMap.create(gltf, material_idx, vertex_color)
 
-            if pymaterial.alpha_mode is not None and pymaterial.alpha_mode != 'OPAQUE':
-                BlenderMaterial.blender_alpha(gltf, material_idx, vertex_color, pymaterial.alpha_mode)
+        if pymaterial.alpha_mode is not None and pymaterial.alpha_mode != 'OPAQUE':
+            BlenderMaterial.blender_alpha(gltf, material_idx, vertex_color, pymaterial.alpha_mode)
 
     @staticmethod
     def set_uvmap(gltf, material_idx, prim, obj, vertex_color):



More information about the Bf-extensions-cvs mailing list