Add Lua binding to query current editor-mixer route

https://discourse.ardour.org/t/lua-editor-mixer-strip/109886
This commit is contained in:
Robin Gareus 2024-02-17 15:01:58 +01:00
parent 35686baa2b
commit 00c76e785c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 15 additions and 0 deletions

View File

@ -295,6 +295,8 @@ public:
void set_selection (std::list<Selectable*>, Selection::Operation);
void set_selected_midi_region_view (MidiRegionView&);
std::shared_ptr<ARDOUR::Route> current_mixer_stripable () const;
bool extend_selection_to_track (TimeAxisView&);
void play_selection ();

View File

@ -176,6 +176,15 @@ Editor::show_editor_mixer (bool yn)
#endif
}
std::shared_ptr<ARDOUR::Route>
Editor::current_mixer_stripable () const
{
if (current_mixer_strip) {
return current_mixer_strip->route ();
}
return std::shared_ptr<ARDOUR::Route> ();
}
#ifdef __APPLE__
void
Editor::ensure_all_elements_drawn ()

View File

@ -912,6 +912,8 @@ LuaInstance::register_classes (lua_State* L, bool sandbox)
.addFunction ("get_cut_buffer", &PublicEditor::get_cut_buffer)
.addRefFunction ("get_selection_extents", &PublicEditor::get_selection_extents)
.addFunction ("current_mixer_stripable", &PublicEditor::current_mixer_stripable)
.addFunction ("set_selection", &PublicEditor::set_selection)
.addFunction ("play_selection", &PublicEditor::play_selection)

View File

@ -242,6 +242,8 @@ public:
virtual void set_selection (std::list<Selectable*>, Selection::Operation) = 0;
virtual void set_selected_midi_region_view (MidiRegionView&) = 0;
virtual std::shared_ptr<ARDOUR::Route> current_mixer_stripable () const = 0;
virtual bool extend_selection_to_track (TimeAxisView&) = 0;
virtual void play_solo_selection(bool restart) = 0;
virtual void play_selection () = 0;