Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Public/AnimSequencerInstance.h
mike zyracki 8441bf92a8 Add bWasCreated flag to BindToSkeletalMesh so when we know when we create the sequencer anim instance we should save the pose. This removes the need for control rig to override NativeInitialization. Also add some checks to make sure we save a valid pose.
#jira UE-76569

#rb max.chen

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: mike.zyracki
#ROBOMERGE-SOURCE: CL 7280102 in //UE4/Release-4.23/... via CL 7280144
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v371-7306989)

[CL 7350675 by mike zyracki in Dev-Build branch]
2019-07-17 01:10:05 -04:00

43 lines
1.0 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/**
*
* This Instance only contains one AnimationAsset, and produce poses
* Used by Preview in AnimGraph, Playing single animation in Kismet2 and etc
*/
#pragma once
#include "Animation/AnimInstance.h"
#include "AnimCustomInstance.h"
#include "AnimSequencerInstance.generated.h"
UCLASS(transient, NotBlueprintable)
class ANIMGRAPHRUNTIME_API UAnimSequencerInstance : public UAnimCustomInstance
{
GENERATED_UCLASS_BODY()
public:
/** Update an animation sequence player in this instance */
void UpdateAnimTrack(UAnimSequenceBase* InAnimSequence, int32 SequenceId, float InPosition, float Weight, bool bFireNotifies);
/** Reset all nodes in this instance */
void ResetNodes();
/** Reset the pose for this instance*/
void ResetPose();
/** Saved the named pose to restore after */
void SavePose();
protected:
// UAnimInstance interface
virtual FAnimInstanceProxy* CreateAnimInstanceProxy() override;
public:
static const FName SequencerPoseName;
};