Node Wrangler - limit access for built-in tree types

Differential Revision: D2262
This commit is contained in:
Greg Zaal 2016-09-30 10:28:52 +02:00 committed by Sergey Sharybin
parent 982c0fc80f
commit bd71fe58ae
1 changed files with 3 additions and 1 deletions

View File

@ -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