diff --git a/avalon/tools/loader/app.py b/avalon/tools/loader/app.py index cebaa9dce..3b58a3e5a 100644 --- a/avalon/tools/loader/app.py +++ b/avalon/tools/loader/app.py @@ -414,16 +414,6 @@ def show(debug=False, parent=None, use_context=False): import traceback sys.excepthook = lambda typ, val, tb: traceback.print_last() - io.install() - - any_project = next( - project for project in io.projects() - if project.get("active", True) is not False - ) - - api.Session["AVALON_PROJECT"] = any_project["name"] - module.project = any_project["name"] - with lib.application(): # TODO: Global state, remove these diff --git a/avalon/tools/sceneinventory/app.py b/avalon/tools/sceneinventory/app.py index 5360c3cf4..0e6611856 100644 --- a/avalon/tools/sceneinventory/app.py +++ b/avalon/tools/sceneinventory/app.py @@ -928,15 +928,9 @@ def show(root=None, debug=False, parent=None): except (RuntimeError, AttributeError): pass - if debug is True: - io.install() - - any_project = next( - project for project in io.projects() - if project.get("active", True) is not False - ) - - api.Session["AVALON_PROJECT"] = any_project["name"] + if debug: + import traceback + sys.excepthook = lambda typ, val, tb: traceback.print_last() with tools_lib.application(): window = Window(parent)