13
0

Add API to query all AutomationControls from an Automtable

This is in preparation for selective MixerScene restore.
This commit is contained in:
Robin Gareus 2022-10-17 06:42:49 +02:00
parent d29f7a4e00
commit 800d07a633
4 changed files with 28 additions and 0 deletions

View File

@ -55,6 +55,8 @@ public:
virtual ~Automatable();
virtual void automatables (AutomationControlSet&) const;
static bool skip_saving_automation; // to be used only by session-state
boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id);

View File

@ -258,6 +258,8 @@ public:
boost::shared_ptr<AutomationControl> automation_control_recurse (PBD::ID const & id) const;
void automatables (AutomationControlSet&) const;
/* special processors */
boost::shared_ptr<InternalSend> monitor_send() const { return _monitor_send; }

View File

@ -610,6 +610,17 @@ Automatable::control_factory(const Evoral::Parameter& param)
return boost::shared_ptr<Evoral::Control>(control);
}
void
Automatable::automatables (AutomationControlSet& s) const
{
for (auto const& i : _controls) {
boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (i.second);
if (ac) {
s.insert (ac);
}
}
}
boost::shared_ptr<AutomationControl>
Automatable::automation_control (PBD::ID const & id) const
{

View File

@ -6306,6 +6306,19 @@ Route::automation_control_recurse (PBD::ID const & id) const
return boost::shared_ptr<AutomationControl> ();
}
void
Route::automatables (AutomationControlSet& s) const
{
Automatable::automatables (s);
if (_pannable) {
_pannable->automatables (s);
}
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
for (auto const& i : _processors) {
i->automatables (s);
}
}
SlavableControlList
Route::slavables () const
{