[Bf-extensions-cvs] [02e3a57] master: Node Wrangler - limit access for built-in tree types
Greg
noreply at git.blender.org
Fri Sep 30 10:29:40 CEST 2016
Commit: 02e3a578e2f0a640c511dc00f45257b4dc96c18a
Author: Greg
Date: Fri Sep 30 10:28:52 2016 +0200
Branches: master
https://developer.blender.org/rBA02e3a578e2f0a640c511dc00f45257b4dc96c18a
Node Wrangler - limit access for built-in tree types
Differential Revision: D2262
===================================================================
M node_wrangler.py
===================================================================
diff --git a/node_wrangler.py b/node_wrangler.py
index 48b153b..1f03ecd 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -1058,8 +1058,10 @@ class NWNodeWrangler(bpy.types.AddonPreferences):
def nw_check(context):
space = context.space_data
+ valid_trees = ["ShaderNodeTree", "CompositorNodeTree", "TextureNodeTree"]
+
valid = False
- if space.type == 'NODE_EDITOR' and space.node_tree is not None:
+ if space.type == 'NODE_EDITOR' and space.node_tree is not None and space.tree_type in valid_trees:
valid = True
return valid
More information about the Bf-extensions-cvs
mailing list