Struct NodeContext
- Namespace
- Ofs
- Assembly
- Ofs.Api.dll
Evaluation context passed to every node callback. Pure value — safe on any thread. The params buffer is valid only for the duration of the call; do not store it.
public readonly struct NodeContext
Properties
IsCancelled
True once the host has cancelled this eval (a newer edit superseded it). A long discrete generator/modifier should poll this at loop boundaries and return early — the host discards a cancelled eval's output, so bailing only frees the worker thread sooner. Always false when the host supplies no cancellation (e.g. a preview eval).
public bool IsCancelled { get; }
Property Value
Params
The node parameter values. Valid only during the node callback.
public ReadOnlySpan<float> Params { get; }
Property Value
RegionEnd
End time of the region being evaluated, in seconds.
public double RegionEnd { get; }
Property Value
RegionStart
Start time of the region being evaluated, in seconds.
public double RegionStart { get; }
Property Value
Methods
Param(int, float)
Returns param i, or fallback if out of range.
public float Param(int i, float fallback = 0)