emit also workdir for 'before.workfile.save'

This commit is contained in:
iLLiCiTiT 2022-01-07 18:26:12 +01:00
parent 82432e4764
commit 7075183a47
2 changed files with 4 additions and 7 deletions

View file

@ -218,12 +218,9 @@ def on_task_changed(*args):
)
def before_workfile_save(workfile_path):
if not workfile_path:
return
workdir = os.path.dirname(workfile_path)
copy_workspace_mel(workdir)
def before_workfile_save(workfile_path, workdir_path):
if workdir_path:
copy_workspace_mel(workdir_path)
class MayaDirmap(HostDirmap):

View file

@ -670,7 +670,7 @@ class FilesWidget(QtWidgets.QWidget):
os.path.normpath(self._workfiles_root), work_file
)
pipeline.emit("before.workfile.save", [file_path])
pipeline.emit("before.workfile.save", [file_path, self._workdir_path])
self._enter_session() # Make sure we are in the right session
self.host.save_file(file_path)