mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Implemented loader action to push multiple versions
This commit is contained in:
parent
ef9ab3bcdc
commit
965f937e28
1 changed files with 5 additions and 8 deletions
|
|
@ -28,25 +28,22 @@ class PushToLibraryProject(load.ProductLoaderPlugin):
|
|||
if not filtered_contexts:
|
||||
raise LoadError("Nothing to push for your selection")
|
||||
|
||||
if len(filtered_contexts) > 1:
|
||||
raise LoadError("Please select only one item")
|
||||
|
||||
context = tuple(filtered_contexts)[0]
|
||||
|
||||
push_tool_script_path = os.path.join(
|
||||
AYON_CORE_ROOT,
|
||||
"tools",
|
||||
"push_to_project",
|
||||
"main.py"
|
||||
)
|
||||
project_name = tuple(filtered_contexts)[0]["project"]["name"]
|
||||
|
||||
project_name = context["project"]["name"]
|
||||
version_id = context["version"]["id"]
|
||||
version_ids = []
|
||||
for context in filtered_contexts:
|
||||
version_ids.append(context["version"]["id"])
|
||||
|
||||
args = get_ayon_launcher_args(
|
||||
"run",
|
||||
push_tool_script_path,
|
||||
"--project", project_name,
|
||||
"--version", version_id
|
||||
"--versions", ",".join(version_ids)
|
||||
)
|
||||
run_detached_process(args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue