[Bf-extensions-cvs] [bd71fe5] blender-v2.78-release: Node Wrangler - limit access for built-in tree types

Greg noreply at git.blender.org
Wed Oct 19 14:43:07 CEST 2016


Commit: bd71fe58ae74ed6a6a67db737d4fe6363544ff01
Author: Greg
Date:   Fri Sep 30 10:28:52 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rBAbd71fe58ae74ed6a6a67db737d4fe6363544ff01

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