My workflow is following
- Move asset (by renaming) my_asset from folder A to folder B.
- Create asset (by duplicating) with the same name (my_asset) in folder A.
unreal.EditorAssetLibrary.rename_asset(assetA_path, assetA_newpath)
unreal.EditorAssetLibrary.duplicate_asset(some_path, assetA_path)
Moving asset is successfully, but creating asset is failure.
LogEditorAssetSubsystem: Error: DuplicateAsset failed: The destination path ‘/Game/MetaHumans/EvgenyZ/Custom_avatar/Evgeny_custom.Evgeny_custom’ is not valid. An asset already exists at this location.
in windows explorer i see “assetA.uasset” file with size of 3kb.
It Disappears after RMB on folder and “Fix up redirections”. And my workflow can work.
The question is:
How to execute “Fix up redirections” with Python?