Description

UPoseAsset::SetBasePoseName() does not correctly set the BasePoseIndex when a valid pose name is provided. Regardless of input, the pose defaults back to ReferencePose. Upon inspection of the implementation in

Engine/Source/Runtime/Engine/Private/Animation/PoseAsset.cpp, the issue appears to be caused by unconditional overwriting of BasePoseIndex = INDEX_NONE; after the index is set.

This results in valid pose names being ignored.

Proposed Fix:

bool UPoseAsset::SetBasePoseName(const FName& NewBasePoseName)
{
	if (NewBasePoseName != NAME_None)
	{
		const int32 NewIndex = PoseContainer.PoseFNames.IndexOfByKey(NewBasePoseName);
		if (NewIndex != INDEX_NONE)
		{
			BasePoseIndex = NewIndex;
+			return true;
		}
-		else
-		{
-			return false;
-		}
	}

	BasePoseIndex = INDEX_NONE;
-	return true;
+	return false;
}
Steps to Reproduce

1. Create a PoseAsset with multiple poses.
2. Call SetBasePoseName with a valid pose name (other than ReferencePose).
3. Observe that BasePoseIndex is not set and remains as INDEX_NONE.

Expected Result: BasePoseIndex should be updated to the index corresponding to the provided pose name.

Actual Result: BasePoseIndex is immediately overwritten with INDEX_NONE, even if the pose name is valid.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-269726 in the post.

0
Login to Vote

Unresolved
ComponentUE - Anim - Runtime
Affects Versions5.5
Target Fix5.7
CreatedApr 11, 2025
UpdatedApr 14, 2025
View Jira Issue