2026-07-08 22:33:29 +02:00
|
|
|
# `dapi context`
|
|
|
|
|
|
|
|
|
|
Essential context about the open project. Call this first to understand the canvas situation. Alias: `ctx`.
|
|
|
|
|
|
|
|
|
|
## Input
|
|
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
|
|
## Output
|
|
|
|
|
|
|
|
|
|
One JSON object:
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
{
|
2026-07-26 12:03:24 +02:00
|
|
|
projectId: string;
|
2026-07-08 22:33:29 +02:00
|
|
|
entityCount: number;
|
2026-07-26 12:03:24 +02:00
|
|
|
scenes: number[]; // ids of the top-level scenes
|
2026-07-08 22:33:29 +02:00
|
|
|
activeSceneId: number | null; // null if no scene is active
|
|
|
|
|
currentFrame: number; // current timeline playhead position, in frames
|
2026-07-26 12:03:24 +02:00
|
|
|
workarea: { start: number; end: number } | null; // seconds, null if the active scene has none
|
2026-07-08 22:33:29 +02:00
|
|
|
fontFamilies: string[];
|
2026-07-26 12:03:24 +02:00
|
|
|
selection: number[]; // ids of the selected nodes, empty if nothing is selected
|
2026-07-08 22:33:29 +02:00
|
|
|
}
|
|
|
|
|
```
|