From 2870d89d5ca28a1d3580d67630ee9659969cc11c Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:11:38 -0400 Subject: [PATCH] Fix `bevy_gltf` PBR features not enabling corresponding `bevy_pbr` flags (#14486) # Objective - `bevy_gltf` does not build with only the `pbr_multi_layer_material_textures` or `pbr_anisotropy_texture` features. - Caught by [`flag-frenzy`](https://github.com/TheBevyFlock/flag-frenzy) in [this run](https://github.com/TheBevyFlock/flag-frenzy/actions/runs/10087486444/job/27891723948). ## Solution - This error was due to the feature not enabling the corresponding feature in `bevy_pbr`. Adding these flags as a dependency fixes this error. ## Testing The following commands fail on `main`, but pass with this PR: ```bash cargo check -p bevy_gltf --no-default-features -F pbr_multi_layer_material_textures cargo check -p bevy_gltf --no-default-features -F pbr_anisotropy_texture ``` --- crates/bevy_gltf/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index a6fa703774..47f6054367 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -11,8 +11,10 @@ keywords = ["bevy"] [features] dds = ["bevy_render/dds", "bevy_core_pipeline/dds"] pbr_transmission_textures = ["bevy_pbr/pbr_transmission_textures"] -pbr_multi_layer_material_textures = [] -pbr_anisotropy_texture = [] +pbr_multi_layer_material_textures = [ + "bevy_pbr/pbr_multi_layer_material_textures", +] +pbr_anisotropy_texture = ["bevy_pbr/pbr_anisotropy_texture"] [dependencies] # bevy