public static <N extends Node> void whenAddedToSceneConsume(@Nonnull N node, @Nonnull Consumer<N> consumer) {
		// If added to the UI, immediately call the consumer.
		if (node.getScene() != null) {
			consumer.accept(node);
			return;
		}

		// When there is no scene it is not added to the UI yet.
		// We want to wait for it to be added before calling the consumer.
		node.sceneProperty().addListener(new ChangeListener<>() {
			@Override
			public void changed(ObservableValue<? extends Scene> observable, Scene prior, Scene current) {
				node.sceneProperty().removeListener(this);
				consumer.accept(node);
			}
		});
	}
@param node
		Node to initiate query with.
@param consumer
		Consumer taking in the node. To be run when the node has a {@link Scene} associated with it.
@param <N>
		Node type.
recaf-ui/src/main/java/software/coley/recaf/util/SceneUtils.java