mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'bugfix/integrate_fails_editorial_publish' into bugfix/OP-3654_Flame-re-timing-produces-frame-range-discrepancy-
This commit is contained in:
commit
c57a317711
2 changed files with 16 additions and 4 deletions
|
|
@ -140,7 +140,11 @@ class ExtractHierarchyToAvalon(pyblish.api.ContextPlugin):
|
|||
entity = self.unarchive_entity(unarchive_entity, data)
|
||||
|
||||
# make sure all relative instances have correct avalon data
|
||||
self._set_avalon_data_to_relative_instances(context, entity)
|
||||
self._set_avalon_data_to_relative_instances(
|
||||
context,
|
||||
project_name,
|
||||
entity
|
||||
)
|
||||
|
||||
if update_data:
|
||||
# Update entity data with input data
|
||||
|
|
@ -184,8 +188,16 @@ class ExtractHierarchyToAvalon(pyblish.api.ContextPlugin):
|
|||
|
||||
return asset_doc
|
||||
|
||||
def _set_avalon_data_to_relative_instances(self, context, asset_doc):
|
||||
def _set_avalon_data_to_relative_instances(
|
||||
self,
|
||||
context,
|
||||
project_name,
|
||||
asset_doc
|
||||
):
|
||||
for instance in context:
|
||||
# Skip instance if has filled asset entity
|
||||
if instance.data.get("assetEntity"):
|
||||
continue
|
||||
asset_name = asset_doc["name"]
|
||||
inst_asset_name = instance.data["asset"]
|
||||
|
||||
|
|
@ -196,11 +208,12 @@ class ExtractHierarchyToAvalon(pyblish.api.ContextPlugin):
|
|||
parents = asset_doc["data"].get("parents") or list()
|
||||
|
||||
# equire only relative parent
|
||||
parent_name = project_name
|
||||
if parents:
|
||||
parent_name = parents[-1]
|
||||
|
||||
# update avalon data on instance
|
||||
instance.data["avalonData"].update({
|
||||
instance.data["anatomyData"].update({
|
||||
"hierarchy": "/".join(parents),
|
||||
"task": {},
|
||||
"parent": parent_name
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import pyblish.api
|
|||
import openpype.api
|
||||
from openpype.client import (
|
||||
get_representations,
|
||||
get_asset_by_name,
|
||||
get_subset_by_name,
|
||||
get_version_by_name,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue