forked from bartvdbraak/blender
Fix 'bl_app_override' wrapping multiple times.
Calling `SomeClass.draw(self, context)` instead of `self.draw()` would try to wrap the argument `self` multiple times, causing an error.
This commit is contained in:
parent
d808557d15
commit
4f69dca547
@ -147,10 +147,12 @@ def ui_draw_filter_register(
|
||||
return super().operator(*args, **kw)
|
||||
|
||||
def draw_override(func_orig, self_real, context):
|
||||
# simple, no wrapping
|
||||
# return func_orig(self_wrap, context)
|
||||
cls_real = self_real.__class__
|
||||
if cls_real is super:
|
||||
# simple, no wrapping
|
||||
return func_orig(self_real, context)
|
||||
|
||||
class Wrapper(self_real.__class__):
|
||||
class Wrapper(cls_real):
|
||||
__slots__ = ()
|
||||
def __getattribute__(self, attr):
|
||||
if attr == "layout":
|
||||
|
Loading…
Reference in New Issue
Block a user