From 1f6be563eb6b28ef0988d55e6a143fe0e98d6aa1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Sat, 26 Nov 2022 21:36:03 +0100 Subject: [PATCH] celaction: improving code PR feedback --- .../celaction/hooks/pre_celaction_setup.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/celaction/hooks/pre_celaction_setup.py b/openpype/hosts/celaction/hooks/pre_celaction_setup.py index a8fc7f322e..62cebf99ed 100644 --- a/openpype/hosts/celaction/hooks/pre_celaction_setup.py +++ b/openpype/hosts/celaction/hooks/pre_celaction_setup.py @@ -1,6 +1,7 @@ import os import shutil import winreg +import subprocess from openpype.lib import PreLaunchHook, get_openpype_execute_args from openpype.hosts.celaction import scripts @@ -13,7 +14,6 @@ class CelactionPrelaunchHook(PreLaunchHook): """ Bootstrap celacion with pype """ - workfile_ext = "scn" app_groups = ["celaction"] platforms = ["windows"] @@ -39,28 +39,28 @@ class CelactionPrelaunchHook(PreLaunchHook): path_to_cli = os.path.join(CELACTION_SCRIPTS_DIR, "publish_cli.py") subproces_args = get_openpype_execute_args("run", path_to_cli) - openpype_executables = subproces_args.pop(0) + openpype_executable = subproces_args.pop(0) winreg.SetValueEx( hKey, "SubmitAppTitle", 0, winreg.REG_SZ, - openpype_executables + openpype_executable ) parameters = subproces_args + [ - "--currentFile *SCENE*", - "--chunk *CHUNK*", - "--frameStart *START*", - "--frameEnd *END*", - "--resolutionWidth *X*", - "--resolutionHeight *Y*" + "--currentFile", "*SCENE*", + "--chunk", "*CHUNK*", + "--frameStart", "*START*", + "--frameEnd", "*END*", + "--resolutionWidth", "*X*", + "--resolutionHeight", "*Y*" ] winreg.SetValueEx( hKey, "SubmitParametersTitle", 0, winreg.REG_SZ, - " ".join(parameters) + subprocess.list2cmdline(parameters) ) # setting resolution parameters