Skip to content
Snippets Groups Projects
Commit c2525e30 authored by Damien Picard's avatar Damien Picard Committed by Philipp Oeser
Browse files

Fix: Node Wrangler: non-color bump and normal in principled setup

Commit d50d3f27 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
parent 6f58d34e
No related merge requests found
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment