From d193d7f53734ca3d35e55e1d7fc0d4fd20cb97d6 Mon Sep 17 00:00:00 2001 From: Sludge <96552222+SludgePhD@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:59:41 +0200 Subject: [PATCH] Reflect `Component` and `Default` of `BloomSettings` (#8283) These traits are both implemented, but not reflected, requiring user code to do `app.register_type_data::().register_type_data::()` to make these usable via reflection. --- crates/bevy_core_pipeline/src/bloom/settings.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/bevy_core_pipeline/src/bloom/settings.rs b/crates/bevy_core_pipeline/src/bloom/settings.rs index edf8ea493f..553fa75c6c 100644 --- a/crates/bevy_core_pipeline/src/bloom/settings.rs +++ b/crates/bevy_core_pipeline/src/bloom/settings.rs @@ -1,7 +1,7 @@ use super::downsampling_pipeline::BloomUniforms; -use bevy_ecs::{prelude::Component, query::QueryItem}; +use bevy_ecs::{prelude::Component, query::QueryItem, reflect::ReflectComponent}; use bevy_math::{UVec4, Vec4}; -use bevy_reflect::Reflect; +use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use bevy_render::{extract_component::ExtractComponent, prelude::Camera}; /// Applies a bloom effect to an HDR-enabled 2d or 3d camera. @@ -26,6 +26,7 @@ use bevy_render::{extract_component::ExtractComponent, prelude::Camera}; /// used in Bevy as well as a visualization of the curve's respective scattering profile. #[allow(clippy::doc_markdown)] #[derive(Component, Reflect, Clone)] +#[reflect(Component, Default)] pub struct BloomSettings { /// Controls the baseline of how much the image is scattered (default: 0.15). ///