Merge pull request #564 from HifiExperiments/zoneImport

renderWithZones works on import from JSON
This commit is contained in:
kasenvr 2020-07-30 17:16:41 -04:00 committed by GitHub
commit 75bd885efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2793,6 +2793,17 @@ bool EntityTree::sendEntitiesOperation(const OctreeElementPointer& element, void
}
}
QVector<QUuid> oldRenderWithZones = properties.getRenderWithZones();
if (!oldRenderWithZones.isEmpty()) {
QVector<QUuid> newRenderWithZones;
for (QUuid oldRenderWithZoneID : oldRenderWithZones) {
if (args->ourTree->findEntityByEntityItemID(oldRenderWithZoneID)) {
newRenderWithZones.append(getMapped(oldRenderWithZoneID));
}
}
properties.setRenderWithZones(newRenderWithZones);
}
properties.setXNNeighborID(getMapped(properties.getXNNeighborID()));
properties.setXPNeighborID(getMapped(properties.getXPNeighborID()));
properties.setYNNeighborID(getMapped(properties.getYNNeighborID()));