From 3ea7a61d6ddaaef3ae7d2e539c8e4cbd611ab0e8 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 15 Apr 2020 08:58:32 +0100 Subject: [PATCH] Added some more endpoint property types --- .../modules/soul_core/types/soul_EndpointType.cpp | 15 ++++++++++----- .../modules/soul_core/types/soul_EndpointType.h | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/modules/soul_core/types/soul_EndpointType.cpp b/source/modules/soul_core/types/soul_EndpointType.cpp index 8d3bc89..1355b75 100644 --- a/source/modules/soul_core/types/soul_EndpointType.cpp +++ b/source/modules/soul_core/types/soul_EndpointType.cpp @@ -152,11 +152,16 @@ PatchPropertiesFromEndpointDetails::PatchPropertiesFromEndpointDetails (const En } } - unit = details.annotation.getString ("unit"); - minValue = castValueToFloat (details.annotation.getValue ("min"), minValue); - maxValue = castValueToFloat (details.annotation.getValue ("max"), maxValue); - step = castValueToFloat (details.annotation.getValue ("step"), maxValue / (numIntervals == 0 ? 1000 : numIntervals)); - initialValue = castValueToFloat (details.annotation.getValue ("init"), minValue); + unit = details.annotation.getString ("unit"); + group = details.annotation.getString ("group"); + textValues = details.annotation.getString ("text"); + minValue = castValueToFloat (details.annotation.getValue ("min"), minValue); + maxValue = castValueToFloat (details.annotation.getValue ("max"), maxValue); + step = castValueToFloat (details.annotation.getValue ("step"), maxValue / static_cast (numIntervals == 0 ? 1000 : numIntervals)); + initialValue = castValueToFloat (details.annotation.getValue ("init"), minValue); + isAutomatable = details.annotation.getBool ("automatable", true); + isBoolean = details.annotation.getBool ("boolean", false); + isHidden = details.annotation.getBool ("hidden", false); } } diff --git a/source/modules/soul_core/types/soul_EndpointType.h b/source/modules/soul_core/types/soul_EndpointType.h index cfa9f1c..d6de419 100644 --- a/source/modules/soul_core/types/soul_EndpointType.h +++ b/source/modules/soul_core/types/soul_EndpointType.h @@ -136,8 +136,9 @@ struct PatchPropertiesFromEndpointDetails { PatchPropertiesFromEndpointDetails (const EndpointDetails&); - std::string name, unit; + std::string name, unit, group, textValues; float minValue = 0, maxValue = 1.0f, step = 0, initialValue = 0; + bool isAutomatable = false, isBoolean = false, isHidden = false; }; } // namespace soul