s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
voting
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
Voting is open. Play the entries and pick the winner.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Classes
CurveEditor
chevron_left
Classes
class
CurveEditor
Constructors
functions
CurveEditor
Properties
data_object
ActiveCurve
data_object
CanRedo
data_object
CanUndo
data_object
Channels
data_object
ChannelsChanged
data_object
IsRange
data_object
NavigationBounds
data_object
RangeValue
data_object
RangeValueChanged
data_object
SavedPresets
data_object
SelectedIndex
data_object
SelectedKeys
data_object
ShowInspector
data_object
SnapIncrement
data_object
SnapToGrid
data_object
Value
data_object
ValueChanged
data_object
ViewMax
data_object
ViewMin
Methods
functions
AddKey
functions
ApplyPreset
functions
DeletePreset
functions
FitSelection
functions
FitView
functions
InsertKey
functions
MoveKey
functions
MoveSelection
functions
OnButtonTyped
functions
Redo
functions
RemoveSelected
functions
ReplacePreset
functions
SavePreset
functions
SelectAll
functions
SelectCurve
functions
SelectKey
functions
SelectKeys
functions
SetKeyMode
functions
SetSelectedMode
functions
SetTangent
functions
SetViewBounds
functions
SmoothSelected
functions
Undo
CurveEditor
Edits a Curve, CurveRange or named collection of curves. Keys retain the normalized coordinates used by Curve.Frame; numeric fields and axes display actual time and value units. View navigation never edits data.
class
Sandbox.UI
.
account_tree
extends
Panel
Sandbox.Engine
build
Constructors
1
CurveEditor
(
)
data_object
Properties
19
ActiveCurve
int
CanRedo
bool
CanUndo
bool
Channels
IReadOnlyList`1
Display and edit multiple independent curves. Assigning clears undo history without notifying.
ChannelsChanged
Action`1
Raised once per multi-curve edit, including undo and cancellation. The collection is a snapshot.
IsRange
bool
NavigationBounds
Nullable`1
Navigation bounds in actual time/value units. Only the time limits constrain navigation; vertical pan and zoom remain free. Bounds rescale with edits to the curve's axis ranges.
RangeValue
CurveRange
The two range boundaries. Assigning enables filled range editing; curves can have different ranges and key times.
RangeValueChanged
Action`1
Raised once for each change to either boundary in range mode.
SavedPresets
IReadOnlyList`1
User presets shared between curve editors and retained between sessions.
SelectedIndex
int
SelectedKeys
IReadOnlyCollection`1
ShowInspector
bool
Show the advanced key inspector beside the canvas. Hidden by default.
SnapIncrement
Vector2
Time and value snap increments in actual units, independent of zoom and grid labels. Non-positive values disable an axis.
SnapToGrid
bool
Snap dragged keys to SnapIncrement in actual time/value units. Ctrl temporarily enables snapping.
Value
Curve
The active curve. Assigning switches to single-curve mode and clears undo history without a change event.
ValueChanged
Action`1
Raised for user edits to the active curve, including undo and cancellation.
ViewMax
Vector2
ViewMin
Vector2
Visible time/value bounds in actual curve units. Changing the view does not edit keys.
functions
Methods
23
AddKey
(
time
,
value
)
Add a normalized key to the active curve. Near-duplicate times select the existing key.
ApplyPreset
(
preset
,
includeRanges
)
Replace the active curve's keys, optionally applying the preset's axis ranges too.
DeletePreset
(
index
)
Remove a saved preset.
FitSelection
(
)
FitView
(
)
InsertKey
(
time
)
Split the curve at a normalized time while retaining its shape, including stepped and linear segments.
MoveKey
(
index
,
time
,
value
)
Move one key, clamping its time before either neighbour.
MoveSelection
(
delta
)
Translate the selection by a delta in curve A's normalized display space, keeping group spacing intact.
OnButtonTyped
(
e
)
Redo
(
)
RemoveSelected
(
)
Delete selected keys while keeping at least one key per populated boundary.
ReplacePreset
(
index
)
Replace a saved preset with the active curve.
SavePreset
(
)
Save the active curve, including its axis ranges, as a reusable preset.
SelectAll
(
)
SelectCurve
(
index
)
Select a boundary without changing its data or the view.
SelectKey
(
index
)
SelectKeys
(
keys
)
SetKeyMode
(
index
,
mode
)
SetSelectedMode
(
mode
)
Set interpolation on all selected keys, across both boundaries, as a single edit.
SetTangent
(
index
,
incoming
,
slope
)
SetViewBounds
(
min
,
max
)
Set the visible time/value bounds in actual units.
SmoothSelected
(
)
Calculate monotone, locally clamped slopes. This is a one-shot operation stored as ordinary mirrored tangents.
Undo
(
)
Inheritance
Panel
CurveEditor
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.