commit 54e1fb847d046f97b23b94d9c002efe29b3a4240
parent 03a7dbf4ef748ad76bc5b8845d9adb348645689f
Author: falkTX <falktx@falktx.com>
Date: Wed, 4 Jan 2023 18:37:56 +0000
Introduce kParameterIsHidden flag, implement it for LV2
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git 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
@@ -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";