Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Public/IDetailKeyframeHandler.h
juan portillo d4c6169b10 Sequencer:
Added option to have different Keyed Status / Icon via Details Keyframe Handler.
Current Keyframe Icon is completely replaced, but not yet deleted from Content or from the Style Set entry.
Added Sequencer->GetPropertyKeyedStatus, which uses the FSequencerPropertyKeyedStatus class to find the keyed status for a property.

The keyed status of a property is gotten through matching the property handle to the channel via its channel meta data. Two new member variables to the Channel MetaData were added to achieve this:
1) Sub Property Path: For structs, this is the relative path from the topmost property. E.g. for the pitch in a Transform property this would be "Rotation.Pitch"
2) Sub Property Path Map: some channels are re-used by multiple different structs and some might have different property names. The prime example is Transform and EulerTransform. These two have different names for their properties. FTransform uses "Translation" whereas FEulerTransform uses "Location", so these two must be differentiated via a map from the Struct's FName to the FName of the name it represents. This is also the case for Scale where FTransform uses "Scale3D" and FEulerTransform uses "Scale".

In addition to this, External handling is possible via ISequencerPropertyKeyedStatus::GetExternalHandler. This is used by Transform Track Editor to link the Scene Component properties (Relative Location/Rotation/Scale) so that these can also get their Keyframe Status properly, as the Transform Track itself can be in the Actor and not in the (Root) Scene Component where the properties are actually at.

#rb Max.Chen
#jira UE-188881, UE-145903, UE-193229

[CL 28307486 by juan portillo in ue5-main branch]
2023-09-27 22:48:56 -04:00

43 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
class IPropertyHandle;
/**
* Keyed Status of a Property, ordered by their precedence
* E.g. if a property is keyed in current and another frame, Keyed In Frame should take precedence
*/
enum class EPropertyKeyedStatus : uint8
{
/** Property not keyed, or not animated in current time */
NotKeyed,
/** Property is animated in the current time, but there's no key in current frame */
KeyedInOtherFrame,
/** For Top-level properties only -- some but not all the properties of the struct are keyed in Current Frame */
PartiallyKeyed,
/** Property (and all its sub-properties) are keyed in current frame */
KeyedInFrame,
};
class IDetailKeyframeHandler
{
public:
virtual ~IDetailKeyframeHandler(){}
virtual bool IsPropertyKeyable(const UClass* InObjectClass, const IPropertyHandle& PropertyHandle) const = 0;
virtual bool IsPropertyKeyingEnabled() const = 0;
virtual void OnKeyPropertyClicked(const IPropertyHandle& KeyedPropertyHandle) = 0;
virtual bool IsPropertyAnimated(const IPropertyHandle& PropertyHandle, UObject* ParentObject) const = 0;
virtual EPropertyKeyedStatus GetPropertyKeyedStatus(const IPropertyHandle& PropertyHandle) const { return EPropertyKeyedStatus::NotKeyed; }
};