mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 14:22:37 +01:00
Fix extract layout
This commit is contained in:
parent
162394a56c
commit
8d57f5f3ef
1 changed files with 10 additions and 1 deletions
|
|
@ -128,13 +128,22 @@ class ExtractLayout(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
|||
json_data = []
|
||||
fbx_files = []
|
||||
|
||||
asset_group = bpy.data.objects[str(instance)]
|
||||
asset_group = instance.data["transientData"]["instance_node"]
|
||||
|
||||
fbx_count = 0
|
||||
|
||||
project_name = instance.context.data["projectEntity"]["name"]
|
||||
for asset in asset_group.children:
|
||||
metadata = asset.get(AVALON_PROPERTY)
|
||||
if not metadata:
|
||||
# Avoid erroring directly if there's just invalid data
|
||||
# inside the instance
|
||||
# TODO: This should actually be validated in a validator
|
||||
self.log.warning(
|
||||
f"Found content in layout that is not a loaded "
|
||||
f"asset, skipping: {asset.name_full}"
|
||||
)
|
||||
continue
|
||||
|
||||
version_id = metadata["parent"]
|
||||
family = metadata["family"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue