mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
create also components of source files for review and thumbnail
This commit is contained in:
parent
4d385efab6
commit
6ca870870b
1 changed files with 23 additions and 1 deletions
|
|
@ -121,7 +121,9 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin):
|
|||
|
||||
# Components data
|
||||
component_list = []
|
||||
|
||||
# Components that will be duplicated to unmanaged location
|
||||
src_components_to_add = []
|
||||
|
||||
# Create review components
|
||||
# Change asset name of each new component for review
|
||||
first_review_repre = True
|
||||
|
|
@ -163,6 +165,10 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin):
|
|||
# Add representation name to asset name of "not first" review
|
||||
component_item["asset_data"]["name"] += repre["name"].title()
|
||||
|
||||
# Create copy of item before setting location
|
||||
src_components_to_add.append(
|
||||
(repre, copy.deepcopy(component_item))
|
||||
)
|
||||
# Set location
|
||||
component_item["component_location"] = ftrack_server_location
|
||||
# Add item to component list
|
||||
|
|
@ -187,11 +193,27 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin):
|
|||
"name": "thumbnail"
|
||||
}
|
||||
component_item["thumbnail"] = True
|
||||
# Create copy of item before setting location
|
||||
src_components_to_add.append(
|
||||
(repre, copy.deepcopy(component_item))
|
||||
)
|
||||
# Set location
|
||||
component_item["component_location"] = ftrack_server_location
|
||||
# Add item to component list
|
||||
component_list.append(component_item)
|
||||
|
||||
# Add source components for review and thubmnail components
|
||||
for repre, component_item in src_components_to_add:
|
||||
# Make sure thumbnail is disabled
|
||||
component_item["thumbnail"] = False
|
||||
# Set location
|
||||
component_item["component_location"] = unmanaged_location
|
||||
# Modify name of component to have suffix "_src"
|
||||
component_data = component_item["component_data"]
|
||||
component_name = component_data["name"]
|
||||
component_data["name"] = component_name + "_src"
|
||||
component_list.append(component_item)
|
||||
|
||||
# Add others representations as component
|
||||
for repre in other_representations:
|
||||
# Create copy of base comp item and append it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue