private void backup() { if (entityId == null) { Object[] payload = getNotification().getBody(); sourceName = (String) payload[0]; targetName = (String) payload[1]; entityId = EntityUtils.getEntityId(Sandbox.getInstance().getCurrentViewingEntity()); } }
private void collectData() { Object[] payload = getNotification().getBody(); entityId = EntityUtils.getEntityId((Entity) payload[0]); dataFrom = (Vector2[][]) payload[1]; dataTo = (Vector2[][]) payload[2]; dataFrom = dataFrom.clone(); dataTo = dataTo.clone(); }
public void removeFromSelection(Set<Entity> selection) { if (tree == null) return; Array<Node> allSceneRootNodes = tree.getNodes().get(0).getChildren(); for (int entityId : EntityUtils.getEntityId(selection)) { for (Node n : allSceneRootNodes) { if (n.getObject().equals(entityId)) { tree.getSelection().remove(n); break; } } } }