2 ["type"] = "EditorAction",
4 author = "Ardour Lua Taskforce",
5 description = [[Change Metering Point for tracks in your session.]]
8 function factory () return function ()
10 local dialog_options = {
11 { type = "label", colspan = 5, title = "" },
12 { type = "radio", col = 1, colspan = 7, key = "select", title = "", values ={ ["Set All: Input"] = ARDOUR.MeterPoint.MeterInput, ["Set All: Pre Fader"] = ARDOUR.MeterPoint.MeterPreFader, ["Set All: Post Fader"] = ARDOUR.MeterPoint.MeterPostFader, ["Set All: Output"] = ARDOUR.MeterPoint.MeterOutput, ["Set All: Custom"] = ARDOUR.MeterPoint.MeterCustom}, default = "Set All: Input"},
13 { type = "label", colspan = 5, title = "" },
14 { type = "checkbox", col=1, colspan = 1, key = "select-tracks", default = true, title = "Selected tracks only"},
15 { type = "checkbox", col=2, colspan = 1, key = "rec-tracks", default = true, title = "Record Enabled tracks only"},
16 { type = "label", colspan = 5, title = "" },
19 local rv = LuaDialog.Dialog("Change all Meter Taps:", dialog_options):run()
21 meter_point = rv['select']
22 if rv['select-tracks'] then
23 local sel = Editor:get_selection ()
24 for route in sel.tracks:routelist():iter() do
25 if not(route:to_track():isnil()) then
26 if rv['rec-tracks'] then
27 if route:rec_enable_control():get_value() == 1.0 then
28 route:to_track():set_meter_point(meter_point, false)
31 route:to_track():set_meter_point(meter_point, false)
36 for route in Session:get_routes():iter() do
37 if not(route:to_track():isnil()) then
38 if rv['rec-tracks'] then
39 if route:rec_enable_control():get_value() == 1.0 then
40 route:to_track():set_meter_point(meter_point, false)
43 route:to_track():set_meter_point(meter_point, false)