From 734eb58819406896055c16ac9219f19c862e8cd9 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 16 Sep 2018 18:30:52 -0400 Subject: [PATCH] Fix noisy tracebacks when not in Korman mode Blender used to not specify COMPAT_ENGINES on the physics panels. It does now, and the new poll methods are incompatible with ours. This results in lots of noisy errors being raised when in Blender Render mode with the Korman addon active. --- korman/render.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/korman/render.py b/korman/render.py index 393b9eb..965a0de 100644 --- a/korman/render.py +++ b/korman/render.py @@ -65,24 +65,3 @@ del properties_render from bl_ui import properties_texture _whitelist_all(properties_texture) del properties_texture - -@classmethod -def _new_poll(cls, context): - """Nifty replacement for naughty built-in Blender poll()s""" - if context.scene.render.engine == "PLASMA_GAME": - return False - else: - # Dear god you better save the old poll... - return cls._old_poll(cls, context) - - -def _swap_poll(cls): - cls._old_poll = cls.poll - cls.poll = _new_poll - -# This is where we claim the physics context for our own nefarious purposes... -# Hmm... Physics panels don't respect the supported engine thing. -# Metaprogramming to the rescue! -from bl_ui import properties_physics_common -_swap_poll(properties_physics_common.PhysicButtonsPanel) -del properties_physics_common