Hi,
I’m trying to get the source file of a texture map asset via python. I can get all the Texture2D maps, but I am not sure how to get the source file. I saw that there is an AssetImportData and asset_import_data flag or command, but I am not sure how to use them, or if they work on an asset.
Also, I often have to dig around to get clarity on python command usage for unreal. is there a way to query examples/flags etc in the python command prompt in Unreal?
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
all_assets = asset_registry.get_assets_by_path('/Game', recursive=True)
for asset in all_assets:
if asset.asset_class == 'Texture2D':
print asset.asset_name
print asset.object_path
print unreal.AssetImportData(asset)
print asset_import_data = asset.asset_import_data()
Thank you.
Adnan Hussain