mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Refactor code to use AyonAssetContainer instead of AssetContainer
This commit is contained in:
parent
cb13e94467
commit
41bd47d9b5
3 changed files with 5 additions and 5 deletions
|
|
@ -50,7 +50,7 @@ class LayoutLoader(plugin.Loader):
|
|||
# Get all the asset containers
|
||||
for a in asset_content:
|
||||
obj = ar.get_asset_by_object_path(a)
|
||||
if obj.get_asset().get_class().get_name() == 'AssetContainer':
|
||||
if obj.get_asset().get_class().get_name() == 'AyonAssetContainer':
|
||||
asset_containers.append(obj)
|
||||
|
||||
return asset_containers
|
||||
|
|
@ -338,7 +338,7 @@ class LayoutLoader(plugin.Loader):
|
|||
).replace('\\', '/')
|
||||
|
||||
_filter = unreal.ARFilter(
|
||||
class_names=["AssetContainer"],
|
||||
class_names=["AyonAssetContainer"],
|
||||
package_paths=[anim_path],
|
||||
recursive_paths=False)
|
||||
containers = ar.get_assets(_filter)
|
||||
|
|
@ -519,7 +519,7 @@ class LayoutLoader(plugin.Loader):
|
|||
|
||||
for asset in assets:
|
||||
obj = ar.get_asset_by_object_path(asset).get_asset()
|
||||
if obj.get_class().get_name() == 'AssetContainer':
|
||||
if obj.get_class().get_name() == 'AyonAssetContainer':
|
||||
container = obj
|
||||
if obj.get_class().get_name() == 'Skeleton':
|
||||
skeleton = obj
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class UAssetLoader(plugin.Loader):
|
|||
|
||||
for asset in asset_content:
|
||||
obj = ar.get_asset_by_object_path(asset).get_asset()
|
||||
if not obj.get_class().get_name() == 'AssetContainer':
|
||||
if not obj.get_class().get_name() == 'AyonAssetContainer':
|
||||
unreal.EditorAssetLibrary.delete_asset(asset)
|
||||
|
||||
update_filepath = get_representation_path(representation)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class ExtractLayout(publish.Extractor):
|
|||
# Search the reference to the Asset Container for the object
|
||||
path = unreal.Paths.get_path(mesh.get_path_name())
|
||||
filter = unreal.ARFilter(
|
||||
class_names=["AssetContainer"], package_paths=[path])
|
||||
class_names=["AyonAssetContainer"], package_paths=[path])
|
||||
ar = unreal.AssetRegistryHelpers.get_asset_registry()
|
||||
try:
|
||||
asset_container = ar.get_assets(filter)[0].get_asset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue