Skip to content

Commit

Permalink
Merge pull request #470 from jasperges/fix-460-debugbehavior
Browse files Browse the repository at this point in the history
Use the active project in debug mode (fix #460)
  • Loading branch information
davidlatwe authored Nov 4, 2019
2 parents 1605264 + 9ec724a commit c31db40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
10 changes: 0 additions & 10 deletions avalon/tools/loader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions avalon/tools/sceneinventory/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c31db40

Please sign in to comment.