[Bf-blender-cvs] [0696eaa3e84] master: Fix T80684: Node shader wrapper: Tweak handling of alpha textures.

Bastien Montagne noreply at git.blender.org
Wed Sep 16 16:39:58 CEST 2020


Commit: 0696eaa3e84e9394518e9bc86217291aa58dcf13
Author: Bastien Montagne
Date:   Wed Sep 16 16:36:33 2020 +0200
Branches: master
https://developer.blender.org/rB0696eaa3e84e9394518e9bc86217291aa58dcf13

Fix T80684: Node shader wrapper: Tweak handling of alpha textures.

There is no ideal solution here, but we can assume by default that we should
use the Alpha output from a texture used for transparency data.

This will break people using a dedicated B&W texture for this alpha
pass, but we cannot really handle all cases properly in this wrapper, we
only try to support the most common ones to some extent.

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

M	release/scripts/modules/bpy_extras/node_shader_utils.py

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

diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py
index ce5edde5adf..81c7fa31379 100644
--- a/release/scripts/modules/bpy_extras/node_shader_utils.py
+++ b/release/scripts/modules/bpy_extras/node_shader_utils.py
@@ -486,6 +486,7 @@ class PrincipledBSDFWrapper(ShaderWrapper):
         return ShaderImageTextureWrapper(
             self, self.node_principled_bsdf,
             self.node_principled_bsdf.inputs["Alpha"],
+            use_alpha=True,
             grid_row_diff=-1,
             colorspace_name='Non-Color',
         )



More information about the Bf-blender-cvs mailing list