Add flag to explicitly hide a control
Eventually this is to replace a literal name "hidden" that is currently used as hack throughout Ardour's codebase.
This commit is contained in:
parent
66d1b51392
commit
28f15d3fa6
@ -178,7 +178,9 @@ Automatable::add_control(boost::shared_ptr<Evoral::Control> ac)
|
|||||||
ControlSet::add_control (ac);
|
ControlSet::add_control (ac);
|
||||||
|
|
||||||
if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
|
if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
|
||||||
_can_automate_list.insert (param);
|
if (!actl || !(actl->flags() & Controllable::HiddenControl)) {
|
||||||
|
can_automate (param);
|
||||||
|
}
|
||||||
automation_list_automation_state_changed (param, al->automation_state ()); // sync everything up
|
automation_list_automation_state_changed (param, al->automation_state ()); // sync everything up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -264,7 +266,9 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
|
|||||||
boost::shared_ptr<AutomationControl> actl = automation_control (param);
|
boost::shared_ptr<AutomationControl> actl = automation_control (param);
|
||||||
if (actl && (*niter)->children().size() > 0 && Config->get_limit_n_automatables () > 0) {
|
if (actl && (*niter)->children().size() > 0 && Config->get_limit_n_automatables () > 0) {
|
||||||
actl->clear_flag (Controllable::NotAutomatable);
|
actl->clear_flag (Controllable::NotAutomatable);
|
||||||
can_automate (param);
|
if (!(actl->flags() & Controllable::HiddenControl) && actl->name() != X_("hidden")) {
|
||||||
|
can_automate (param);
|
||||||
|
}
|
||||||
info << "Marked parmater as automatable" << endl;
|
info << "Marked parmater as automatable" << endl;
|
||||||
} else {
|
} else {
|
||||||
warning << "Ignored automation data for non-automatable parameter" << endl;
|
warning << "Ignored automation data for non-automatable parameter" << endl;
|
||||||
|
@ -41,6 +41,7 @@ setup_libpbd_enums ()
|
|||||||
REGISTER_CLASS_ENUM (Controllable, RealTime);
|
REGISTER_CLASS_ENUM (Controllable, RealTime);
|
||||||
REGISTER_CLASS_ENUM (Controllable, NotAutomatable);
|
REGISTER_CLASS_ENUM (Controllable, NotAutomatable);
|
||||||
REGISTER_CLASS_ENUM (Controllable, InlineControl);
|
REGISTER_CLASS_ENUM (Controllable, InlineControl);
|
||||||
|
REGISTER_CLASS_ENUM (Controllable, HiddenControl);
|
||||||
REGISTER_BITS (controllable_flags);
|
REGISTER_BITS (controllable_flags);
|
||||||
|
|
||||||
REGISTER_CLASS_ENUM (Controllable, InverseGroup);
|
REGISTER_CLASS_ENUM (Controllable, InverseGroup);
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
RealTime = 0x04,
|
RealTime = 0x04,
|
||||||
NotAutomatable = 0x08,
|
NotAutomatable = 0x08,
|
||||||
InlineControl = 0x10,
|
InlineControl = 0x10,
|
||||||
|
HiddenControl = 0x20,
|
||||||
};
|
};
|
||||||
|
|
||||||
Controllable (const std::string& name, Flag f = Flag (0));
|
Controllable (const std::string& name, Flag f = Flag (0));
|
||||||
|
Loading…
Reference in New Issue
Block a user