I want to export all markers in a project.
Would you recommend that I implement it as:
a) adapt MultiFileExportDialog to handle markers
b) create a variant of MultiFileExportDialog specific for markers
c) copy all markers into playlist
My current workflow is to mark all ranges I want to export. Then I step through every marker range using hotkeys:
S, (split at start)
>, (go to range end marker)
S, (split at end)
<, (go to range start marker)
Ctrl+Space, (select clip under playhead)
Ctrl+C, (copy clip)
Ctrl+Z, Ctrl+Z, (undo splitting)
Shift-A, (insert into playlist)
>, > (go to next range)
I could record this using AutoHotkey, but it becomes messy when 2 marker ranges overlap.
I would also like to use marker names as export file names. This is currently not possible, even for single marker exports.
Therefore, I would like to implement a solution into Shotcut.
a) MultiFileExportDialog takes an argument Mlt::Playlist *playlist; that could be refactored.
b) Or, if Mlt::Playlist and the marker struct do not share a common superinterface, an export dialog specific for markers could be built.
c) Or, a function for transferring all markers into the playlist, setting their names as clip names, could be built. A button for this could be put into the marker dock.
I do not think the dialog should know about markers. But you might have to adapt the interface to work for both. Maybe you could create a playlist from the marker segments and pass that in. For each entry in the generated playlist, set the name to the marker name so that the existing “Name” field in the dialog would work with marker names.
Can you tell me where the title of a playlist item shall be stored?
I guess it may be in producer, a concept which I don’t understand yet.
Assuming so, does every playlist item need its own producer, or should MAIN.multitrack() be the producer for all playlist items derived from a marker?
There is a caption that is shown at the top of the properties panel and in the “clip” column of the playlist. It is stored on the producer using the shotcut:caption property. This is the property that is used for the “name” field of the MultiFileExportDialog
Yes. Each entry in the temporary playlist will be a producer that is “cut” from MAIN.multitrack(). You make a cut by specifying the in/out points from the original producer. The in/out points are the stop/end properties from the marker.