File sceneDir = SceneDirectoryPicker.getSceneDirectory(frame);
if (sceneDir != null) {
ChunkyOptions config = options.clone();
config.sceneDir = sceneDir;
RenderContext context = new RenderContext(config);
SceneSelector sceneSelector = new SceneSelector(null, context);
sceneSelector.setLocationRelativeTo(frame);
if (sceneSelector.isAccepted()) {
String scene = sceneSelector.getSelectedScene();
renderControls = new RenderControls(Chunky.this, context);
renderControls.loadScene(scene);
}
}
} else {
SceneSelector sceneSelector = new SceneSelector(null, renderControls.getContext());
sceneSelector.setLocationRelativeTo(frame);
if (sceneSelector.isAccepted()) {
String scene = sceneSelector.getSelectedScene();
renderControls.loadScene(scene);
}
}
}