Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
This commit is contained in:
parent
f73255c1be
commit
05b8b54018
Notes:
blender-bot
2023-02-14 11:08:33 +01:00
Referenced by issue #63674, Errors thrown in console when running Operator Cheat Sheet
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue