From c2525e3054db5dc2dacb04735a9b19373f9d306e Mon Sep 17 00:00:00 2001 From: Damien Picard <dam.pic@free.fr> Date: Thu, 14 Mar 2024 15:25:00 +0100 Subject: [PATCH] Fix: Node Wrangler: non-color bump and normal in principled setup Commit d50d3f2734 allowed the use of both bump and normal maps when using Node Wrangler's Principled Setup. However it made those textures use the default color space instead of Non-Color, which should be used for data maps. The bug was introduced because bump and normal maps were handled as part of regular textures, for which the Non-Color space is assigned based on name. The change led to them being extracted to their own block, but the color space assignment was omitted. Pull Request: https://projects.blender.org/blender/blender-addons/pulls/105236 --- node_wrangler/operators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node_wrangler/operators.py b/node_wrangler/operators.py index db34e871c..eaae71bc2 100644 --- a/node_wrangler/operators.py +++ b/node_wrangler/operators.py @@ -2033,6 +2033,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper): # If Bump add bump node in between bump_node_texture = nodes.new(type='ShaderNodeTexImage') img = bpy.data.images.load(path.join(import_path, sname[2])) + img.colorspace_settings.is_data = True bump_node_texture.image = img bump_node_texture.label = 'Bump' @@ -2051,6 +2052,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper): # If Normal add normal node in between normal_node_texture = nodes.new(type='ShaderNodeTexImage') img = bpy.data.images.load(path.join(import_path, sname[2])) + img.colorspace_settings.is_data = True normal_node_texture.image = img normal_node_texture.label = 'Normal' -- GitLab