Navigation
API > API/Editor > API/Editor/CurveEditor
This is the base widget type for all views that exist on a curve editor panel. A view may contain 0 or more curves (stored in CurveInfoByID). SCurveEditorViews are directly housed within a single SCurveEditorViewContainer which arranges each view vertically in order.
View types: A view may have a centrally registered ID (See FCurveEditorViewRegistry and FCurveModel::GetSupportedViews) which allows any external curve model type to express support for any other view type. 3 built-in views are provided: Absolute: Shows 1 or more curves on a single 2D-scrollable grid using a single zoomable view-space. Normalized: Shows 1 or more curves on a single grid scrollable horizontally with all curves normalized to the extents of the view Stacked: Shows 1 or more curves on separate fixed-height grids scrollable horizontally each curve normalized to the extents of its own grid Unregistered curve views may still be added to the view by calling SCurveEditorPanel::AddView
Space Transformations: Views must define a valid 2-dimensional space (ViewSpace) that is used to convert from a pixel position to the virtual view space. Views may additionally implement per-curve transformations from view space to curve space, to allow for specific layouts/scales of curves within them. Per-curve transforms are stored inside FCurveInfo::ViewToCurveTransform
Sizing: Views may be size in one of 2 ways:
- Auto sized (bAutoSize=true): views derive their height from the widget's desired size;
- Stretched (bAutoSize=false): views will be stretched to the size of the parent panel with a sensible minimum height.
| Name | SCurveEditorView |
| Type | class |
| Header File | /Engine/Source/Editor/CurveEditor/Public/SCurveEditorView.h |
| Include Path | #include "SCurveEditorView.h" |
Syntax
class SCurveEditorView : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SCurveEditorView
- FSlateControlledConstruction → SWidget → SCompoundWidget → SCurveEditorView
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SCurveEditorView() |
Default constructor | SCurveEditorView.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SCurveEditorView() |
SCurveEditorView.h |
Structs
| Name | Remarks |
|---|---|
| FAxisInfo | |
| FCurveInfo |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowEmpty | uint8 | (Default: false) Defines whether this view should remain on the panel UI even if it does not represent any curves. | SCurveEditorView.h | |
| bAllowModelViewTransforms | uint8 | (Default: false) When true, custom axes need to be rebuilt before use. | SCurveEditorView.h | |
| bAutoSize | uint8 | (Default: true) See class notes - defines whether this view should size to its desired size (true) or stretch to the height of the panel (false). | SCurveEditorView.h | |
| bFixedOutputBounds | uint8 | (Default: false) When true, this view has fixed vertical bounds that should never be changed by zooming or panning | SCurveEditorView.h | |
| bInteractive | uint8 | (Default: true) When true, this view should accept interactive operations such as drags and tool interaction | SCurveEditorView.h | |
| bNeedsDefaultGridLinesH | uint8 | (Default: true) When true, this view has models that need the default grid lines drawing. | SCurveEditorView.h | |
| bNeedsDefaultGridLinesV | uint8 | (Default: true) When true, this view has models that need the default grid lines drawing. | SCurveEditorView.h | |
| bPinned | uint8 | (Default: false) When true, this view has been pinned to the top of the view container. | SCurveEditorView.h | |
| bUpdateModelViewTransforms | uint8 | (Default: false) When true, custom axes need to be rebuilt before use. | SCurveEditorView.h | |
| FixedHeight | TAttribute< float > | (Optional) Attribute that defines a fixed height for this view. | SCurveEditorView.h | |
| MaximumCapacity | int32 | The maximum number of curves allowed on this view, or 0 for no limit | SCurveEditorView.h | |
| RelativeOrder | int32 | Transient integer that is assigned each time the view container order is changed, to guarantee relative ordering of views when the list changes | SCurveEditorView.h | |
| SortBias | int8 | (Default: 0) Should be assigned on Construction of derived types. | SCurveEditorView.h | |
| ViewTypeID | ECurveEditorViewID | This view's type identifier. Assigned by the curve editor panel after construction. | SCurveEditorView.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BindCommands() |
Bind UI commands for this view | SCurveEditorView.h | |
virtual void CheckCacheAndInvalidateIfNeeded() |
This should be called every tick by an owning widget, to see if the cache is valid, which will then recreate it and invalidate widget | SCurveEditorView.h | |
virtual void FrameHorizontal
(
double InInputMin, |
Frame the view horizontall by the input and output bounds, peformaing any custom clipping as needed | SCurveEditorView.h | |
virtual void FrameVertical
(
double InOutputMin, |
Frame the view vertially by the input and output bounds, peformaing any custom clipping as needed | SCurveEditorView.h | |
TSharedPtr< FCurveEditorAxis > GetAxis
(
FCurveEditorViewAxisID ID, |
Retrueve the axis associated with the specified ID and orientation | SCurveEditorView.h | |
FCurveEditorViewAxisID GetAxisForCurve
(
FCurveModelID CurveID, |
Retrueve the axis ID assigned to the specified curve and orientation | SCurveEditorView.h | |
TSharedPtr< FCurveEditor > GetCurveEditor() |
Returns the cure editor associated with this view, or nullptr if the view is not specific to a curve editor | SCurveEditorView.h | |
FCurveEditorScreenSpace GetCurveSpace
(
FCurveModelID CurveID |
Get the screen space ultility that defines the specified curves's input, output and pixel metrics. | SCurveEditorView.h | |
virtual bool GetCurveWithinWidgetRange
(
const FSlateRect& WidgetRectangle, |
Retrieve all the curve points, if any of the interpolating points overlap the specified rectangle in widget space | SCurveEditorView.h | |
virtual void GetGridLinesX
(
TSharedRef< const FCurveEditor > CurveEditor, |
SCurveEditorView.h | ||
virtual void GetGridLinesY
(
TSharedRef< const FCurveEditor > CurveEditor, |
SCurveEditorView.h | ||
FCurveEditorScreenSpaceH GetHorizontalAxisSpace
(
FCurveEditorViewAxisID ID |
Retrieve the horizontal screen-space information for the specified axis | SCurveEditorView.h | |
virtual TOptional< FCurveModelID > GetHoveredCurve() |
Retrieve the id of the hovered curve | SCurveEditorView.h | |
void GetInputBounds
(
double& OutInputMin, |
Retrieve this view's input bounds, accounting for any offsets or padding from the outer container | SCurveEditorView.h | |
double GetOutputMax() |
Retrieve this view's maximum output bound in view space | SCurveEditorView.h | |
double GetOutputMin() |
Retrieve this view's minimum output bound in view space | SCurveEditorView.h | |
bool GetPointsThenCurveWithinWidgetRange
(
const FSlateRect& WidgetRectangle, |
Tries to retrieve all curve points that overlap the rectangle. | SCurveEditorView.h | |
virtual bool GetPointsWithinWidgetRange
(
const FSlateRect& WidgetRectangle, |
Retrieve all the curve points that overlap the specified rectangle in widget space | SCurveEditorView.h | |
FCurveEditorScreenSpaceV GetVerticalAxisSpace
(
FCurveEditorViewAxisID ID |
Retrieve the vertical screen-space information for the specified axis | SCurveEditorView.h | |
FCurveEditorScreenSpace GetViewSpace
(
const FName& InHorizontalAxis, |
Get the screen space ultility that defines this view's input, output and pixel metrics for the specified axis combination | SCurveEditorView.h | |
| Get the default screen space ultility that defines this view's input, output and pixel metrics | SCurveEditorView.h | ||
FTransform2d GetViewToCurveTransform
(
FCurveModelID CurveID |
SCurveEditorView.h | ||
bool HasCapacity() |
Check whether this view has space for any more curves | SCurveEditorView.h | |
bool IsInteractive () |
Check whether this view can be interacted with. | SCurveEditorView.h | |
virtual bool IsTimeSnapEnabled () |
Should the tools respect the global snapping rules for Time (X axis) input when manipulating a curve in this view. | SCurveEditorView.h | |
virtual bool IsValueSnapEnabled () |
Should the tools respect the global snapping rules for Value (Y axis) input when manipulating a curve in this view. | SCurveEditorView.h | |
int32 NumCurves() |
Retrieve the number of curves that exist on this view | SCurveEditorView.h | |
UE::CurveEditor::FOnCurveHasChangedExternally & OnCurveHasChangedExternally() |
Invoked when we detect that a curve needs to be redrawn, i.e. when FCurveModel::HasChangedAndResetTest returns true. | SCurveEditorView.h | |
virtual void OnCurveListChanged () |
Invoked when a curve has been added or removed from this list. | SCurveEditorView.h | |
void RefreshRetainer() |
Request a new render from the retainer widget | SCurveEditorView.h | |
void SetInputBounds
(
double InInputMin, |
Set this view's input bounds | SCurveEditorView.h | |
void SetOutputBounds
(
double InOutputMin, |
Set this view's output bounds | SCurveEditorView.h | |
void SetRetainerWidget
(
TSharedPtr< SRetainerWidget >& InWidget |
SCurveEditorView.h | ||
bool ShouldAutoSize() |
Check whether this view should auto size to fit its FixedHeight or child slot content | SCurveEditorView.h | |
void UpdateCustomAxes() |
Update the custom axes if necessary | SCurveEditorView.h | |
virtual void UpdateViewToTransformCurves () |
SCurveEditorView.h | ||
virtual void UpdateViewToTransformCurves
(
double InputMin, |
Function to make sure to update the view to the transform curves, we need to do this before we cache | SCurveEditorView.h | |
void Zoom
(
const FVector2D& Amount |
Zoom this view in or out around its center point | SCurveEditorView.h | |
void ZoomAround
(
const FVector2D& Amount, |
Zoom this view in or out around the specified point | SCurveEditorView.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetCurveDrawParam
(
TSharedPtr< FCurveEditor >& CurveEditor, |
Gets curve draw params get the cache by calling a single curve | SCurveEditorView.h | |
void GetCurveDrawParams
(
TArray< FCurveDrawParams >& OutDrawParams |
Gets info about the curves being drawn. | SCurveEditorView.h | |
FAxisInfo & GetHorizontalAxisInfo
(
FCurveEditorViewAxisID ID |
SCurveEditorView.h | ||
FAxisInfo & GetVerticalAxisInfo
(
FCurveEditorViewAxisID ID |
SCurveEditorView.h | ||
void InitCurveEditorReference
(
const TSharedRef< FCurveEditor >& InCurveEditor |
Inits this view with the curve editor and sets up required callbacks. | SCurveEditorView.h | |
void UpdateCurveViewTransformsFromModels() |
Update all the curve view transforms from curve models | SCurveEditorView.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float LayoutScaleMultiplier |
SCurveEditorView.h | ||
virtual void Tick
(
const FGeometry& AllottedGeometry, |
SCurveEditorView.h |