mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 11:55:25 +02:00
Include avatar entities on recordings
This commit is contained in:
parent
c564119edc
commit
dc0fbcca59
1 changed files with 12 additions and 0 deletions
|
@ -2431,6 +2431,18 @@ void AvatarData::fromJson(const QJsonObject& json, bool useFrameSkeleton) {
|
|||
setAttachmentData(attachments);
|
||||
}
|
||||
|
||||
if (json.contains(JSON_AVATAR_ENTITIES) && json[JSON_AVATAR_ENTITIES].isArray()) {
|
||||
QJsonArray attachmentsJson = json[JSON_AVATAR_ATTACHMENTS].toArray();
|
||||
for (auto attachmentJson : attachmentsJson) {
|
||||
if (attachmentJson.isObject()) {
|
||||
QVariantMap entityData = attachmentJson.toObject().toVariantMap();
|
||||
QUuid entityID = entityData.value("id").toUuid();
|
||||
QByteArray properties = entityData.value("properties").toByteArray();
|
||||
updateAvatarEntity(entityID, properties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (json.contains(JSON_AVATAR_JOINT_ARRAY)) {
|
||||
if (version == (int)JsonAvatarFrameVersion::JointRotationsInRelativeFrame) {
|
||||
// because we don't have the full joint hierarchy skeleton of the model,
|
||||
|
|
Loading…
Reference in a new issue