Upgrade to Bevy 0.19 and harden editor workflows
CI / Format, lint, test, build (push) Has been cancelled
CI / Format, lint, test, build (push) Has been cancelled
This commit is contained in:
1 parent
3f85d25cc7
commit
b5e561904c
204 files changed
+6972
-29907
No files matched your search
@@ -199,7 +199,7 @@ impl AssetThumbnailCache {
|
||||
key.clone(),
|
||||
ThumbnailJobSource::MaterialAsset {
|
||||
label: material.label.clone(),
|
||||
material: material.material,
|
||||
material: Box::new(material.material),
|
||||
},
|
||||
) {
|
||||
self.studio_pending.insert(key);
|
||||
|
||||
@@ -24,7 +24,7 @@ pub enum ThumbnailJobSource {
|
||||
},
|
||||
MaterialAsset {
|
||||
label: String,
|
||||
material: MaterialDesc,
|
||||
material: Box<MaterialDesc>,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ use bevy::math::bounding::Aabb3d;
|
||||
use bevy::mesh::VertexAttributeValues;
|
||||
use bevy::prelude::*;
|
||||
use bevy::render::render_resource::TextureFormat;
|
||||
use bevy::scene::SceneRoot;
|
||||
use bevy_egui::EguiUserTextures;
|
||||
use shared::{material_from_desc, ModelRef};
|
||||
|
||||
@@ -134,6 +133,7 @@ fn setup_thumbnail_studio(mut commands: Commands, mut images: ResMut<Assets<Imag
|
||||
ThumbnailStudioLayer,
|
||||
RenderLayers::layer(THUMBNAIL_LAYER),
|
||||
Camera3d::default(),
|
||||
Msaa::Off,
|
||||
Camera {
|
||||
is_active: false,
|
||||
order: -50,
|
||||
@@ -157,7 +157,7 @@ fn setup_thumbnail_studio(mut commands: Commands, mut images: ResMut<Assets<Imag
|
||||
RenderLayers::layer(THUMBNAIL_LAYER),
|
||||
DirectionalLight {
|
||||
illuminance: 12_000.0,
|
||||
shadows_enabled: false,
|
||||
shadow_maps_enabled: false,
|
||||
..default()
|
||||
},
|
||||
Transform::from_rotation(Quat::from_euler(EulerRot::XYZ, -0.8, 0.9, 0.0)),
|
||||
@@ -172,7 +172,7 @@ fn setup_thumbnail_studio(mut commands: Commands, mut images: ResMut<Assets<Imag
|
||||
RenderLayers::layer(THUMBNAIL_LAYER),
|
||||
DirectionalLight {
|
||||
illuminance: 3_500.0,
|
||||
shadows_enabled: false,
|
||||
shadow_maps_enabled: false,
|
||||
..default()
|
||||
},
|
||||
Transform::from_rotation(Quat::from_euler(EulerRot::XYZ, -0.4, -2.2, 0.0)),
|
||||
@@ -380,7 +380,7 @@ fn spawn_thumbnail_job_content(
|
||||
match source {
|
||||
ThumbnailJobSource::Model { model_path } => {
|
||||
if uses_scene_root(model_path) {
|
||||
commands.entity(root).insert(SceneRoot(
|
||||
commands.entity(root).insert(WorldAssetRoot(
|
||||
asset_server.load(model_scene_asset_path(model_path, 0)),
|
||||
));
|
||||
}
|
||||
@@ -494,6 +494,10 @@ fn finish_active_thumbnail(
|
||||
studio.cooldown_frames = COOLDOWN_FRAMES;
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "thumbnail failure coordinates the job, cache, render target, and camera state"
|
||||
)]
|
||||
fn fail_active_thumbnail(
|
||||
commands: &mut Commands,
|
||||
studio: &mut ThumbnailStudio,
|
||||
|
||||
Reference in new issue
Block a user