Fix #104999: Node Wrangler: Principled Textures Setup emissive texture #105002

Merged
Damien Picard merged 1 commits from pioverfour/blender-addons:dp_fix_104999 into main 2023-11-16 14:31:26 +01:00
2 changed files with 5 additions and 5 deletions

View File

@ -5,8 +5,8 @@
bl_info = { bl_info = {
"name": "Node Wrangler", "name": "Node Wrangler",
"author": "Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer", "author": "Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer",
"version": (3, 46), "version": (3, 47),
"blender": (3, 6, 0), "blender": (4, 0, 0),
"location": "Node Editor Toolbar or Shift-W", "location": "Node Editor Toolbar or Shift-W",
"description": "Various tools to enhance and speed up node-based workflow", "description": "Various tools to enhance and speed up node-based workflow",
"warning": "", "warning": "",

View File

@ -1771,7 +1771,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
['Roughness', rough_abbr + gloss_abbr, None], ['Roughness', rough_abbr + gloss_abbr, None],
['Normal', normal_abbr + bump_abbr, None], ['Normal', normal_abbr + bump_abbr, None],
['Transmission Weight', tags.transmission.split(' '), None], ['Transmission Weight', tags.transmission.split(' '), None],
['Emission', tags.emission.split(' '), None], ['Emission Color', tags.emission.split(' '), None],
['Alpha', tags.alpha.split(' '), None], ['Alpha', tags.alpha.split(' '), None],
['Ambient Occlusion', tags.ambient_occlusion.split(' '), None], ['Ambient Occlusion', tags.ambient_occlusion.split(' '), None],
] ]
@ -1887,8 +1887,8 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
# This is a simple connection Texture --> Input slot # This is a simple connection Texture --> Input slot
link = connect_sockets(active_node.inputs[sname[0]], texture_node.outputs[0]) link = connect_sockets(active_node.inputs[sname[0]], texture_node.outputs[0])
# Use non-color for all but 'Base Color' Textures # Use non-color except for color inputs
if not sname[0] in ['Base Color', 'Emission'] and texture_node.image: if sname[0] not in ['Base Color', 'Emission Color'] and texture_node.image:
texture_node.image.colorspace_settings.is_data = True texture_node.image.colorspace_settings.is_data = True
else: else: