Restore Fader and Pan options to audio track automation menus. Hide the Amp processor from the plugin list. Fixes #3184.
git-svn-id: svn://localhost/ardour2/branches/3.0@7170 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
61a4655551
commit
6fbaa5403b
|
@ -196,14 +196,13 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<AutomationTimeAxisView>
|
gain_track.reset (new AutomationTimeAxisView (_session,
|
||||||
gain_track(new AutomationTimeAxisView (_session,
|
_route, _route->amp(), c,
|
||||||
_route, _route->amp(), c,
|
_editor,
|
||||||
_editor,
|
*this,
|
||||||
*this,
|
false,
|
||||||
false,
|
parent_canvas,
|
||||||
parent_canvas,
|
_route->amp()->describe_parameter(param)));
|
||||||
_route->amp()->describe_parameter(param)));
|
|
||||||
|
|
||||||
add_automation_child(Evoral::Parameter(GainAutomation), gain_track, show);
|
add_automation_child(Evoral::Parameter(GainAutomation), gain_track, show);
|
||||||
|
|
||||||
|
@ -248,30 +247,32 @@ AudioTimeAxisView::ensure_pan_views (bool show)
|
||||||
|
|
||||||
std::string const name = _route->panner()->describe_parameter (pan_control->parameter ());
|
std::string const name = _route->panner()->describe_parameter (pan_control->parameter ());
|
||||||
|
|
||||||
boost::shared_ptr<AutomationTimeAxisView> pan_track (
|
boost::shared_ptr<AutomationTimeAxisView> t (
|
||||||
new AutomationTimeAxisView (_session,
|
new AutomationTimeAxisView (_session,
|
||||||
_route, _route->panner(), pan_control,
|
_route, _route->panner(), pan_control,
|
||||||
_editor,
|
_editor,
|
||||||
*this,
|
*this,
|
||||||
false,
|
false,
|
||||||
parent_canvas,
|
parent_canvas,
|
||||||
name));
|
name)
|
||||||
|
);
|
||||||
|
|
||||||
add_automation_child (*p, pan_track, show);
|
pan_tracks.push_back (t);
|
||||||
|
add_automation_child (*p, t, show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::toggle_gain_track ()
|
AudioTimeAxisView::update_gain_track_visibility ()
|
||||||
{
|
{
|
||||||
bool showit = gain_automation_item->get_active();
|
bool const showit = gain_automation_item->get_active();
|
||||||
|
|
||||||
if (showit != gain_track->marked_for_display()) {
|
if (showit != gain_track->marked_for_display()) {
|
||||||
if (showit) {
|
if (showit) {
|
||||||
gain_track->set_marked_for_display (true);
|
gain_track->set_marked_for_display (true);
|
||||||
gain_track->canvas_display->show();
|
gain_track->canvas_display()->show();
|
||||||
gain_track->canvas_background->show();
|
gain_track->canvas_background()->show();
|
||||||
gain_track->get_state_node()->add_property ("shown", X_("yes"));
|
gain_track->get_state_node()->add_property ("shown", X_("yes"));
|
||||||
} else {
|
} else {
|
||||||
gain_track->set_marked_for_display (false);
|
gain_track->set_marked_for_display (false);
|
||||||
|
@ -288,38 +289,31 @@ AudioTimeAxisView::toggle_gain_track ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::gain_hidden ()
|
AudioTimeAxisView::update_pan_track_visibility ()
|
||||||
{
|
{
|
||||||
gain_track->get_state_node()->add_property (X_("shown"), X_("no"));
|
bool const showit = pan_automation_item->get_active();
|
||||||
|
|
||||||
if (gain_automation_item && !_hidden) {
|
for (list<boost::shared_ptr<AutomationTimeAxisView> >::iterator i = pan_tracks.begin(); i != pan_tracks.end(); ++i) {
|
||||||
gain_automation_item->set_active (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
|
if (showit != (*i)->marked_for_display()) {
|
||||||
}
|
if (showit) {
|
||||||
|
(*i)->set_marked_for_display (true);
|
||||||
void
|
(*i)->canvas_display()->show();
|
||||||
AudioTimeAxisView::toggle_pan_track ()
|
(*i)->canvas_background()->show();
|
||||||
{
|
(*i)->get_state_node()->add_property ("shown", X_("yes"));
|
||||||
bool showit = pan_automation_item->get_active();
|
} else {
|
||||||
|
(*i)->set_marked_for_display (false);
|
||||||
if (showit != pan_track->marked_for_display()) {
|
(*i)->hide ();
|
||||||
if (showit) {
|
(*i)->get_state_node()->add_property ("shown", X_("no"));
|
||||||
pan_track->set_marked_for_display (true);
|
}
|
||||||
pan_track->canvas_display->show();
|
|
||||||
pan_track->canvas_background->show();
|
/* now trigger a redisplay */
|
||||||
pan_track->get_state_node()->add_property ("shown", X_("yes"));
|
if (!no_redraw) {
|
||||||
} else {
|
_route->gui_changed (X_("visible_tracks"), (void *) 0); /* EMIT_SIGNAL */
|
||||||
pan_track->set_marked_for_display (false);
|
}
|
||||||
pan_track->hide ();
|
|
||||||
pan_track->get_state_node()->add_property ("shown", X_("no"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now trigger a redisplay */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::show_all_automation ()
|
AudioTimeAxisView::show_all_automation ()
|
||||||
|
@ -330,7 +324,7 @@ AudioTimeAxisView::show_all_automation ()
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
|
|
||||||
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -342,7 +336,7 @@ AudioTimeAxisView::show_existing_automation ()
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
|
|
||||||
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -353,7 +347,7 @@ AudioTimeAxisView::hide_all_automation ()
|
||||||
RouteTimeAxisView::hide_all_automation();
|
RouteTimeAxisView::hide_all_automation();
|
||||||
|
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -439,3 +433,39 @@ AudioTimeAxisView::update_control_names ()
|
||||||
controls_ebox.set_name (controls_base_unselected_name);
|
controls_ebox.set_name (controls_base_unselected_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioTimeAxisView::build_automation_action_menu ()
|
||||||
|
{
|
||||||
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
RouteTimeAxisView::build_automation_action_menu ();
|
||||||
|
|
||||||
|
MenuList& automation_items = automation_action_menu->items ();
|
||||||
|
|
||||||
|
automation_items.push_back (CheckMenuElem (_("Fader"), sigc::mem_fun (*this, &AudioTimeAxisView::update_gain_track_visibility)));
|
||||||
|
gain_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
|
||||||
|
gain_automation_item->set_active (gain_track->marked_for_display ());
|
||||||
|
|
||||||
|
automation_items.push_back (CheckMenuElem (_("Pan"), sigc::mem_fun (*this, &AudioTimeAxisView::update_pan_track_visibility)));
|
||||||
|
pan_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
|
||||||
|
pan_automation_item->set_active (pan_tracks.front()->marked_for_display ());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> wp)
|
||||||
|
{
|
||||||
|
/* we use this override to veto the Amp processor from the plugin menu,
|
||||||
|
as its automation lane can be accessed using the special "Fader" menu
|
||||||
|
option
|
||||||
|
*/
|
||||||
|
|
||||||
|
boost::shared_ptr<Processor> p = wp.lock ();
|
||||||
|
if (!p) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (boost::dynamic_pointer_cast<Amp> (p) == 0) {
|
||||||
|
RouteTimeAxisView::add_processor_to_subplugin_menu (wp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
|
|
||||||
void append_extra_display_menu_items ();
|
void append_extra_display_menu_items ();
|
||||||
Gtk::Menu* build_mode_menu();
|
Gtk::Menu* build_mode_menu();
|
||||||
|
void build_automation_action_menu ();
|
||||||
|
|
||||||
void show_all_automation ();
|
void show_all_automation ();
|
||||||
void show_existing_automation ();
|
void show_existing_automation ();
|
||||||
|
@ -102,6 +103,16 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
|
|
||||||
void ensure_pan_views (bool show = true);
|
void ensure_pan_views (bool show = true);
|
||||||
void update_control_names ();
|
void update_control_names ();
|
||||||
|
|
||||||
|
void update_gain_track_visibility ();
|
||||||
|
void update_pan_track_visibility ();
|
||||||
|
|
||||||
|
void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
|
||||||
|
|
||||||
|
boost::shared_ptr<AutomationTimeAxisView> gain_track;
|
||||||
|
Gtk::CheckMenuItem* gain_automation_item;
|
||||||
|
std::list<boost::shared_ptr<AutomationTimeAxisView> > pan_tracks;
|
||||||
|
Gtk::CheckMenuItem* pan_automation_item;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_audio_time_axis_h__ */
|
#endif /* __ardour_audio_time_axis_h__ */
|
||||||
|
|
|
@ -413,11 +413,13 @@ RouteTimeAxisView::build_automation_action_menu ()
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Hide All Automation"),
|
items.push_back (MenuElem (_("Hide All Automation"),
|
||||||
sigc::mem_fun(*this, &RouteTimeAxisView::hide_all_automation)));
|
sigc::mem_fun(*this, &RouteTimeAxisView::hide_all_automation)));
|
||||||
|
|
||||||
|
items.push_back (SeparatorElem ());
|
||||||
|
|
||||||
/* Attach the plugin submenu. It may have previously been used elsewhere,
|
/* Attach the plugin submenu. It may have previously been used elsewhere,
|
||||||
so it was detached above */
|
so it was detached above */
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Plugins"), subplugin_menu));
|
items.push_back (MenuElem (_("Plugins"), subplugin_menu));
|
||||||
items.back().set_sensitive (!subplugin_menu.items().empty());
|
items.back().set_sensitive (!subplugin_menu.items().empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ protected:
|
||||||
|
|
||||||
void processors_changed (ARDOUR::RouteProcessorChange);
|
void processors_changed (ARDOUR::RouteProcessorChange);
|
||||||
|
|
||||||
void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
|
virtual void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
|
||||||
void remove_processor_automation_node (ProcessorAutomationNode* pan);
|
void remove_processor_automation_node (ProcessorAutomationNode* pan);
|
||||||
|
|
||||||
void processor_menu_item_toggled (RouteTimeAxisView::ProcessorAutomationInfo*,
|
void processor_menu_item_toggled (RouteTimeAxisView::ProcessorAutomationInfo*,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user