From bfb5cfc1f76ecdb6a20504acb3685f8bb234bb4d Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Wed, 15 Nov 2023 13:35:57 +0100 Subject: [PATCH] Fix #104999: Node Wrangler: Principled Textures Setup emissive texture The Principled BSDF input was renamed from "Emission" to "Emission Color" in Blender 4.0, but Node Wrangler's Principled Textures Setup operator was not updated to account for this renaming. --- node_wrangler/__init__.py | 4 ++-- node_wrangler/operators.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node_wrangler/__init__.py b/node_wrangler/__init__.py index 303da7b29..710c09b8f 100644 --- a/node_wrangler/__init__.py +++ b/node_wrangler/__init__.py @@ -5,8 +5,8 @@ bl_info = { "name": "Node Wrangler", "author": "Bartek Skorupa, Greg Zaal, Sebastian Koenig, Christian Brinkmann, Florian Meyer", - "version": (3, 46), - "blender": (3, 6, 0), + "version": (3, 47), + "blender": (4, 0, 0), "location": "Node Editor Toolbar or Shift-W", "description": "Various tools to enhance and speed up node-based workflow", "warning": "", diff --git a/node_wrangler/operators.py b/node_wrangler/operators.py index ca05fb695..6f9eeae86 100644 --- a/node_wrangler/operators.py +++ b/node_wrangler/operators.py @@ -1771,7 +1771,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper): ['Roughness', rough_abbr + gloss_abbr, None], ['Normal', normal_abbr + bump_abbr, None], ['Transmission Weight', tags.transmission.split(' '), None], - ['Emission', tags.emission.split(' '), None], + ['Emission Color', tags.emission.split(' '), None], ['Alpha', tags.alpha.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 link = connect_sockets(active_node.inputs[sname[0]], texture_node.outputs[0]) - # Use non-color for all but 'Base Color' Textures - if not sname[0] in ['Base Color', 'Emission'] and texture_node.image: + # Use non-color except for color inputs + if sname[0] not in ['Base Color', 'Emission Color'] and texture_node.image: texture_node.image.colorspace_settings.is_data = True else: -- 2.30.2