fix(celaction): missing environment var for opening workfile

This commit is contained in:
Jakub Jezek 2020-06-03 11:50:32 +01:00
parent c51b071a64
commit d809d6e4b6

View file

@ -65,7 +65,7 @@ class CelactionPrelaunchHook(PypeHook):
workfile_path = os.path.join(workdir, workfile) workfile_path = os.path.join(workdir, workfile)
# create workfile from template if doesnt exist any on path # copy workfile from template if doesnt exist any on path
if not os.path.isfile(workfile_path): if not os.path.isfile(workfile_path):
# try to get path from environment or use default # try to get path from environment or use default
# from `pype.celation` dir # from `pype.celation` dir
@ -81,6 +81,9 @@ class CelactionPrelaunchHook(PypeHook):
self.log.info(f"Workfile to open: `{workfile_path}`") self.log.info(f"Workfile to open: `{workfile_path}`")
# adding compulsory environment var for openting file
env["PYPE_CELACTION_PROJECT_FILE"] = workfile_path
# setting output parameters # setting output parameters
path = r"Software\CelAction\CelAction2D\User Settings" path = r"Software\CelAction\CelAction2D\User Settings"
winreg.CreateKey(winreg.HKEY_CURRENT_USER, path) winreg.CreateKey(winreg.HKEY_CURRENT_USER, path)