avatar recording fix

This commit is contained in:
Dante Ruiz 2017-06-28 16:22:28 +01:00
parent 588f1aefd9
commit f6ba264de6

View file

@ -1978,7 +1978,7 @@ JointData jointDataFromJsonValue(const QJsonValue& json) {
result.rotation = quatFromJsonValue(array[0]); result.rotation = quatFromJsonValue(array[0]);
result.rotationSet = true; result.rotationSet = true;
result.translation = vec3FromJsonValue(array[1]); result.translation = vec3FromJsonValue(array[1]);
result.translationSet = false; result.translationSet = true;
} }
return result; return result;
} }
@ -2146,12 +2146,9 @@ void AvatarData::fromJson(const QJsonObject& json, bool useFrameSkeleton) {
QVector<JointData> jointArray; QVector<JointData> jointArray;
QJsonArray jointArrayJson = json[JSON_AVATAR_JOINT_ARRAY].toArray(); QJsonArray jointArrayJson = json[JSON_AVATAR_JOINT_ARRAY].toArray();
jointArray.reserve(jointArrayJson.size()); jointArray.reserve(jointArrayJson.size());
int i = 0;
for (const auto& jointJson : jointArrayJson) { for (const auto& jointJson : jointArrayJson) {
auto joint = jointDataFromJsonValue(jointJson); auto joint = jointDataFromJsonValue(jointJson);
jointArray.push_back(joint); jointArray.push_back(joint);
setJointData(i, joint.rotation, joint.translation);
i++;
} }
setRawJointData(jointArray); setRawJointData(jointArray);
} }