You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* New custom widget for EAlphaBlendOption properties showing a combo box with the curve graph and name inside it. Once clicking on it, a borderless overlay window will be opened showing a grid of available curve types (like in Sequencer). * Refactor: Separated the easing customization into a grid compound widget that shows the curve types and the actual customization. * The grid widget holding the curves now has a filter, to exclude unsupported curve types for various situations. (e.g. we do support more easing curve types than we do for alpha blends in state transitions). * Created a new compound widget that shows a curve and the name below it, which is used as button content for the new combo box. * Curve types use grouping set in the enum. Testing: * Made sure the easing curve type menu in Sequencer works the way it worked before. * Made sure the blend modes in the state transitions and e.g. a blend poses anim graph node works the same way as before. #jira: https://jira.it.epicgames.com/browse/UE-166261 Initial slack channel discussion: https://epicgames.slack.com/archives/C044VB3LCKX/p1664989593947499 Continued slack thread: https://epicgames.slack.com/archives/C0450453V6J/p1665577875211299 #preflight 63578cdef726e94fe038af63 [CL 22746945 by benjamin jillich in ue5-main branch]
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "HAL/Platform.h"
|
|
#include "IDetailCustomization.h"
|
|
#include "Templates/SharedPointer.h"
|
|
#include "Generators/MovieSceneEasingCurves.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
class IDetailLayoutBuilder;
|
|
|
|
enum class EMovieSceneBuiltInEasing : uint8;
|
|
class FReply;
|
|
class IPropertyHandle;
|
|
|
|
DECLARE_DELEGATE_OneParam(FEasingFunctionGridWidget_OnClicked, EMovieSceneBuiltInEasing);
|
|
|
|
/** Widget showing a grid of curves including their names.
|
|
* Curves are grouped within rows, e.g. Exponential in, out, in-out in one row.
|
|
* A filter can be used to exclude several curves from the grid.
|
|
*/
|
|
class SEasingFunctionGridWidget : public SCompoundWidget
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS(SEasingFunctionGridWidget) {}
|
|
|
|
/** The easing curve filter containing all curve types that should be excluded.In case the filter is empty, all curve types will be shown. */
|
|
SLATE_ATTRIBUTE(TSet<EMovieSceneBuiltInEasing>, FilterExclude)
|
|
SLATE_EVENT(FEasingFunctionGridWidget_OnClicked, OnTypeChanged)
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
private:
|
|
struct FGroup
|
|
{
|
|
FString GroupName;
|
|
TArray<EMovieSceneBuiltInEasing, TInlineAllocator<3>> Values;
|
|
};
|
|
|
|
FGroup& FindOrAddGroup(TArray<FGroup>& Groups, const FString& GroupName);
|
|
TArray<FGroup> ConstructGroups(const TSet<EMovieSceneBuiltInEasing>& FilterExclude);
|
|
|
|
FReply OnTypeButtonClicked(EMovieSceneBuiltInEasing type);
|
|
|
|
FEasingFunctionGridWidget_OnClicked OnClickedDelegate;
|
|
TAttribute<TSet<EMovieSceneBuiltInEasing>> FilterExcludeAttribute;
|
|
}; |