Prepare AutomationTimeAxisView for non-route (VCA) automation
This commit is contained in:
parent
d08b81d33d
commit
b0f68a0f5c
@ -75,7 +75,7 @@ bool AutomationTimeAxisView::have_name_font = false;
|
||||
*/
|
||||
AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
Session* s,
|
||||
boost::shared_ptr<Route> r,
|
||||
boost::shared_ptr<Stripable> strip,
|
||||
boost::shared_ptr<Automatable> a,
|
||||
boost::shared_ptr<AutomationControl> c,
|
||||
Evoral::Parameter p,
|
||||
@ -88,7 +88,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
)
|
||||
: SessionHandlePtr (s)
|
||||
, TimeAxisView (s, e, &parent, canvas)
|
||||
, _route (r)
|
||||
, _stripable (strip)
|
||||
, _control (c)
|
||||
, _automatable (a)
|
||||
, _parameter (p)
|
||||
@ -113,9 +113,9 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
tipname += nom;
|
||||
_name = tipname;
|
||||
|
||||
CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
|
||||
CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name()));
|
||||
CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name()));
|
||||
CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, strip->name()));
|
||||
CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, strip->name()));
|
||||
CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, strip->name()));
|
||||
|
||||
if (!have_name_font) {
|
||||
name_font = get_font_for_style (X_("AutomationTrackName"));
|
||||
@ -297,8 +297,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
automation_state_changed ();
|
||||
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler));
|
||||
|
||||
_route->DropReferences.connect (
|
||||
_route_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context ()
|
||||
_stripable->DropReferences.connect (
|
||||
_stripable_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context ()
|
||||
);
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ AutomationTimeAxisView::~AutomationTimeAxisView ()
|
||||
void
|
||||
AutomationTimeAxisView::route_going_away ()
|
||||
{
|
||||
_route.reset ();
|
||||
_stripable.reset ();
|
||||
}
|
||||
|
||||
void
|
||||
@ -490,9 +490,9 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
if (_canvas_display->visible() && _route) {
|
||||
if (_canvas_display->visible() && _stripable) {
|
||||
/* only emit the signal if the height really changed and we were visible */
|
||||
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
|
||||
_stripable->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -916,14 +916,14 @@ AutomationTimeAxisView::lines () const
|
||||
string
|
||||
AutomationTimeAxisView::state_id() const
|
||||
{
|
||||
if (_automatable != _route && _control) {
|
||||
if (_automatable != _stripable && _control) {
|
||||
return string("automation ") + _control->id().to_s();
|
||||
} else if (_parameter) {
|
||||
const string parameter_str = PBD::to_string (_parameter.type()) + "/" +
|
||||
PBD::to_string (_parameter.id()) + "/" +
|
||||
PBD::to_string (_parameter.channel ());
|
||||
|
||||
return string("automation ") + PBD::to_string(_route->id()) + " " + parameter_str;
|
||||
return string("automation ") + PBD::to_string(_stripable->id()) + " " + parameter_str;
|
||||
} else {
|
||||
error << "Automation time axis has no state ID" << endmsg;
|
||||
return "";
|
||||
@ -1048,18 +1048,18 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
|
||||
PresentationInfo const &
|
||||
AutomationTimeAxisView::presentation_info () const
|
||||
{
|
||||
return _route->presentation_info();
|
||||
return _stripable->presentation_info();
|
||||
}
|
||||
|
||||
boost::shared_ptr<Stripable>
|
||||
AutomationTimeAxisView::stripable () const
|
||||
{
|
||||
return _route;
|
||||
return _stripable;
|
||||
}
|
||||
|
||||
Gdk::Color
|
||||
AutomationTimeAxisView::color () const
|
||||
{
|
||||
return gdk_color_from_rgb (_route->presentation_info().color());
|
||||
return gdk_color_from_rgb (_stripable->presentation_info().color());
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
class Route;
|
||||
class Stripable;
|
||||
class AutomationControl;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ class ItemCounts;
|
||||
class AutomationTimeAxisView : public TimeAxisView {
|
||||
public:
|
||||
AutomationTimeAxisView (ARDOUR::Session*,
|
||||
boost::shared_ptr<ARDOUR::Route>,
|
||||
boost::shared_ptr<ARDOUR::Stripable>,
|
||||
boost::shared_ptr<ARDOUR::Automatable>,
|
||||
boost::shared_ptr<ARDOUR::AutomationControl>,
|
||||
Evoral::Parameter,
|
||||
@ -117,8 +117,8 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||
|
||||
bool has_automation () const;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Route> parent_route () {
|
||||
return _route;
|
||||
boost::shared_ptr<ARDOUR::Stripable> parent_stripable () {
|
||||
return _stripable;
|
||||
}
|
||||
|
||||
bool show_regions () const {
|
||||
@ -132,11 +132,11 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||
may be set. In this case, _automatable is likely _route so the
|
||||
controller will send immediate events out the route's MIDI port. */
|
||||
|
||||
/** parent route */
|
||||
boost::shared_ptr<ARDOUR::Route> _route;
|
||||
/** parent strip */
|
||||
boost::shared_ptr<ARDOUR::Stripable> _stripable;
|
||||
/** control */
|
||||
boost::shared_ptr<ARDOUR::AutomationControl> _control;
|
||||
/** control owner; may be _route, something else (e.g. a pan control), or NULL */
|
||||
/** control owner; may be _stripable, something else (e.g. a pan control), or NULL */
|
||||
boost::shared_ptr<ARDOUR::Automatable> _automatable;
|
||||
/** controller owner */
|
||||
boost::shared_ptr<AutomationController> _controller;
|
||||
@ -190,7 +190,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||
void interpolation_changed (ARDOUR::AutomationList::InterpolationStyle);
|
||||
|
||||
PBD::ScopedConnectionList _list_connections;
|
||||
PBD::ScopedConnectionList _route_connections;
|
||||
PBD::ScopedConnectionList _stripable_connections;
|
||||
|
||||
void entered ();
|
||||
void exited ();
|
||||
|
@ -1145,7 +1145,7 @@ Selection::get_state () const
|
||||
t->set_property (X_("id"), rtv->route()->id ());
|
||||
} else if (atv) {
|
||||
XMLNode* t = node->add_child (X_("AutomationView"));
|
||||
t->set_property (X_("id"), atv->parent_route()->id ());
|
||||
t->set_property (X_("id"), atv->parent_stripable()->id ());
|
||||
t->set_property (X_("parameter"), EventTypeMap::instance().to_symbol (atv->parameter ()));
|
||||
}
|
||||
}
|
||||
@ -1176,7 +1176,7 @@ Selection::get_state () const
|
||||
|
||||
XMLNode* r = node->add_child (X_("ControlPoint"));
|
||||
r->set_property (X_("type"), "track");
|
||||
r->set_property (X_("route-id"), atv->parent_route()->id ());
|
||||
r->set_property (X_("route-id"), atv->parent_stripable()->id ());
|
||||
r->set_property (X_("automation-list-id"), (*i)->line().the_list()->id ());
|
||||
r->set_property (X_("parameter"), EventTypeMap::instance().to_symbol ((*i)->line().the_list()->parameter ()));
|
||||
r->set_property (X_("view-index"), (*i)->view_index());
|
||||
@ -1305,7 +1305,7 @@ Selection::set_state (XMLNode const & node, int)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (route_id);
|
||||
RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (route_id); // XXX may also be VCA
|
||||
vector <ControlPoint *> cps;
|
||||
|
||||
if (rtv) {
|
||||
|
Loading…
Reference in New Issue
Block a user