mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #4677 from ynput/feature/OP-4997_CelAction-Deadline-chunk-size
This commit is contained in:
commit
47f4e9ec2c
5 changed files with 61 additions and 11 deletions
|
|
@ -38,8 +38,9 @@ class CelactionPrelaunchHook(PreLaunchHook):
|
||||||
)
|
)
|
||||||
|
|
||||||
path_to_cli = os.path.join(CELACTION_SCRIPTS_DIR, "publish_cli.py")
|
path_to_cli = os.path.join(CELACTION_SCRIPTS_DIR, "publish_cli.py")
|
||||||
subproces_args = get_openpype_execute_args("run", path_to_cli)
|
subprocess_args = get_openpype_execute_args("run", path_to_cli)
|
||||||
openpype_executable = subproces_args.pop(0)
|
openpype_executable = subprocess_args.pop(0)
|
||||||
|
workfile_settings = self.get_workfile_settings()
|
||||||
|
|
||||||
winreg.SetValueEx(
|
winreg.SetValueEx(
|
||||||
hKey,
|
hKey,
|
||||||
|
|
@ -49,20 +50,34 @@ class CelactionPrelaunchHook(PreLaunchHook):
|
||||||
openpype_executable
|
openpype_executable
|
||||||
)
|
)
|
||||||
|
|
||||||
parameters = subproces_args + [
|
# add required arguments for workfile path
|
||||||
"--currentFile", "*SCENE*",
|
parameters = subprocess_args + [
|
||||||
"--chunk", "*CHUNK*",
|
"--currentFile", "*SCENE*"
|
||||||
"--frameStart", "*START*",
|
|
||||||
"--frameEnd", "*END*",
|
|
||||||
"--resolutionWidth", "*X*",
|
|
||||||
"--resolutionHeight", "*Y*"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Add custom parameters from workfile settings
|
||||||
|
if "render_chunk" in workfile_settings["submission_overrides"]:
|
||||||
|
parameters += [
|
||||||
|
"--chunk", "*CHUNK*"
|
||||||
|
]
|
||||||
|
if "resolution" in workfile_settings["submission_overrides"]:
|
||||||
|
parameters += [
|
||||||
|
"--resolutionWidth", "*X*",
|
||||||
|
"--resolutionHeight", "*Y*"
|
||||||
|
]
|
||||||
|
if "frame_range" in workfile_settings["submission_overrides"]:
|
||||||
|
parameters += [
|
||||||
|
"--frameStart", "*START*",
|
||||||
|
"--frameEnd", "*END*"
|
||||||
|
]
|
||||||
|
|
||||||
winreg.SetValueEx(
|
winreg.SetValueEx(
|
||||||
hKey, "SubmitParametersTitle", 0, winreg.REG_SZ,
|
hKey, "SubmitParametersTitle", 0, winreg.REG_SZ,
|
||||||
subprocess.list2cmdline(parameters)
|
subprocess.list2cmdline(parameters)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.log.debug(f"__ parameters: \"{parameters}\"")
|
||||||
|
|
||||||
# setting resolution parameters
|
# setting resolution parameters
|
||||||
path_submit = "\\".join([
|
path_submit = "\\".join([
|
||||||
path_user_settings, "Dialogs", "SubmitOutput"
|
path_user_settings, "Dialogs", "SubmitOutput"
|
||||||
|
|
@ -135,3 +150,6 @@ class CelactionPrelaunchHook(PreLaunchHook):
|
||||||
self.log.info(f"Workfile to open: \"{workfile_path}\"")
|
self.log.info(f"Workfile to open: \"{workfile_path}\"")
|
||||||
|
|
||||||
return workfile_path
|
return workfile_path
|
||||||
|
|
||||||
|
def get_workfile_settings(self):
|
||||||
|
return self.data["project_settings"]["celaction"]["workfile"]
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class CollectCelactionCliKwargs(pyblish.api.Collector):
|
||||||
passing_kwargs[key] = value
|
passing_kwargs[key] = value
|
||||||
|
|
||||||
if missing_kwargs:
|
if missing_kwargs:
|
||||||
raise RuntimeError("Missing arguments {}".format(
|
self.log.debug("Missing arguments {}".format(
|
||||||
", ".join(
|
", ".join(
|
||||||
[f'"{key}"' for key in missing_kwargs]
|
[f'"{key}"' for key in missing_kwargs]
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ class CelactionSubmitDeadline(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
# define chunk and priority
|
# define chunk and priority
|
||||||
chunk_size = instance.context.data.get("chunk")
|
chunk_size = instance.context.data.get("chunk")
|
||||||
if chunk_size == 0:
|
if not chunk_size:
|
||||||
chunk_size = self.deadline_chunk_size
|
chunk_size = self.deadline_chunk_size
|
||||||
|
|
||||||
# search for %02d pattern in name, and padding number
|
# search for %02d pattern in name, and padding number
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,13 @@
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"workfile": {
|
||||||
|
"submission_overrides": [
|
||||||
|
"render_chunk",
|
||||||
|
"frame_range",
|
||||||
|
"resolution"
|
||||||
|
]
|
||||||
|
},
|
||||||
"publish": {
|
"publish": {
|
||||||
"CollectRenderPath": {
|
"CollectRenderPath": {
|
||||||
"output_extension": "png",
|
"output_extension": "png",
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,31 @@
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "dict",
|
||||||
|
"collapsible": true,
|
||||||
|
"key": "workfile",
|
||||||
|
"label": "Workfile",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"key": "submission_overrides",
|
||||||
|
"label": "Submission workfile overrides",
|
||||||
|
"type": "enum",
|
||||||
|
"multiselection": true,
|
||||||
|
"enum_items": [
|
||||||
|
{
|
||||||
|
"render_chunk": "Pass chunk size"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"frame_range": "Pass frame range"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resolution": "Pass resolution"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "dict",
|
"type": "dict",
|
||||||
"collapsible": true,
|
"collapsible": true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue