poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.

now rna functions that dont have a 'self' are automatically assumed '@classmethods'.

de-duplicated poll functions and made some minor tweaks too.
This commit is contained in:
2010-08-09 01:37:09 +00:00
parent 7fcbbad5a4
commit a6f13f9d7b
54 changed files with 596 additions and 815 deletions

View File

@@ -138,8 +138,8 @@ class ConsoleAutocomplete(bpy.types.Operator):
bl_idname = "console.autocomplete"
bl_label = "Console Autocomplete"
@staticmethod
def poll(context):
@classmethod
def poll(cls, context):
return context.space_data.console_type != 'REPORT'
def execute(self, context):