mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-07 03:49:43 -05:00
Code cleanup branch (#618)
* Make height map fallback layer work again * Add documentation to joystick button bindings * Removed grouped property headers * Add new version number constant generated by CMake * Make Joystick deadzone work properly * Change the startup date on Earth to today * Fix key modifier handling * Add debugging indices for TreeNodeDebugging * Fix script schedule for OsirisRex * Do not open Mission schedule automatically * Upload default projection texture automatically * General code cleanup * Fix check_style_guide warnings * Remove .clang-format * MacOS compile fixes * Clang analyzer fixes
This commit is contained in:
@@ -38,7 +38,7 @@ namespace openspace::properties {
|
||||
|
||||
#define DEFAULT_TO_LUA_LAMBDA(TYPE) \
|
||||
[](lua_State* state, TYPE value) -> bool { \
|
||||
bool success = value.getEnvelopesToLua(state); \
|
||||
bool success = value.envelopesToLua(state); \
|
||||
return success; \
|
||||
}
|
||||
|
||||
@@ -51,14 +51,16 @@ namespace openspace::properties {
|
||||
|
||||
#define DEFAULT_TO_STRING_LAMBDA(TYPE) \
|
||||
[](std::string& outValue, TYPE inValue) -> bool { \
|
||||
outValue = inValue.getSerializedToString(); \
|
||||
outValue = inValue.serializedToString(); \
|
||||
return true; \
|
||||
}
|
||||
|
||||
REGISTER_TEMPLATEPROPERTY_SOURCE(TransferFunctionProperty, volume::TransferFunction, 0,
|
||||
DEFAULT_FROM_LUA_LAMBDA(volume::TransferFunction, volume::TransferFunction(0)),
|
||||
DEFAULT_TO_LUA_LAMBDA(volume::TransferFunction),
|
||||
DEFAULT_FROM_STRING_LAMBDA(volume::TransferFunction, volume::TransferFunction(0)),
|
||||
DEFAULT_TO_STRING_LAMBDA(volume::TransferFunction),
|
||||
LUA_TTABLE);
|
||||
REGISTER_TEMPLATEPROPERTY_SOURCE(TransferFunctionProperty, volume::TransferFunction,
|
||||
volume::TransferFunction(),
|
||||
DEFAULT_FROM_LUA_LAMBDA(volume::TransferFunction, volume::TransferFunction()),
|
||||
DEFAULT_TO_LUA_LAMBDA(volume::TransferFunction),
|
||||
DEFAULT_FROM_STRING_LAMBDA(volume::TransferFunction, volume::TransferFunction()),
|
||||
DEFAULT_TO_STRING_LAMBDA(volume::TransferFunction),
|
||||
LUA_TTABLE);
|
||||
|
||||
} // namespace openspace::properties
|
||||
|
||||
Reference in New Issue
Block a user