mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Removed Grid and Fixed Ending Frames (#47)
This PR Removes the gridlines from headless renders and Removes useless frames from the end of headless renders. Really small PR. Let me know what you think!
This commit is contained in:
+5
-4
@@ -313,7 +313,7 @@ pub fn start_headless(
|
||||
close_when_requested: true,
|
||||
}),
|
||||
ScreenShotPlugin,
|
||||
CommonPlugins,
|
||||
CommonPlugins.build().disable::<WorldGridPlugin>(),
|
||||
));
|
||||
|
||||
match mode {
|
||||
@@ -326,7 +326,6 @@ pub fn start_headless(
|
||||
mut ew: EventWriter<LoadSceneEvent>| {
|
||||
cmd.insert_resource(SkyboxId(skybox.clone()));
|
||||
cmd.insert_resource(TestBvh(asset_server.load(bvh_dir.clone())));
|
||||
|
||||
ew.send(LoadSceneEvent("Mannequin.gltf".to_string()));
|
||||
},
|
||||
);
|
||||
@@ -377,15 +376,17 @@ impl Default for HeadlessSettings {
|
||||
}
|
||||
|
||||
fn check_for_capture_complete(
|
||||
main_camera: Query<&ScreenCapture, With<MainCamera>>,
|
||||
mut commands: Commands,
|
||||
mut close_app: EventWriter<AppExit>,
|
||||
main_camera: Query<(Entity, &ScreenCapture), With<MainCamera>>,
|
||||
bvh_event_reader: EventReader<BvhAnimCompleteEvent>,
|
||||
) {
|
||||
let Ok(screen_capture) = main_camera.get_single() else {
|
||||
let Ok((entity, screen_capture)) = main_camera.get_single() else {
|
||||
return;
|
||||
};
|
||||
|
||||
if screen_capture.is_complete() || !bvh_event_reader.is_empty() {
|
||||
commands.entity(entity).remove::<ScreenCapture>();
|
||||
close_app.send(AppExit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user