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-11-15 06:13:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-15 06:13:28 +0300
commit1a12d6d1d85f116893ba32ec1a2155795a206a28 (patch)
treef4fce77994186bf582c137392871a37b2dd2f0b5 /release/scripts/modules/bpy_types.py
parent7be25eba132aecc74cb1ccaecbac150ee0bb87a6 (diff)
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?
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index a9bcf3ab6c6..6c1c86c3eae 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -723,12 +723,6 @@ class _GenericUI:
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__ = ()