Fix T63674: Incorrect poll methods in node category classes

Differential Revision: https://developer.blender.org/D4697
This commit is contained in:
nBurn
2019-04-17 13:36:20 +02:00
committed by Jacques Lucke
parent f73255c1be
commit 05b8b54018

View File

@@ -40,19 +40,22 @@ class SortedNodeCategory(NodeCategory):
class CompositorNodeCategory(SortedNodeCategory):
@classmethod
def poll(cls, context):
return (context.space_data.tree_type == 'CompositorNodeTree')
return (context.space_data.type == 'NODE_EDITOR' and
context.space_data.tree_type == 'CompositorNodeTree')
class ShaderNodeCategory(SortedNodeCategory):
@classmethod
def poll(cls, context):
return (context.space_data.tree_type == 'ShaderNodeTree')
return (context.space_data.type == 'NODE_EDITOR' and
context.space_data.tree_type == 'ShaderNodeTree')
class TextureNodeCategory(SortedNodeCategory):
@classmethod
def poll(cls, context):
return context.space_data.tree_type == 'TextureNodeTree'
return (context.space_data.type == 'NODE_EDITOR' and
context.space_data.tree_type == 'TextureNodeTree')
# menu entry for node group tools