Skip to content

Commit c31db40

Browse files
authored
Merge pull request #470 from jasperges/fix-460-debugbehavior
Use the active project in debug mode (fix #460)
2 parents 1605264 + 9ec724a commit c31db40

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

avalon/tools/loader/app.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414,16 +414,6 @@ def show(debug=False, parent=None, use_context=False):
414414
import traceback
415415
sys.excepthook = lambda typ, val, tb: traceback.print_last()
416416

417-
io.install()
418-
419-
any_project = next(
420-
project for project in io.projects()
421-
if project.get("active", True) is not False
422-
)
423-
424-
api.Session["AVALON_PROJECT"] = any_project["name"]
425-
module.project = any_project["name"]
426-
427417
with lib.application():
428418

429419
# TODO: Global state, remove these

avalon/tools/sceneinventory/app.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -928,15 +928,9 @@ def show(root=None, debug=False, parent=None):
928928
except (RuntimeError, AttributeError):
929929
pass
930930

931-
if debug is True:
932-
io.install()
933-
934-
any_project = next(
935-
project for project in io.projects()
936-
if project.get("active", True) is not False
937-
)
938-
939-
api.Session["AVALON_PROJECT"] = any_project["name"]
931+
if debug:
932+
import traceback
933+
sys.excepthook = lambda typ, val, tb: traceback.print_last()
940934

941935
with tools_lib.application():
942936
window = Window(parent)

0 commit comments

Comments
 (0)