Robin Gareus
07dea50456
Import via Drag/Drop previously worked by selecting a track, and then importing to the selected track. This approach fails when the selected track is in a track-group, and selecting the track also selects other tracks of different type. Now the track to drop onto is passed directly passed through to ::finish_bringing_in_material as existing_track.
15 lines
472 B
Lua
15 lines
472 B
Lua
ardour { ["type"] = "Snippet", name = "Import File(s) Example" }
|
|
|
|
function factory (params) return function ()
|
|
local files = C.StringVector();
|
|
|
|
files:push_back("/tmp/test.wav")
|
|
|
|
local pos = Temporal.timepos_t(0)
|
|
Editor:do_import (files,
|
|
Editing.ImportDistinctFiles, Editing.ImportAsTrack, ARDOUR.SrcQuality.SrcBest,
|
|
ARDOUR.MidiTrackNameSource.SMFTrackName, ARDOUR.MidiTempoMapDisposition.SMFTempoIgnore,
|
|
pos, ARDOUR.PluginInfo(), ARDOUR.Track(), false)
|
|
|
|
end end
|