From 69322ccd1b5b1c7e9633672bb84c2258300f3133 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 20 Feb 2019 16:26:51 +0100 Subject: Add unified API to select plugins to show on control-surfaces e.g. Mixbus channelstrip should be hidden, also mixbus' built-in effects are exposed as well-known controls --- libs/ardour/plugin_insert.cc | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'libs/ardour/plugin_insert.cc') diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 3d7fe164db..2af6e7b262 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -1580,16 +1580,34 @@ PluginInsert::has_midi_thru () const return false; } -#ifdef MIXBUS bool -PluginInsert::is_channelstrip () const { +PluginInsert::is_channelstrip () const +{ +#ifdef MIXBUS return _plugins.front()->is_channelstrip(); +#else + return false; +#endif } + bool -PluginInsert::is_nonbypassable () const { +PluginInsert::is_nonbypassable () const +{ +#ifdef MIXBUS return _plugins.front()->is_nonbypassable (); -} +#else + return false; #endif +} + +bool +PluginInsert::show_on_ctrl_surface () const +{ + if (is_channelstrip () || !is_nonbypassable ()) { + return false; + } + return true; +} bool PluginInsert::check_inplace () -- cgit v1.2.3