UE5 I need to animate my Metahuman and export to MP4. I have the Metahuman in the level and have created a LevelSequence. Individual animations are to be added to the LevelSequence as read from a JSON file, so adding annimations to the sequence must be done in code.
Metahuman correctly responds to as a single animation via:
UnrealAPI::PlayAnimation(
*SkeletalMeshBodyComponentInternalPtr.Get(), AnimationSequence, Rate, StartPosition);
Where SkeletalMeshBodyComponentInternalPtr = Cast<USkeletalMeshComponent>(
MetaHumanActor->GetComponentByClass(USkeletalMeshComponent::StaticClass()));
If I try to add the MetaHuman to the LevelSequence, the returned GUID is 0.
I’ve tried the following with both the body mesh and the full MetaHuman Actor object.
FGuid Guid = Cast<UMovieSceneSequence>(LevelSequence)->CreatePossessable(SkeletalMeshBodyComponentInternalPtr.Get());
FGuid Guid = LevelSequence->FindOrAddBinding(SkeletalMeshBodyComponentInternalPtr.Get());
FGuid Guid = LevelSequence->FindPossessableObjectId(*SkeletalMeshBodyComponentInternalPtr.Get(), SkeletalMeshBodyComponentInternalPtr.Get()->GetWorld());
FGuid Guid = LevelSequence->FindBindingFromObject(SkeletalMeshBodyComponentInternalPtr.Get(), SkeletalMeshBodyComponentInternalPtr.Get()->GetWorld());