FCurveEditor

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

CurveEditor

Header

/Engine/Source/Editor/CurveEditor/Public/CurveEditor.h

Include

#include "CurveEditor.h"

Syntax

class FCurveEditor :
    public FEditorUndoClient,
    public TSharedFromThis< FCurveEditor >

Variables

Name Description

Protected variable

uint32

 

ActiveCurvesSerialNumber

A serial number that is incremented any time the currently active set of curves are changed

Protected variable

TOptional< FCur...

 

ActiveTool

The currently active tool if any.

Protected variable

FCurveEditorAxi...

 

AxisSnapMetrics

Track which axis UI movements should be snapped to (where applicable) based on limitations imposed by the UI.

Protected variable

bool

 

bBoundTransformUpdatesSuppressed

Should attempts to update the bounds of each curve be ignored? This allows tools to keep the bounds from being automatically updated each frame which allows Normalized views to push past their boundaries without the normalization ratio changing per-frame as you drag.

Protected variable

TUniquePtr< ICu...

 

Bounds

Curve editor bounds implementation

Protected variable

TArray< TUnique...

 

BufferedCurves

Buffered Curves.

Protected variable

TSharedPtr< FUI...

 

CommandList

UI command list of actions mapped to this curve editor

Protected variable

TMap< FCurveMod...

 

CurveData

Map from curve model ID to the actual curve model

Public variable

TAttribute< FKe...

 

DefaultKeyAttributes

Attribute used for determining default attributes to apply to a newly create key

Protected variable

TArray< TShared...

 

EditorExtensions

List of editor extensions we have initialized.

Public variable

TAttribute< TOp...

 

FixedGridSpacingAttribute

Attribute used to retrieve the current value-axis grid line state

Public variable

TAttribute< FTe...

 

GridLineLabelFormatXAttribute

Grid line label text format strings for the X and Y axis

Public variable

TAttribute< FTe...

 

GridLineLabelFormatYAttribute

Public variable

TAttribute< boo...

 

InputSnapEnabledAttribute

Attribute used to determine if we should snap input values

Public variable

TAttribute< FFr...

 

InputSnapRateAttribute

Attribute used to retrieve the current input snap rate (also used for display)

Public variable

TAttribute< dou...

 

InputZoomToFitPadding

Padding applied to zoom-to-fit the input

Public variable

FOnActiveToolCh...

 

OnActiveToolChangedDelegate

Delegate that is invoked when a tool becomes active. Also fired when the tool goes inactive.

Public variable

FOnCurveArrayCh...

 

OnCurveArrayChanged

Delegate that's broadcast when the curve display changes.

Public variable

FOnSetBoolean

 

OnInputSnapEnabledChanged

Delegate that is invoked when the input snapping has been enabled/disabled

Public variable

FOnSetBoolean

 

OnOutputSnapEnabledChanged

Delegate that is invoked when the output snapping has been enabled/disabled

Public variable

TAttribute< boo...

 

OutputSnapEnabledAttribute

Attribute used to determine if we should snap output values

Public variable

TAttribute< dou...

 

OutputZoomToFitPadding

Padding applied to zoom-to-fit the output

Protected variable

TSet< FCurveMod...

 

PinnedCurves

Set of pinned curve models

Public variable

FCurveEditorSel...

 

Selection

Container holding the current key/tangent selection

Protected variable

UCurveEditorSet...

 

Settings

Curve editor settings object

Protected variable

int32

 

SuspendBroadcastCount

Counter to suspend broadcasting of changed delegates

Protected variable

TMap< FCurveEdi...

 

ToolExtensions

List of tool extensions we have initialized.

Protected variable

FCurveEditorTre...

 

Tree

Hierarchical information pertaining to curve data

Protected variable

TMap< FCurveMod...

 

TreeIDByCurveID

Map from curve model ID to its originating tree item

Protected variable

TWeakPtr< SCurv...

 

WeakPanel

Protected variable

TWeakPtr< ITime...

 

WeakTimeSliderController

Optional external Time Slider controller to sync with. Enables some additional functionality.

Protected variable

TWeakPtr< SCurv...

 

WeakView

Constructors

Name Description

Public function

FCurveEditor()

Constructor

Public function

FCurveEditor

(
    const FCurveEditor&
)

Non-copyable (shared ptr semantics)

Destructors

Name Description

Public function Virtual

~FCurveEditor()

Functions

Name Description

Public function

FCurveModelI...

 

AddCurve

(
    TUniquePtr< FCurveModel >&& InCurv...
)

Add a new curve to this editor

Public function

FCurveModelI...

 

AddCurveForTreeItem

(
    TUniquePtr< FCurveModel >&& InCurv...,
    FCurveEditorTreeItemID TreeItemID
)

Add a new curve to this editor

Public function

FCurveEditor...

 

AddTool

Public function

FCurveEditor...

 

AddTreeItem

(
    FCurveEditorTreeItemID ParentID
)

Add a new tree item to this curve editor

Public function

bool

 

ApplyBufferedCurves

(
    const TSet< FCurveModelID >& InCur...
)

Attempts to apply the buffered curve to the passed in curve set. Returns true on success.

Protected function

void

 

ApplyBufferedCurveToTarget

(
    const IBufferedCurveModel* Buf...,
    FCurveModel* TargetCurve
)

Apply a specific buffered curve to a specific target curve.

Public function Const

bool

 

AreBoundTransformUpdatesSuppressed()

Public function

void

 

BindCommands()

Bind UI commands that this curve editor responds to

Public function

void

 

BroadcastCurveChanged

(
    FCurveModel* InCurve
)

Public function Const

bool

 

CanFlattenOrStraightenSelection()

Do we currently have keys to flatten or straighten?

Public function Const

bool

 

CanPaste

(
    const FString& TextToImport
)

Returns whether the current clipboard contains objects which CurveEditor can paste

Public function

void

 

ClearSelectionRange()

Protected function Const

void

 

ConstructXGridLines

(
    TArray< float >& MajorGridLines,
    TArray< float >& MinorGridLines,
    TArray< FText >* MajorGridLabe...
)

Construct grid lines along the current display frame rate or time-base

Public function Const

void

 

CopySelection()

Copy the currently selected keys

Public function

void

 

CutSelection()

Cut the currently selected keys

Public function

void

 

DeleteSelection()

Delete the currently selected keys

Public function Const

FCurveModel ...

 

FindCurve

(
    FCurveModelID CurveID
)

Find a curve by its ID

Public function Const

const SCurve...

 

FindFirstInteractiveView

(
    FCurveModelID InCurveID
)

Public function

FCurveEditor...

 

FindTreeItem

(
    FCurveEditorTreeItemID ItemID
)

Finds a tree item from its ID

Public function Const

const FCurve...

 

FindTreeItem

(
    FCurveEditorTreeItemID ItemID
)

Finds a tree item from its ID

Public function

void

 

FlattenSelection()

Flatten the tangents on the selected keys

Public function Const

uint32

 

GetActiveCurvesSerialNumber()

Retrieve a serial number that is incremented any time a curve is added or removed

Public function Const

FCurveEditor...

 

GetAxisSnap()

Returned the cached struct for snapping editing movement to a specific axis based on user preferences.

Public function Const

const ICurve...

 

GetBounds()

Retrieve the current curve editor bounds implementation

Public function

ICurveEditor...

 

GetBounds()

Retrieve the current curve editor bounds implementation

Public function Const

const TArray...

 

GetBufferedCurves()

Return the array of buffered curves

Protected function Const

void

 

GetChildCurveModelIDs

(
    const FCurveEditorTreeItemID TreeIt...,
    TSet< FCurveModelID >& CurveModelI...
)

Public function Const

TSharedPtr< ...

 

GetCommands()

Retrieve this curve editor's command list

Public function Const

ICurveEditor...

 

GetCurrentTool()

Attempts to get the currently active tool.

Public function Const

void

 

GetCurveDrawParams

(
    TArray< FCurveDrawParams >& OutDra...
)

Populate the specified array with curve painting parameters

Public function Const

const TMap< ...

 

GetCurves()

Access all the curves currently contained in the Curve Editor regardless of visibility.

Public function Const

FCurveSnapMe...

 

GetCurveSnapMetrics

(
    FCurveModelID CurveModel
)

Generate a utility struct for snapping values

Public function Const

TAttribute< ...

 

GetDefaultKeyAttribute()

Attribute used for determining default attributes to apply to a newly create key

Public function Const

TAttribute< ...

 

GetDefaultKeyAttributes()

Public function Const

TSet< FCurve...

 

GetEditedCurves()

Public function Const

const TArray...

 

GetEditorExtensions()

Public function Const

TAttribute< ...

 

GetGridLineLabelFormatXAttribute()

Public function Const

TAttribute< ...

 

GetGridLineLabelFormatYAttribute()

Public function Virtual Const

void

 

GetGridLinesX

(
    TArray< float >& MajorGridLines,
    TArray< float >& MinorGridLines,
    TArray< FText >* MajorGridLabe...
)

Called by SCurveEditorPanel to determine where to draw grid lines along the X-axis.

Public function Const

TOptional< f...

 

GetGridSpacing()

Returns the value grid line spacing state

Public function Const

int32

 

GetNumBufferedCurves()

Return the number of stored Buffered Curves.

Public function Const

TSharedPtr< ...

 

GetPanel()

Public function Const

FCurveEditor...

 

GetPanelInputSpace()

Public function Const

const TSet< ...

 

GetPinnedCurves()

Public function Const

const TArray...

 

GetRootTreeItems()

Get const access to the entire set of root tree items

Public function

FCurveEditor...

 

GetSelection()

Public function Const

UCurveEditor...

 

GetSettings()

Retrieve this curve editor's settings

Public function Const

TSharedPtr< ...

 

GetTimeSliderController()

Retrieve the optional Time Slider Controller that this Curve Editor may be sync'd with.

Public function Const

const TMap< ...

 

GetToolExtensions()

Public function Const

const FCurve...

 

GetTree()

Access the curve editor tree.

Public function

FCurveEditor...

 

GetTree()

Access the curve editor tree.

Public function

FCurveEditor...

 

GetTreeItem

(
    FCurveEditorTreeItemID ItemID
)

Retrieve a tree item from its ID

Public function Const

const FCurve...

 

GetTreeItem

(
    FCurveEditorTreeItemID ItemID
)

Retrieve a tree item from its ID

Public function Const

const TMap< ...

 

GetTreeSelection()

Retrieve the current tree selection

Public function Const

ECurveEditor...

 

GetTreeSelectionState

(
    FCurveEditorTreeItemID TreeItemID
)

Check whether this tree item is selected

Public function Const

TSharedPtr< ...

 

GetView()

Protected function Const

void

 

ImportCopyBufferFromText

(
    const FString& TextToImport,
    TArray< UCurveEditorCopyBuffer*...
)

Public function

void

 

InitCurveEditor

(
    const FCurveEditorInitParams& InIn...
)

Public function

bool

 

IsBroadcasting()

Public function Const

bool

 

IsCurvePinned

(
    FCurveModelID InCurveID
)

Public function Const

bool

 

IsDoingDirectSelection()

Whether or not we are are doign a direct selection, could be used to see why a curve model is being created or destroyed, by direct selection or by sequencer filtering?

Public function Const

bool

 

IsInputSnappingEnabled()

Check whether keys should be snapped to the input display rate when dragging around

Public function Const

bool

 

IsOutputSnappingEnabled()

Check whether keys should be snapped to the output snap interval when dragging around

Public function Const

bool

 

IsToolActive

(
    const FCurveEditorToolID InToolID
)

Returns true of the specified tool is currently active.

Public function

void

 

JumpToEnd()

Public function

void

 

JumpToStart()

Public function

void

 

MakeToolActive

(
    const FCurveEditorToolID InToolID
)

Attempts to make the specified tool the active tool.

Public function

void

 

PasteKeys

(
    TSet< FCurveModelID > CurveModelIDs
)

Paste keys

Public function

void

 

PinCurve

(
    FCurveModelID InCurveID
)

Public function

void

 

RemoveAllCurves()

Remove all curves from this editor

Public function

void

 

RemoveAllTreeItems()

Remove all tree items fromt he curve editor

Public function

void

 

RemoveCurve

(
    FCurveModelID InCurveID
)

Remove a curve from this editor.

Public function

void

 

RemoveFromTreeSelection

(
    TArrayView< const FCurveEditorTreeI...
)

Removes items from the current tree selection.

Public function

void

 

RemoveTreeItem

(
    FCurveEditorTreeItemID ItemID
)

Remove a tree item from the curve editor

Public function

void

 

ResumeBroadcast()

Public function

void

 

SelectAllKeys()

Selection

Public function

void

 

SetAxisSnap

(
    const FCurveEditorAxisSnap& InAxis...
)

Public function

void

 

SetBounds

(
    TUniquePtr< ICurveEditorBounds >&&...
)

Assign a new bounds container to this curve editor

Public function

void

 

SetBufferedCurves

(
    const TSet< FCurveModelID >& InCur...
)

Create a copy of the specified set of curves.

Public function

void

 

SetCurveColorsForSelected()

Pick a curve color and set on selected

Public function

void

 

SetPanel

(
    TSharedPtr< SCurveEditorPanel > InP...
)

Public function

void

 

SetRandomCurveColorsForSelected()

Set random curve colors

Public function

void

 

SetSelectionRangeEnd()

Public function

void

 

SetSelectionRangeStart()

Selection range for ie. looping playback

Public function

void

 

SetTimeSliderController

Sets a Time Slider controller for this Curve Editor to be sync'd against. Can be null.

Public function

void

 

SetTreeSelection

(
    TArray< FCurveEditorTreeItemID >&&...
)

Set the tree selection directly

Public function

void

 

SetView

(
    TSharedPtr< SCurveEditorView > InPa...
)

Public function Const

bool

 

ShouldAutoFrame()

Check whether this curve editor can automatically zoom to the current selection

Public function

void

 

StepBackward()

Public function

void

 

StepForward()

Step forward/backward, jump to start/end

Public function

void

 

StepToNextKey()

Step to next or previous key from the current time

Public function

void

 

StepToPreviousKey()

Public function

void

 

StraightenSelection()

Straighten the tangents on the selected keys

Public function

void

 

SuppressBoundTransformUpdates

(
    bool bSuppress
)

Public function

void

 

SuspendBroadcast()

Suspend or resume broadcast of curve array changing

Public function

void

 

ToggleExpandCollapseNodes

(
    bool bRecursive
)

Toggle the expansion state of the selected nodes or all nodes if none selected

Public function

void

 

ToggleInputSnapping()

Public function

void

 

ToggleOutputSnapping()

Public function

void

 

TranslateSelectedKeys

(
    double SecondsToAdd
)

Nudge left or right

Public function

void

 

TranslateSelectedKeysLeft()

Nudge left or right

Public function

void

 

TranslateSelectedKeysRight()

Nudge left or right

Public function

void

 

UnpinCurve

(
    FCurveModelID InCurveID
)

Public function

void

 

UpdateGeometry

(
    const FGeometry& CurrentGeometry
)

Called by SCurveEditorPanel to update the allocated geometry for this curve editor.

Public function

void

 

ZoomToFit

(
    EAxisList::Type Axes
)

Zoom the curve editor to fit all the currently visible curves

Public function

void

 

ZoomToFitCurves

(
    TArrayView< const FCurveModelID > C...,
    EAxisList::Type Axes
)

Zoom the curve editor to fit the requested curves.

Protected function

void

 

ZoomToFitInternal

(
    EAxisList::Type Axes,
    const TMap< FCurveModelID, FKeyHand...
)

Internal zoom to fit implementation

Public function

void

 

ZoomToFitSelection

(
    EAxisList::Type Axes
)

Zoom the curve editor to fit all the current key selection.

Overridden from FEditorUndoClient

Name Description

Public function Virtual

void

 

PostUndo

(
    bool bSuccess
)

FEditorUndoClient.

Operators

Name Description

Public function

FCurveEditor...

 

operator=

(
    const FCurveEditor&
)