Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/nodeitems_builtins.py9
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