adding a Qt lockfile dialog for lockfile tasks

This commit is contained in:
Kayla Man 2022-09-14 12:37:30 +08:00
parent 0ac3cacc35
commit d6b7e666e8

View file

@ -493,7 +493,7 @@ def check_lock_on_current_file():
# add lockfile dialog
from Qt import QtWidgets
top_level_widgets = {w.objectName(): w for w in
QtWidgets.QApplication.topLevelWidgets()}
QtWidgets.QApplication.topLevelWidgets()}
parent = top_level_widgets.get("MayaWindow", None)
workfile_dialog = WorkfileLockDialog(filepath, parent=parent)
if not workfile_dialog.exec_():
@ -502,6 +502,7 @@ def check_lock_on_current_file():
create_workfile_lock(filepath)
def on_before_close():
"""Delete the lock file after user quitting the Maya Scene"""
log.info("Closing Maya...")