mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #3535 from Tilix4/fx_shot_duplicate_name
Fix: shot duplicate name using shot's hierarchy (ep, seq)
This commit is contained in:
commit
4530bfef96
1 changed files with 8 additions and 1 deletions
|
|
@ -227,6 +227,13 @@ def update_op_assets(
|
|||
parent_entity = parent_doc["data"]["zou"]
|
||||
parent_zou_id = parent_entity.get("parent_id")
|
||||
|
||||
if item_type in ["Shot", "Sequence"]:
|
||||
# Name with parents hierarchy "({episode}_){sequence}_{shot}"
|
||||
# to avoid duplicate name issue
|
||||
item_name = "_".join(item_data["parents"] + [item_doc["name"]])
|
||||
else:
|
||||
item_name = item_doc["name"]
|
||||
|
||||
# Set root folders parents
|
||||
item_data["parents"] = entity_parent_folders + item_data["parents"]
|
||||
|
||||
|
|
@ -240,7 +247,7 @@ def update_op_assets(
|
|||
item_doc["_id"],
|
||||
{
|
||||
"$set": {
|
||||
"name": item["name"],
|
||||
"name": item_name,
|
||||
"data": item_data,
|
||||
"parent": project_doc["_id"],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue