You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Sequencer: Revert OnPostPropertyChanged for now
#jira UE-136405 #rb mike.zyracki #ROBOMERGE-AUTHOR: max.chen #ROBOMERGE-SOURCE: CL 18423903 in //UE5/Release-5.0/... via CL 18423917 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18423933 by max chen in ue5-release-engine-test branch]
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "Framework/Application/SlateApplication.h"
|
||||
#include "Widgets/Layout/SBox.h"
|
||||
#include "SequencerSectionPainter.h"
|
||||
#include "Components/SceneComponent.h"
|
||||
#include "Components/SkeletalMeshComponent.h"
|
||||
#include "Editor/UnrealEdEngine.h"
|
||||
#include "UnrealEdGlobals.h"
|
||||
@@ -1218,7 +1219,19 @@ void FSkeletalAnimationTrackEditor::OnSequencerSaved(ISequencer& )
|
||||
|
||||
void FSkeletalAnimationTrackEditor::OnPostPropertyChanged(UObject* InObject, FPropertyChangedEvent& InPropertyChangedEvent)
|
||||
{
|
||||
// If the object changed has any animation track, notify sequencer to update because animations tick on their own and sequencer needs to evaluate again
|
||||
// This attempts to fix tposes when changing properties without evaluating Sequencer UE-101261,
|
||||
// but unfortunately causes other problems like the temporary unkeyed value getting lost UE-136405
|
||||
/*
|
||||
if (InPropertyChangedEvent.ChangeType != EPropertyChangeType::ValueSet)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If the object changed has any animation track:
|
||||
// 1. Store the current transform (which may be an unkeyed value),
|
||||
// 2. Evaluate Sequencer so that the skeletal animation track will be evaluated, and then the skeletal mesh with tick
|
||||
// 3. Restore the current transform
|
||||
// Without this, changing a value on a skeletal mesh will tick but not necessarily evaluate Sequencer, resulting in a tpose.
|
||||
const bool bCreateIfMissing = false;
|
||||
FFindOrCreateHandleResult HandleResult = FindOrCreateHandleToObject(InObject, bCreateIfMissing );
|
||||
FGuid ObjectHandle = HandleResult.Handle;
|
||||
@@ -1227,9 +1240,30 @@ void FSkeletalAnimationTrackEditor::OnPostPropertyChanged(UObject* InObject, FPr
|
||||
FFindOrCreateTrackResult TrackResult = FindOrCreateTrackForObject(ObjectHandle, UMovieSceneSkeletalAnimationTrack::StaticClass(), NAME_None, bCreateIfMissing);
|
||||
if (TrackResult.Track)
|
||||
{
|
||||
GetSequencer()->NotifyMovieSceneDataChanged(EMovieSceneDataChangeType::TrackValueChanged);
|
||||
USceneComponent* SceneComponent = Cast<USceneComponent>(InObject);
|
||||
if (!SceneComponent)
|
||||
{
|
||||
if (AActor* Actor = Cast<AActor>(InObject))
|
||||
{
|
||||
SceneComponent = Actor->GetRootComponent();
|
||||
}
|
||||
}
|
||||
|
||||
FTransform RelativeTransform;
|
||||
if (SceneComponent)
|
||||
{
|
||||
RelativeTransform = SceneComponent->GetRelativeTransform();
|
||||
}
|
||||
|
||||
GetSequencer()->ForceEvaluate();
|
||||
|
||||
if (SceneComponent)
|
||||
{
|
||||
SceneComponent->SetRelativeTransform(RelativeTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool FSkeletalAnimationTrackEditor::CreateAnimationSequence(const TArray<UObject*> NewAssets, USkeletalMeshComponent* SkelMeshComp, FGuid Binding, bool bCreateSoftLink)
|
||||
|
||||
Reference in New Issue
Block a user