Hi all,
I’ve been digging into bulk renaming morph targets inside Unreal Engine 5.7 (also had attempts in 5.5 and 5.6) and wanted to share findings, since I hit a wall.
What I tried
I wrote a small editor plugin that:
- Iterates over
USkeletalMesh->GetMorphTargets()
- Attempts to rename each morph to match a new naming scheme
- Updates skeleton curves to match
Example snippet (simplified):
for (UMorphTarget* Morph : SkelMesh->GetMorphTargets())
{
const FString OldName = Morph->GetName();
const FString NewName = OldName.Replace(TEXT("UniversityStudent"), TEXT("glassesGuy"));
Morph->Rename(*NewName, nullptr); // Attempt rename
SkelMesh->RegisterMorphTarget(Morph); // Re-register
}
What happened
- Unreal would show a dialog listing renamed morphs
- Skeleton curves updated
- But after saving, the .uasset on disk still had the old names
- On reload, Unreal reverted everything
I know that USkeletalMesh::RenameMorphTarget exists, I have attempted using it but got just as far.
Please let me know if you have any ideas!