mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove "family" from json and modify layout loader to expect product type
This commit is contained in:
parent
8dd9d25ac4
commit
23858a8cab
2 changed files with 8 additions and 6 deletions
|
|
@ -181,7 +181,7 @@ class ExtractLayout(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
|||
json_element["reference_fbx"] = str(fbx_id)
|
||||
if abc_id:
|
||||
json_element["reference_abc"] = str(abc_id)
|
||||
json_element["family"] = product_type
|
||||
|
||||
json_element["product_type"] = product_type
|
||||
json_element["instance_name"] = asset.name
|
||||
json_element["asset_name"] = metadata["asset_name"]
|
||||
|
|
|
|||
|
|
@ -369,16 +369,18 @@ class LayoutLoader(plugin.Loader):
|
|||
if representation not in repr_loaded:
|
||||
repr_loaded.append(representation)
|
||||
|
||||
family = element.get('family')
|
||||
product_type = element.get("product_type")
|
||||
if product_type is None:
|
||||
product_type = element.get("family")
|
||||
loaders = loaders_from_representation(
|
||||
all_loaders, representation)
|
||||
|
||||
loader = None
|
||||
|
||||
if repr_format == 'fbx':
|
||||
loader = self._get_fbx_loader(loaders, family)
|
||||
loader = self._get_fbx_loader(loaders, product_type)
|
||||
elif repr_format == 'abc':
|
||||
loader = self._get_abc_loader(loaders, family)
|
||||
loader = self._get_abc_loader(loaders, product_type)
|
||||
|
||||
if not loader:
|
||||
self.log.error(
|
||||
|
|
@ -422,12 +424,12 @@ class LayoutLoader(plugin.Loader):
|
|||
|
||||
actors = []
|
||||
|
||||
if family == 'model':
|
||||
if product_type == 'model':
|
||||
actors, _ = self._process_family(
|
||||
assets, 'StaticMesh', transform, basis,
|
||||
sequence, inst
|
||||
)
|
||||
elif family == 'rig':
|
||||
elif product_type == 'rig':
|
||||
actors, bindings = self._process_family(
|
||||
assets, 'SkeletalMesh', transform, basis,
|
||||
sequence, inst
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue