From 66bbaf6fccce75e879f29729443531786693efab Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 24 Nov 2022 17:13:21 +0100 Subject: [PATCH] celaction: project width and height to hook --- openpype/hosts/celaction/hooks/pre_celaction_setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/celaction/hooks/pre_celaction_setup.py b/openpype/hosts/celaction/hooks/pre_celaction_setup.py index 81f77c1654..cde3a0c723 100644 --- a/openpype/hosts/celaction/hooks/pre_celaction_setup.py +++ b/openpype/hosts/celaction/hooks/pre_celaction_setup.py @@ -19,6 +19,10 @@ class CelactionPrelaunchHook(PreLaunchHook): platforms = ["windows"] def execute(self): + project_doc = self.data["project_doc"] + width = project_doc["data"]["resolutionWidth"] + height = project_doc["data"]["resolutionHeight"] + # Add workfile path to launch arguments workfile_path = self.workfile_path() if workfile_path: @@ -70,8 +74,8 @@ class CelactionPrelaunchHook(PreLaunchHook): winreg.KEY_ALL_ACCESS ) winreg.SetValueEx(hKey, "SaveScene", 0, winreg.REG_DWORD, 1) - winreg.SetValueEx(hKey, "CustomX", 0, winreg.REG_DWORD, 1920) - winreg.SetValueEx(hKey, "CustomY", 0, winreg.REG_DWORD, 1080) + winreg.SetValueEx(hKey, "CustomX", 0, winreg.REG_DWORD, width) + winreg.SetValueEx(hKey, "CustomY", 0, winreg.REG_DWORD, height) # making sure message dialogs don't appear when overwriting path_overwrite_scene = "\\".join([