mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
add check for instance assetEntity
This commit is contained in:
parent
cef7e87b01
commit
c53847d0fa
1 changed files with 11 additions and 1 deletions
|
|
@ -39,11 +39,21 @@ class CollectAnatomyInstanceData(pyblish.api.InstancePlugin):
|
||||||
anatomy_data = copy.deepcopy(instance.context.data["anatomyData"])
|
anatomy_data = copy.deepcopy(instance.context.data["anatomyData"])
|
||||||
project_entity = instance.context.data["projectEntity"]
|
project_entity = instance.context.data["projectEntity"]
|
||||||
context_asset_entity = instance.context.data["assetEntity"]
|
context_asset_entity = instance.context.data["assetEntity"]
|
||||||
|
instance_asset_entity = instance.data.get("assetEntity")
|
||||||
|
|
||||||
asset_name = instance.data["asset"]
|
asset_name = instance.data["asset"]
|
||||||
|
|
||||||
|
# There is possibility that assetEntity on instance is already set
|
||||||
|
# which can happen in standalone publisher
|
||||||
|
if (
|
||||||
|
instance_asset_entity
|
||||||
|
and instance_asset_entity["name"] == asset_name
|
||||||
|
):
|
||||||
|
asset_entity = instance_asset_entity
|
||||||
|
|
||||||
# Check if asset name is the same as what is in context
|
# Check if asset name is the same as what is in context
|
||||||
# - they may be different, e.g. in NukeStudio
|
# - they may be different, e.g. in NukeStudio
|
||||||
if context_asset_entity["name"] == asset_name:
|
elif context_asset_entity["name"] == asset_name:
|
||||||
asset_entity = context_asset_entity
|
asset_entity = context_asset_entity
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue