[Bf-blender-cvs] [05b8b540184] master: Fix T63674: Incorrect poll methods in node category classes
nBurn
noreply at git.blender.org
Wed Apr 17 13:39:55 CEST 2019
Commit: 05b8b540184555287a7579c9734158bf29e0fccb
Author: nBurn
Date: Wed Apr 17 13:36:20 2019 +0200
Branches: master
https://developer.blender.org/rB05b8b540184555287a7579c9734158bf29e0fccb
Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
===================================================================
M release/scripts/startup/nodeitems_builtins.py
===================================================================
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
More information about the Bf-blender-cvs
mailing list