Scene Edit Detect
Runs Premiere Scene Edit Detection on explicit video clip items that all belong to one sequence; the owning sequence does not need to be active. The block temporarily replaces the owning sequence's live timeline selection and restores still-valid previously selected items after the operation. `CREATE_MARKERS` writes source-clip markers, `CREATE_SUBCLIPS` creates a Scene Edit Detection bin, and `APPLY_CUTS` splits timeline items. After `APPLY_CUTS`, completely relist affected tracks and do not reuse any pre-detection track-item references.
Inputs
| Input | Required | Value Kind | Types | Enum Values |
|---|---|---|---|---|
items | yes | expression | — | — |
operation | yes | expression | enum-string | APPLY_CUTS, CREATE_MARKERS, CREATE_SUBCLIPS |
onError | no | expression | enum-string | STOP, CONTINUE, RETURN_FALSE |
storeResultIn | no | variable-name | — | — |
Notes
- Runs Premiere's Scene Edit Detection on one video clip item or a list of video clip items.
- All items must belong to the same sequence. Audio items and mixed-sequence lists are rejected before the Premiere call.
operationis one of:APPLY_CUTS: splits the selected timeline clips at detected edit points.CREATE_MARKERS: creates Premiere's Scene Edit Detection markers.CREATE_SUBCLIPS: creates Premiere subclips according to the host operation.
- Empty
itemsis a no-op: the block logs that there is nothing to process, storesfalsewhen requested, and does not flush queued mutations. - For non-empty input, the block commits pending grouped Premiere actions before detection so the host sees current timeline state. This is an implementation-level flush, not a user-authored
transactionBoundary, and the block may appear inside loops. - The Premiere operation is asynchronous and executes outside an Action transaction. Cancellation is cooperative before and after the host call; Premiere may need to finish the current detection operation after cancellation has been requested.
storeResultIncontains only Premiere's boolean success result. Relist timeline items, markers, or project items to discover created results.APPLY_CUTScan invalidate wrappers and reference indices across affected tracks. After the call, relist the complete affected sequence/track state and do not reuse any track-item refs obtained before detection.- Premiere requires the owning sequence's live
TrackItemSelection; a separately constructed empty selection is not sufficient in the verified runtime. The block snapshots the visible selection, temporarily replaces it with the requested items, and restores still-valid previously selected items in afinallyphase. - The owning sequence does not need to be active. Runtime verification confirmed that a non-active sequence is mutated while the active sequence remains unchanged.
CREATE_MARKERSwrites markers to the source clip project item.CREATE_SUBCLIPScreates a sibling Scene Edit Detection bin containing the generated subclips.- When
APPLY_CUTSsplits an item that was selected before the call, that exact pre-cut wrapper is invalid afterward and cannot be restored. Other still-valid selected items are restored; structured logs report previous, working, and restored selection counts.
See Also
- Premiere Reference Paths: Explains Premiere reference path strings for project items, sequences, tracks, timeline items, markers, components, and parameters.
Examples
Apply Scene Edit Cuts With Adjacent Clips
Applies Premiere Scene Edit Detection to one middle clip, fully relists the track, and verifies that directly adjacent clips keep their timeline and source ranges.
Topics: scene edit detection, timeline cuts, neighbor clips, runtime validation
Source: patterns/ex-scene-edit-detect-apply-cuts-with-neighbors.json