Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton
2017-03-29 20:20:53 +11:00
18 changed files with 120 additions and 126 deletions

View File

@@ -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":

View File

@@ -48,11 +48,11 @@ def main():
import sys
# Possibly temp. addons path
from os.path import join, dirname, normpath
sys.path.append(normpath(join(dirname(__file__),
"..", "..", "addons", "modules")))
sys.path.append(join(utils.user_resource('SCRIPTS'),
"addons", "modules"))
from os.path import join, dirname
sys.path.extend([
join(dirname(dirname(dirname(__file__))), "addons", "modules"),
join(utils.user_resource('SCRIPTS'), "addons", "modules"),
])
# fake module to allow:
# from bpy.types import Panel