Class Axes
- Namespace
- Ofs
- Assembly
- Ofs.Api.dll
The set of funscript axes. Reads are cheap and direct through the indexer; writes go through a buffered Edit() finished with Commit().
public sealed class Axes
- Inheritance
-
objectAxes
Properties
Active
The currently focused axis. There is always an active axis (it defaults to L0, and L0 can never be removed or hidden), so this never returns null.
public StandardAxis Active { get; }
Property Value
Existing
The roles that exist in the project (shown, holding data, or locked). A plugin can only
read or edit an existing axis — indexing or activating an absent role throws, and there is no API
to create one (axis lifecycle is owned by the host/UI). Guard with Existing.Contains(role)
before touching a role that isn't guaranteed (L0 always exists; scratch axes may not).
public IReadOnlySet<StandardAxis> Existing { get; }
Property Value
this[StandardAxis]
A read view of the axis, refreshed with the host's current actions and selection. Valid for the current frame — read fresh each frame, do not cache.
public Axis this[StandardAxis role] { get; }
Parameters
roleStandardAxis
Property Value
Exceptions
- InvalidOperationException
The role does not exist in the project. Plugins can only access axes that already exist and cannot create one — guard with Existing
.Contains(role).
Methods
SetActive(StandardAxis)
Makes role the active axis.
public void SetActive(StandardAxis role)
Parameters
roleStandardAxis
Exceptions
- InvalidOperationException
The role does not exist in the project — guard with Existing
.Contains(role). Plugins cannot create or activate an absent axis.
Events
ActiveChanged
Raised when the focused axis changes. The argument is the new active role.
public event Action<StandardAxis>? ActiveChanged
Event Type
Modified
Raised when an axis's actions change. The argument is the affected role.
public event Action<StandardAxis>? Modified
Event Type
ProjectChanged
Raised when a different project is loaded (so cached axis data should be re-read).
public event Action? ProjectChanged