Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user