diff options
author | nBurn <nBurn> | 2019-04-17 14:36:20 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-04-17 14:38:31 +0300 |
commit | 05b8b540184555287a7579c9734158bf29e0fccb (patch) | |
tree | 4bfaac8e6d5104305b941b833dfca1abba45a17e /release | |
parent | f73255c1be4f079939512e5ded6e31d98c041776 (diff) |
Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/nodeitems_builtins.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index 60772062dcf..9f0a7f0e7b7 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -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 |