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:
authorCampbell Barton <ideasman42@gmail.com>2010-08-05 20:05:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-05 20:05:30 +0400
commit163f6055d26383b7fa11df00da09ef63efb8cb6c (patch)
treed552a9ad0ce4c64a95088264021914008bf8fdf9 /release/scripts/ui/space_console.py
parent5d18274cacef89fe4e290dbae8427122028ba868 (diff)
bugfix [#23182] Using self.report() inside poll() gives crash
poll() function is now a static method in python, this is more correct, matching C where the operator is not created to run poll. def poll(self, context): ... is now... @staticmethod def poll(context): ... Pythons way of doing static methods is a bit odd but cant be helped :| This does make subclassing poll functions with COMPAT_ENGINES break, so had to modify quite a few scripts for this.
Diffstat (limited to 'release/scripts/ui/space_console.py')
-rw-r--r--release/scripts/ui/space_console.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/ui/space_console.py b/release/scripts/ui/space_console.py
index f2c757adaf5..dbe08c16a77 100644
--- a/release/scripts/ui/space_console.py
+++ b/release/scripts/ui/space_console.py
@@ -138,7 +138,8 @@ class ConsoleAutocomplete(bpy.types.Operator):
bl_idname = "console.autocomplete"
bl_label = "Console Autocomplete"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.space_data.console_type != 'REPORT'
def execute(self, context):