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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-26 06:44:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-26 06:44:21 +0400
commite77729f5ddd5f2c64cf1aeda08a8ccce63b2ec62 (patch)
tree56f61fafa6d350c1258f4499e0caeecff877a725 /release/scripts/startup/bl_operators/console.py
parent0731932eb8ca33fe7b634c09761d4ca394f182c4 (diff)
Fix a few more cases where an operator should not show in the search menu.
Diffstat (limited to 'release/scripts/startup/bl_operators/console.py')
-rw-r--r--release/scripts/startup/bl_operators/console.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py
index 307165a4d18..2670a762cb5 100644
--- a/release/scripts/startup/bl_operators/console.py
+++ b/release/scripts/startup/bl_operators/console.py
@@ -34,6 +34,10 @@ class ConsoleExec(Operator):
bl_idname = "console.execute"
bl_label = "Console Execute"
+ @classmethod
+ def poll(cls, context):
+ return (context.area and context.area.type == 'CONSOLE')
+
def execute(self, context):
sc = context.space_data
@@ -54,6 +58,10 @@ class ConsoleAutocomplete(Operator):
bl_idname = "console.autocomplete"
bl_label = "Console Autocomplete"
+ @classmethod
+ def poll(cls, context):
+ return (context.area and context.area.type == 'CONSOLE')
+
def execute(self, context):
sc = context.space_data
module = _lang_module_get(sc)
@@ -72,6 +80,10 @@ class ConsoleCopyAsScript(Operator):
bl_idname = "console.copy_as_script"
bl_label = "Copy to Clipboard (as script)"
+ @classmethod
+ def poll(cls, context):
+ return (context.area and context.area.type == 'CONSOLE')
+
def execute(self, context):
sc = context.space_data
@@ -91,6 +103,10 @@ class ConsoleBanner(Operator):
bl_idname = "console.banner"
bl_label = "Console Banner"
+ @classmethod
+ def poll(cls, context):
+ return (context.area and context.area.type == 'CONSOLE')
+
def execute(self, context):
sc = context.space_data
@@ -119,6 +135,10 @@ class ConsoleLanguage(Operator):
maxlen=32,
)
+ @classmethod
+ def poll(cls, context):
+ return (context.area and context.area.type == 'CONSOLE')
+
def execute(self, context):
sc = context.space_data