From bed1754543db061a5e8242af5e56160281f1b625 Mon Sep 17 00:00:00 2001 From: Damien Picard 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 3ca9fc2b..3be14929 100644 --- a/node_wrangler/operators.py +++ b/node_wrangler/operators.py @@ -1839,6 +1839,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' @@ -1857,6 +1858,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' -- 2.11.4.GIT