From 71b19ea0b2ef09b313bf7045ea98898433a316dd Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Thu, 14 Mar 2024 14:57: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. --- node_wrangler/operators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node_wrangler/operators.py b/node_wrangler/operators.py index 3ca9fc2b5..3be14929f 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.30.2