13
0
livetrax/share/scripts/s_import_files.lua
Robin Gareus 07dea50456
Fix DnD import to grouped tracks
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.
2022-09-30 21:30:48 +02:00

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