Add API to query if a given MIDNAM is plugin-provided
This commit is contained in:
@@ -64,6 +64,7 @@ public:
|
||||
bool add_custom_midnam (const std::string& id, const std::string& midnam);
|
||||
bool update_custom_midnam (const std::string& id, const std::string& midnam);
|
||||
bool remove_custom_midnam (const std::string& id);
|
||||
bool is_custom_model (const std::string& model) const;
|
||||
|
||||
void add_search_path (const PBD::Searchpath& search_path);
|
||||
|
||||
|
||||
@@ -99,6 +99,13 @@ MidiPatchManager::update_custom_midnam (const std::string& id, const std::string
|
||||
return add_custom_midnam (id, midnam);
|
||||
}
|
||||
|
||||
bool
|
||||
MidiPatchManager::is_custom_model (const std::string& model) const
|
||||
{
|
||||
boost::shared_ptr<MIDINameDocument> midnam = document_by_model (model);
|
||||
return (midnam && midnam->file_path().substr(0, 7) == "custom:");
|
||||
}
|
||||
|
||||
void
|
||||
MidiPatchManager::add_midnam_files_from_directory(const std::string& directory_path)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user