Updated the context command description for clarity on spatial and temporal references. Refactored the context handling to include selected node IDs, improving the context response structure. Additionally, modified the selection utility to streamline the retrieval of selected node IDs, ensuring consistency across the editor API.
681 B
681 B
dapi context
Essential context about the open project. Call this first to understand the canvas situation. Alias: ctx.
Input
None.
Output
One JSON object:
{
projectId: string;
entityCount: number;
scenes: number[]; // ids of the top-level scenes
activeSceneId: number | null; // null if no scene is active
currentFrame: number; // current timeline playhead position, in frames
workarea: { start: number; end: number } | null; // seconds, null if the active scene has none
fontFamilies: string[];
selection: number[]; // ids of the selected nodes, empty if nothing is selected
}