From 387a8ce933b2a9d45e7fb818a894a7761f368074 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 24 Oct 2018 10:21:34 -0700 Subject: [PATCH] fix QJsonArray handling --- libraries/entities/src/EntityScriptingInterface.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index ae951c7862..a920ed92ff 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -360,11 +360,13 @@ void synchronizeGrabJoints(const GrabPropertyGroup& grabProperties, QJsonObject& QJsonValue::fromVariant(quatToQMap(grabProperties.getEquippableRightRotation())).toObject(); } - rightHand[0] = rightHandPosition; - rightHand[1] = rightHandRotation; + rightHand = QJsonArray(); + rightHand.append(rightHandPosition); + rightHand.append(rightHandRotation); joints["RightHand"] = rightHand; - leftHand[0] = leftHandPosition; - leftHand[1] = leftHandRotation; + leftHand = QJsonArray(); + leftHand.append(leftHandPosition); + leftHand.append(leftHandRotation); joints["LeftHand"] = leftHand; } @@ -398,7 +400,8 @@ void synchronizeEquipHotspot(const GrabPropertyGroup& grabProperties, QJsonObjec } equipHotspot["joints"] = joints; - equipHotspots[0] = equipHotspot; + equipHotspots = QJsonArray(); + equipHotspots.append(equipHotspot); userData["equipHotspots"] = equipHotspots; userDataChanged = true; }