Skip to content

Commit

Permalink
Added some more endpoint property types
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstorer committed Apr 15, 2020
1 parent 30d0bc7 commit 3ea7a61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions source/modules/soul_core/types/soul_EndpointType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float> (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);
}

}
3 changes: 2 additions & 1 deletion source/modules/soul_core/types/soul_EndpointType.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3ea7a61

Please sign in to comment.