Showing the changes to interface/src/scripting/SelectionScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -239,6 +239,41 @@ void SelectionToSceneHandler::updateSceneFromSelectedList() { · 238 unmodified lines | ||
| 239 | 239 | |
| 240 | 240 | |
| 241 | 241 | bool SelectionHighlightStyle::fromVariantMap(const QVariantMap& properties) { |
| 242 | + auto outlineColor = properties["outlineColor"]; | |
| 243 | + if (outlineColor.isValid()) { | |
| 244 | + bool isValid; | |
| 245 | + auto color = xColorFromVariant(properties["outlineColor"], isValid); | |
| 246 | + if (isValid) { | |
| 247 | + _style.color = toGlm(color); | |
| 248 | + } | |
| 249 | + } | |
| 250 | + auto outlineWidth = properties["outlineWidth"]; | |
| 251 | + if (outlineWidth.isValid()) { | |
| 252 | + _style.outlineWidth = outlineWidth.toFloat(); | |
| 253 | + } | |
| 254 | + auto isOutlineSmooth = properties["isOutlineSmooth"]; | |
| 255 | + if (isOutlineSmooth.isValid()) { | |
| 256 | + _style.isOutlineSmooth = isOutlineSmooth.toBool(); | |
| 257 | + } | |
| 258 | + | |
| 259 | + auto outlineIntensity = properties["outlineIntensity"]; | |
| 260 | + if (outlineIntensity.isValid()) { | |
| 261 | + _style.outlineIntensity = outlineIntensity.toFloat(); | |
| 262 | + } | |
| 263 | + | |
| 264 | + auto isFilled = properties["isFilled"]; | |
| 265 | + if (isFilled.isValid()) { | |
| 266 | + _style.isFilled = isFilled.toBool(); | |
| 267 | + } | |
| 268 | + auto unoccludedFillOpacity = properties["unoccludedFillOpacity"]; | |
| 269 | + if (unoccludedFillOpacity.isValid()) { | |
| 270 | + _style.unoccludedFillOpacity = unoccludedFillOpacity.toFloat(); | |
| 271 | + } | |
| 272 | + auto occludedFillOpacity = properties["occludedFillOpacity"]; | |
| 273 | + if (occludedFillOpacity.isValid()) { | |
| 274 | + _style.occludedFillOpacity = occludedFillOpacity.toFloat(); | |
| 275 | + } | |
| 276 | + | |
| 242 | 277 | return true; |
| 243 | 278 | } |
| 244 | 279 | QVariantMap SelectionHighlightStyle::toVariantMap() const { |