VST3 path customization
Allow to add custom VST3 search to default. the VST3_PATH environment variable is use to pre-seed this path at first start.
This commit is contained in:
parent
c6222caea6
commit
76c86ee96d
@ -237,6 +237,7 @@ CONFIG_VARIABLE (uint32_t, limit_n_automatables, "limit-n-automatables", 512)
|
||||
/* custom user plugin paths */
|
||||
CONFIG_VARIABLE (std::string, plugin_path_vst, "plugin-path-vst", "@default@")
|
||||
CONFIG_VARIABLE (std::string, plugin_path_lxvst, "plugin-path-lxvst", "@default@")
|
||||
CONFIG_VARIABLE (std::string, plugin_path_vst3, "plugin-path-vst3", "@default@")
|
||||
|
||||
/* denormal management */
|
||||
|
||||
|
@ -288,6 +288,14 @@ PluginManager::PluginManager ()
|
||||
if (Config->get_plugin_path_vst() == X_("@default@")) {
|
||||
Config->set_plugin_path_vst(get_default_windows_vst_path());
|
||||
}
|
||||
if (Config->get_plugin_path_vst3() == X_("@default@")) {
|
||||
/* This path is currently only added to the existing path */
|
||||
if ((s = getenv ("VST3_PATH"))) {
|
||||
Config->set_plugin_path_vst3 (s);
|
||||
} else {
|
||||
Config->set_plugin_path_vst3 ("");
|
||||
}
|
||||
}
|
||||
|
||||
if (_instance == 0) {
|
||||
_instance = this;
|
||||
@ -1632,9 +1640,14 @@ PluginManager::vst3_discover_from_path (string const& path, bool cache_only)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("VST3: search along: [%1]\n", path));
|
||||
|
||||
Searchpath paths (path);
|
||||
if (!Config->get_plugin_path_vst3().empty ()) {
|
||||
Searchpath custom (Config->get_plugin_path_vst3 ());
|
||||
paths += custom;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("VST3: search along: [%1]\n", paths.to_string ()));
|
||||
|
||||
vector<string> plugin_objects;
|
||||
|
||||
find_paths_matching_filter (plugin_objects, paths, vst3_filter, 0, false, true, true);
|
||||
|
Loading…
Reference in New Issue
Block a user