Fix T71100: Node Wrangler creates nodes on linked node trees
Change the global poll function to check that the node tree is not from a library, disabling most Node Wrangler operators. This fixes the issue, not only for material nodes as in the original report, but also on compositing node trees from linked scenes and geometry nodes.
This commit is contained in:
parent
76ec1eb13a
commit
dc90910e8d
Notes:
blender-bot
2023-02-14 19:06:36 +01:00
Referenced by issue #71100, Node Wrangler creates nodes on linked materials
|
@ -822,11 +822,13 @@ def nw_check(context):
|
|||
space = context.space_data
|
||||
valid_trees = ["ShaderNodeTree", "CompositorNodeTree", "TextureNodeTree", "GeometryNodeTree"]
|
||||
|
||||
valid = False
|
||||
if space.type == 'NODE_EDITOR' and space.node_tree is not None and space.tree_type in valid_trees:
|
||||
valid = True
|
||||
if (space.type == 'NODE_EDITOR'
|
||||
and space.node_tree is not None
|
||||
and space.node_tree.library is None
|
||||
and space.tree_type in valid_trees):
|
||||
return True
|
||||
|
||||
return valid
|
||||
return False
|
||||
|
||||
class NWBase:
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue