diff --git a/resources/ui/carla_settings.ui b/resources/ui/carla_settings.ui
index ffdba8bec..7f188dcc2 100644
--- a/resources/ui/carla_settings.ui
+++ b/resources/ui/carla_settings.ui
@@ -1177,16 +1177,48 @@ This mode is not available for VST plugins.
-
-
+
+
0
-
+
0
- -
+
+ 0
+
+
+ 6
+
+
-
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+ :/16x16/dialog-information.png
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Restart Carla to be able to load new found plugins
+
+
+
@@ -1361,6 +1393,7 @@ This mode is not available for VST plugins.
+
diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/Lv2Plugin.cpp
index e633a69d5..aaf19abb9 100644
--- a/source/backend/plugin/Lv2Plugin.cpp
+++ b/source/backend/plugin/Lv2Plugin.cpp
@@ -4245,17 +4245,6 @@ public:
// ---------------------------------------------------------------
// get plugin from lv2_rdf (lilv)
- Lv2WorldClass& lv2World(Lv2WorldClass::getInstance());
-
- // Convert bundle filename to URI
- QString qBundle(QUrl::fromLocalFile(bundle).toString());
- if (! qBundle.endsWith(OS_SEP_STR))
- qBundle += OS_SEP_STR;
-
- // Load bundle
- Lilv::Node lilvBundle(lv2World.new_uri(qBundle.toUtf8().constData()));
- lv2World.load_bundle(lilvBundle);
-
fRdfDescriptor = lv2_rdf_new(uri, true);
if (fRdfDescriptor == nullptr)
diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp
index 2005abe2a..6ca732a76 100644
--- a/source/bridges/CarlaBridgeUI-LV2.cpp
+++ b/source/bridges/CarlaBridgeUI-LV2.cpp
@@ -349,10 +349,7 @@ public:
// -----------------------------------------------------------------
// get plugin from lv2_rdf (lilv)
- Lv2WorldClass& lv2World(Lv2WorldClass::getInstance());
-
- lv2World.load_all(); // FIXME
- fRdfDescriptor = lv2_rdf_new(pluginURI, false);
+ fRdfDescriptor = lv2_rdf_new(pluginURI, true);
if (fRdfDescriptor == nullptr)
return false;
diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp
index 4e97920ae..188610778 100644
--- a/source/utils/CarlaLv2Utils.hpp
+++ b/source/utils/CarlaLv2Utils.hpp
@@ -216,6 +216,8 @@ public:
Lilv::Node rdf_type;
Lilv::Node rdfs_label;
+ bool needsInit;
+
// -------------------------------------------------------------------
Lv2WorldClass()
@@ -330,7 +332,11 @@ public:
dct_replaces (new_uri(NS_dct "replaces")),
doap_license (new_uri(NS_doap "license")),
rdf_type (new_uri(NS_rdf "type")),
- rdfs_label (new_uri(NS_rdfs "label")) {}
+ rdfs_label (new_uri(NS_rdfs "label")),
+
+ needsInit(true)
+ {
+ }
static Lv2WorldClass& getInstance()
{
@@ -338,6 +344,15 @@ public:
return lv2World;
}
+ void init()
+ {
+ if (! needsInit)
+ return;
+
+ needsInit = false;
+ Lilv::World::load_all();
+ }
+
const LilvPlugin* getPlugin(const LV2_URI uri) const
{
CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0', nullptr);
@@ -402,12 +417,15 @@ public:
// Create new RDF object (using lilv)
static inline
-const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool fillPresets)
+const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool doInit)
{
CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0', nullptr);
Lv2WorldClass& lv2World(Lv2WorldClass::getInstance());
+ if (doInit)
+ lv2World.init();
+
const LilvPlugin* const cPlugin(lv2World.getPlugin(uri));
if (cPlugin == nullptr)
@@ -1019,11 +1037,10 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool fillPresets)
}
}
-#if 1
// -------------------------------------------------------------------
// Set Plugin Presets
- if (fillPresets)
+ if (doInit)
{
Lilv::Nodes presetNodes(lilvPlugin.get_related(lv2World.preset_preset));
@@ -1081,7 +1098,6 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool fillPresets)
}
}
}
-#endif
// -------------------------------------------------------------------
// Set Plugin Features