mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Update openpype/plugins/load/add_site.py
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
parent
a0a2e2678e
commit
f6fb60bb49
1 changed files with 9 additions and 12 deletions
|
|
@ -38,23 +38,20 @@ class AddSyncSite(load.LoaderPlugin):
|
|||
family = context["representation"]["context"]["family"]
|
||||
project_name = data["project_name"]
|
||||
repre_id = data["_id"]
|
||||
self.add_site_to_representation(project_name,
|
||||
repre_id,
|
||||
data["site_name"],
|
||||
is_main=True)
|
||||
|
||||
add_ids = [repre_id]
|
||||
if family == "workfile":
|
||||
links = get_linked_ids_for_representations(project_name,
|
||||
add_ids,
|
||||
link_type="reference")
|
||||
add_ids.extend(links)
|
||||
|
||||
add_ids = set(add_ids)
|
||||
self.log.info("Add to repre_ids {}".format(add_ids))
|
||||
is_main = True
|
||||
for add_repre_id in add_ids:
|
||||
self.add_site_to_representation(project_name,
|
||||
add_repre_id,
|
||||
data["site_name"],
|
||||
is_main)
|
||||
is_main = False
|
||||
for link_repre_id in links:
|
||||
self.add_site_to_representation(project_name,
|
||||
link_repre_id,
|
||||
data["site_name"],
|
||||
is_main=False)
|
||||
|
||||
self.log.debug("Site added.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue