diff options
author | Robin Gareus <robin@gareus.org> | 2016-08-26 03:24:06 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-08-26 03:24:06 +0200 |
commit | 7837122e457385c6236d389058dd4dff177543ba (patch) | |
tree | f062a27eb7719a0dcd36695950e3d43dc5d77791 /gtk2_ardour/processor_box.h | |
parent | d6963630218d915f7c07da55c607bf99ec58ca63 (diff) |
add a static function to access processor selection from a Lua script
local ps = ArdourUI.processor_selection()
for p in ps:iter() do print (p:name ()) end
Diffstat (limited to 'gtk2_ardour/processor_box.h')
-rw-r--r-- | gtk2_ardour/processor_box.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 5dd7483be4..5f0115529c 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -454,6 +454,16 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD static Gtkmm2ext::Bindings* bindings; static void register_actions(); + typedef std::vector<boost::shared_ptr<ARDOUR::Processor> > ProcSelection; + + static ProcSelection current_processor_selection () { + ProcSelection ps; + if (_current_processor_box) { + _current_processor_box->get_selected_processors (ps); + } + return ps; + } + #ifndef NDEBUG static bool show_all_processors; #endif @@ -535,8 +545,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void ab_plugins (); - typedef std::vector<boost::shared_ptr<ARDOUR::Processor> > ProcSelection; - void cut_processors (const ProcSelection&); void copy_processors (const ProcSelection&); void delete_processors (const ProcSelection&); |