Trying to assign materials based on name. This is not working for GeometryCaches. The material slot names come up empty. Can you see why?
geom_cache_list = []
# directory of alembic imports
target_content = unreal.EditorAssetLibrary.list_assets("/Game/HR/Seq/Cloth/")
for each in target_content:
asset_data = unreal.EditorAssetLibrary.find_asset_data(each)
asset_class = asset_data.get_editor_property('asset_class')
if asset_class == "GeometryCache":
geom_cache_list.append(each)
for item in geom_cache_list:
geom_cache = unreal.load_asset(item)
gc_component = unreal.GeometryCacheComponent()
gc_component.set_geometry_cache(geom_cache)
msn = gc_component.get_material_slot_names()
print(f"msn: {msn}")
# result []