EditMode
Description:
public enum EditMode
When a single timeline element is edited within its timeline at some position, using edit, depending on the edit mode, its start, duration or in_point will be adjusted accordingly.
In addition, any clips may change layer.
Each edit can be broken down into a combination of three basic edits:
+ MOVE: This moves the start of the element to the edit position. + START-TRIM: This cuts or grows the start of the element, whilst maintaining the time at which its internal content appears in the timeline data output. If the element is made shorter, the data that appeared at the edit position will still appear in the timeline at the same time. If the element is made longer, the data that appeared at the previous start of the element will still appear in the timeline at the same time. + END-TRIM: Similar to START-TRIM, but the end of the element is cut or grown.
In particular, when editing a Clip:
+ MOVE: This will set the start of the clip to the edit position. + START-TRIM: This will set the start of the clip to the edit position. To keep the end time the same, the duration of the clip will be adjusted in the opposite direction. In addition, the in_point of the clip will be shifted such that the content that appeared at the new or previous start time, whichever is latest, still appears at the same timeline time. For example, if a frame appeared at the start of the clip, and the start of the clip is reduced, the in-point of the clip will also reduce such that the frame will appear later within the clip, but at the same timeline position. + END-TRIM: This will set the duration of the clip such that its end time will match the edit position.
When editing a Group:
+ MOVE: This will set the start of the clip to the edit position by shifting all of its children by the same amount. So each child will maintain their relative positions. + START-TRIM: If the group is made shorter, this will START-TRIM any clips under the group that start after the edit position to the same edit position. If the group is made longer, this will START-TRIM any clip under the group whose start matches the start of the group to the same edit position. + END-TRIM: If the group is made shorter, this will END-TRIM any clips under the group that end after the edit position to the same edit position. If the group is made longer, this will END-TRIM any clip under the group whose end matches the end of the group to the same edit position.
When editing a TrackElement, if it has a Clip parent, this will be edited instead. Otherwise it is edited in the same way as a Clip.
The layer priority of a Group is the lowest layer priority of any Clip underneath it. When a group is edited to a new layer priority, it will shift all clips underneath it by the same amount, such that their relative layers stay the same.
If the Timeline has a snapping_distance, then snapping may occur for some of the edges of the **main** edited element:
+ MOVE: The start or end edge of *any* Source under the element may be snapped. + START-TRIM: The start edge of a Source whose start edge touches the start edge of the element may snap. + END-TRIM: The end edge of a Source whose end edge touches the end edge of the element may snap.
These edges may snap with either the start or end edge of *any* other Source in the timeline that is not also being moved by the element, including those in different layers, if they are within the snapping_distance. During an edit, only up to one snap can occur. This will shift the edit position such that the snapped edges will touch once the edit has completed.
Note that snapping can cause an edit to fail where it would have otherwise succeeded because it may push the edit position such that the edit would result in an unsupported timeline configuration. Similarly, snapping can cause an edit to succeed where it would have otherwise failed.
For example, in RIPPLE acting on NONE, the main element is the MOVED toplevel of the edited element. Any source under the main MOVED toplevel may have its start or end edge snapped. Note, these sources cannot snap with each other. The edit may also push other elements, but any sources under these elements cannot snap, nor can they be snapped with. If a snap does occur, the MOVE of the toplevel *and* all other elements pushed by the ripple will be shifted by the same amount such that the snapped edges will touch.
You can also find more explanation about the behaviour of those modes at: trim, ripple and roll and clip management.