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
This commit is contained in:
Robin Gareus 2016-08-26 03:24:06 +02:00
parent d696363021
commit 7837122e45
2 changed files with 23 additions and 2 deletions

View file

@ -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&);