Description

The AnimSingleNodeInstance used in the AnimMontage preview does not consider multiple Slots. The following is a correction code.

void UAnimSingleNodeInstance::SetAnimationAsset(class UAnimationAsset* NewAsset, bool bInIsLooping, float InPlayRate)
{
...
Proxy.ReinitializeSlotNodes();
if ( Montage->SlotAnimTracks.Num() > 0 )
{    	
   // add
   for (int32 i = 0; i < Montage->SlotAnimTracks.Num(); ++i)
   {    		
      Proxy.RegisterSlotNodeWithAnimInstance(Montage->SlotAnimTracks[i].SlotName);    	
   }    	
   Proxy.SetMontagePreviewSlot(Montage->SlotAnimTracks[0].SlotName);
}
Steps to Reproduce
  1. Open attached repro project
  2. Open Content/ThirdPersonCPP/Sample/NewAnimMontage
  3. Enable PreviewSlot of non-default slot ( ex:DefaultGroup.Slot1 )

expect : can confirm running animnotifystate of the anim sequence in log.
result : it does not run.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Anim - Runtime
Affects Versions4.264.275.1
Target Fix5.4
Fix Commit30499769
Main Commit30499781
CreatedJul 15, 2021
ResolvedJan 9, 2024
UpdatedJan 20, 2024
View Jira Issue