From 54e1fb847d046f97b23b94d9c002efe29b3a4240 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 18:38:23 +0000 Subject: [PATCH] Introduce kParameterIsHidden flag, implement it for LV2 Signed-off-by: falkTX --- distrho/DistrhoPlugin.hpp | 7 +++++++ distrho/src/DistrhoPluginLV2export.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/distrho/DistrhoPlugin.hpp b/distrho/DistrhoPlugin.hpp index 79b65a8c..d25adce4 100644 --- a/distrho/DistrhoPlugin.hpp +++ b/distrho/DistrhoPlugin.hpp @@ -139,6 +139,13 @@ static const uint32_t kParameterIsOutput = 0x10; */ static const uint32_t kParameterIsTrigger = 0x20 | kParameterIsBoolean; +/** + Parameter should be hidden from the host and user-visible GUIs.@n + It is still saved and handled as any regular parameter, just not visible to the user + (for example in a host generated GUI) + */ +static const uint32_t kParameterIsHidden = 0x40; + /** @} */ /* ------------------------------------------------------------------------------------------------------------ diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index 321851f8..374a1667 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -939,6 +939,8 @@ void lv2_generate_ttl(const char* const basename) pluginString += " lv2:portProperty lv2:integer ;\n"; if (hints & kParameterIsLogarithmic) pluginString += " lv2:portProperty <" LV2_PORT_PROPS__logarithmic "> ;\n"; + if (hints & kParameterIsHidden) + pluginString += " lv2:portProperty <" LV2_PORT_PROPS__notOnGUI "> ;\n"; if ((hints & kParameterIsAutomatable) == 0 && plugin.isParameterInput(i)) { pluginString += " lv2:portProperty <" LV2_PORT_PROPS__expensive "> ,\n";