[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33071] trunk/blender/release/scripts/ modules/bpy_types.py: revert change from r32955.

Campbell Barton ideasman42 at gmail.com
Mon Nov 15 04:13:30 CET 2010


Revision: 33071
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33071
Author:   campbellbarton
Date:     2010-11-15 04:13:28 +0100 (Mon, 15 Nov 2010)

Log Message:
-----------
revert change from r32955.
This added a poll function to the Panel base class but this means that all panels register as having a poll() function which is called a lot and does nothing, raising an exception and removing it because of how python implements hasattr().

Found when checking why exceptions were continuously raised on redraw.

Martin, can you check on netrender?

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy_types.py

Modified: trunk/blender/release/scripts/modules/bpy_types.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_types.py	2010-11-15 00:07:38 UTC (rev 33070)
+++ trunk/blender/release/scripts/modules/bpy_types.py	2010-11-15 03:13:28 UTC (rev 33071)
@@ -723,13 +723,7 @@
 class Panel(StructRNA, _GenericUI, metaclass=RNAMeta):
     __slots__ = ()
 
-    @classmethod
-    def poll(cls, context):
-        # super class might not have a poll function, better be careful
-        cls = super()
-        return not hasattr(cls, "poll") or cls.poll(context)
 
-
 class Header(StructRNA, _GenericUI, metaclass=RNAMeta):
     __slots__ = ()
 





More information about the Bf-blender-cvs mailing list