engine: timeline panel leftover commands migrate to the facade (round 3)
- new primitives: clip_toggle_enabled (per-block flip), clip_set_linked, sequence_add_default_transition (config-driven, sequence timebase), node_set_label_many, node_set_color_label, plus observation getters - toggle-links, default transitions, enable toggles, color labels, and block renaming now go through the facade; the stray empty undo entry from block renaming is gone along the way - nest/multicam/waveform-sync stay as documented composites: they mix redo_now intermediate state, graph surgery, and app-side computation that a single primitive cannot express faithfully - the timeline panel's command execution paths are now fully migrated
This commit is contained in:
@@ -151,6 +151,33 @@ OAKENGINE_API int oakengine_node_set_label(OakEngineNode *self,
|
||||
OAKENGINE_API int oakengine_node_set_label_ex(OakEngineNode *self,
|
||||
const char *label, int undoable);
|
||||
|
||||
/**
|
||||
* @brief Set one label on several nodes at once (undoable, ONE command;
|
||||
* olive::NodeRenameCommand with all of them, like the application's
|
||||
* Core::label_nodes() after its rename dialog).
|
||||
*
|
||||
* `nodes` holds borrowed handles (the handle is the engine node pointer
|
||||
* in this family, so the application can pass its own nodes directly).
|
||||
* Every entry must be non-NULL. `label` may be NULL for an empty label.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_node_set_label_many(OakEngineNode **nodes,
|
||||
int count,
|
||||
const char *label);
|
||||
|
||||
/**
|
||||
* @brief Set the color-label index of several nodes at once (undoable,
|
||||
* ONE command; olive::NodeOverrideColorCommand per node, like the
|
||||
* timeline panel's color-label menu). `nodes` holds borrowed handles.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_node_set_color_label(OakEngineNode **nodes,
|
||||
int count, int color_index);
|
||||
|
||||
/**
|
||||
* @brief The node's color-label index (Node::get_override_color(); -1 =
|
||||
* none). -1 on a NULL handle.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_node_get_color_label(const OakEngineNode *self);
|
||||
|
||||
/* ---- Input introspection ---------------------------------------------------- */
|
||||
|
||||
/**
|
||||
|
||||
@@ -494,6 +494,52 @@ OAKENGINE_API int oakengine_sequence_delete_clips(
|
||||
OAKENGINE_API int oakengine_sequence_ripple_delete_range(
|
||||
OakEngineSequence *seq, int64_t in_ts, int64_t out_ts);
|
||||
|
||||
/**
|
||||
* @brief Flip the enabled flag of every given clip (undoable, ONE
|
||||
* command; olive::BlockEnableDisableCommand per clip with the inverted
|
||||
* current state -- the timeline panel's "toggle enabled"). Returns the
|
||||
* number of toggled clips (>= 0) or a negative code.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_clip_toggle_enabled(OakEngineClip **clips,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* @brief Link or unlink every given clip with each other (undoable, ONE
|
||||
* command; olive::NodeLinkManyCommand -- the timeline panel's
|
||||
* "link/unlink clips"). `linked` != 0 links, 0 unlinks.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_clip_set_linked(OakEngineClip **clips,
|
||||
int count, int linked);
|
||||
|
||||
/**
|
||||
* @brief Add the configured default transitions around the given clips
|
||||
* (undoable, ONE command;
|
||||
* olive::TimelineAddDefaultTransitionCommand -- the timeline panel's
|
||||
* "add default transitions").
|
||||
*
|
||||
* In/out transitions are created at clip boundaries that touch a gap or
|
||||
* the sequence edge, dual transitions between adjacent selected clips;
|
||||
* the transition node type and length come from the engine's config
|
||||
* (DefaultVideoTransition/DefaultAudioTransition/
|
||||
* DefaultTransitionLength), exactly like the application. The sequence's
|
||||
* frame-rate timebase is used for the length arithmetic.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_sequence_add_default_transition(
|
||||
OakEngineSequence *seq, OakEngineClip **clips, int count);
|
||||
|
||||
/**
|
||||
* @brief 1 if the clip is enabled (Block::is_enabled()). 0 on a NULL
|
||||
* handle.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_clip_is_enabled(const OakEngineClip *self);
|
||||
|
||||
/**
|
||||
* @brief 1 if the two clips are linked (Block::are_linked()). 0 on a
|
||||
* NULL handle.
|
||||
*/
|
||||
OAKENGINE_API int oakengine_clip_are_linked(const OakEngineClip *a,
|
||||
const OakEngineClip *b);
|
||||
|
||||
/**
|
||||
* @brief Delete the workarea range on every track (undoable, ONE command;
|
||||
* the application's TimelineWidget::delete_in_to_out).
|
||||
|
||||
Reference in New Issue
Block a user