From a6f13f9d7bfef7020d43cb0a8058753e6d7a128d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 Aug 2010 01:37:09 +0000 Subject: 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. --- release/scripts/op/uvcalc_smart_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/op/uvcalc_smart_project.py') diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py index b52a2c41c26..fbda1955013 100644 --- a/release/scripts/op/uvcalc_smart_project.py +++ b/release/scripts/op/uvcalc_smart_project.py @@ -1124,8 +1124,8 @@ class SmartProject(bpy.types.Operator): description="Margin to reduce bleed from adjacent islands.", default=0.0, min=0.0, max=1.0) - @staticmethod - def poll(context): + @classmethod + def poll(cls, context): return context.active_object != None def execute(self, context): -- cgit v1.2.3