You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This is a large suite of changes that are being submitted in bulk for build-health reasons: Core machinery: - FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization. - FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time. - The following interpolation types have been added/improved to add Derivative and Integral functionality * FConstantValue: Represents a curve of the form y=c * FLinearInterpolation: Represents a curve of the form y=mx + c * FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c. * FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d. * FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration. * FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality. - FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate. - FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code. - FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time Curve Editor: Added the ability to specify custom axes and child curves - Custom Axes: * Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve. * This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times) - Child Curves: * Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor. Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic, - New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset - New options in the curve editor models allow for a non-UMovieSceneSection owner object type #jira UE-149871 #rb Ludovic.Chabant, David.Bromberg, Max.Chen [CL 34813298 by andrew rodham in ue5-main branch]
64 lines
1.8 KiB
C++
64 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CurveEditorAxis.h"
|
|
#include "Templates/UniquePtr.h"
|
|
#include "Widgets/Input/NumericTypeInterface.h"
|
|
#include "CurveEditor.h"
|
|
#include "SCurveEditorView.h"
|
|
#include "CurveEditorAxis.h"
|
|
|
|
|
|
bool FCurveEditorAxis::HasLabels() const
|
|
{
|
|
return NumericTypeInterface.IsValid();
|
|
}
|
|
|
|
FText FCurveEditorAxis::MakeLabel(double Value) const
|
|
{
|
|
if (NumericTypeInterface)
|
|
{
|
|
return FText::FromString(NumericTypeInterface->ToString(Value));
|
|
}
|
|
return FText();
|
|
}
|
|
|
|
void FCurveEditorAxis::GetGridLines(const FCurveEditor& CurveEditor, const SCurveEditorView& View, FCurveEditorViewAxisID AxisID, TArray<double>& OutMajorGridLines, TArray<double>& OutMinorGridLines, ECurveEditorAxisOrientation Axis) const
|
|
{
|
|
|
|
}
|
|
|
|
void FLinearCurveEditorAxis::GetGridLines(const FCurveEditor& CurveEditor, const SCurveEditorView& View, FCurveEditorViewAxisID AxisID, TArray<double>& OutMajorGridLines, TArray<double>& OutMinorGridLines, ECurveEditorAxisOrientation Axis) const
|
|
{
|
|
FCurveEditorScreenSpace ViewSpace = View.GetViewSpace();
|
|
|
|
float Size = 1.0;
|
|
float Min = 0.0;
|
|
float Max = 1.0;
|
|
|
|
if (Axis == ECurveEditorAxisOrientation::Horizontal)
|
|
{
|
|
FCurveEditorScreenSpaceH AxisSpace = View.GetHorizontalAxisSpace(AxisID);
|
|
Size = AxisSpace.GetPhysicalWidth();
|
|
Min = AxisSpace.GetInputMin();
|
|
Max = AxisSpace.GetInputMax();
|
|
|
|
|
|
CurveEditor::PopulateGridLineValues(
|
|
ViewSpace.GetPhysicalWidth(),
|
|
ViewSpace.GetInputMin(),
|
|
ViewSpace.GetInputMax(),
|
|
4,
|
|
OutMajorGridLines,
|
|
OutMinorGridLines);
|
|
}
|
|
else
|
|
{
|
|
FCurveEditorScreenSpaceV AxisSpace = View.GetVerticalAxisSpace(AxisID);
|
|
Size = ViewSpace.GetPhysicalHeight();
|
|
Min = ViewSpace.GetOutputMin();
|
|
Max = ViewSpace.GetOutputMax();
|
|
}
|
|
|
|
CurveEditor::PopulateGridLineValues(Size, Min, Max, 4, OutMajorGridLines, OutMinorGridLines);
|
|
}
|