diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/console.py | 20 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/freestyle.py | 1 |
2 files changed, 21 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 diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py index 2be41882d62..90e79439f35 100644 --- a/release/scripts/startup/bl_operators/freestyle.py +++ b/release/scripts/startup/bl_operators/freestyle.py @@ -27,6 +27,7 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator): """(either a user-specified object or the active camera)""" bl_idname = "scene.freestyle_fill_range_by_selection" bl_label = "Fill Range by Selection" + bl_options = {'INTERNAL'} type = EnumProperty(name="Type", description="Type of the modifier to work on", items=(("COLOR", "Color", "Color modifier type"), |