From 222be81776f6194b390be6d7a1bcf1cb117d511f Mon Sep 17 00:00:00 2001 From: Matty Weatherley Date: Fri, 29 Nov 2024 19:04:30 -0500 Subject: [PATCH] Make `bevy_gltf` compile without `bevy_animation` feature (#16551) # Objective See title. ## Solution Move `bevy_animation` import to where it is used. ## Testing Compiled with and without `bevy_animation` feature enabled. --- crates/bevy_gltf/src/loader.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs index 77b1e9de894ae..84c565bd8e5ec 100644 --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -4,7 +4,6 @@ use crate::{ }; use alloc::collections::VecDeque; -use bevy_animation::animated_field; use bevy_asset::{ io::Reader, AssetLoadError, AssetLoader, Handle, LoadContext, ReadAssetBytesError, }; @@ -275,7 +274,7 @@ async fn load_gltf<'a, 'b, 'c>( #[cfg(feature = "bevy_animation")] let (animations, named_animations, animation_roots) = { - use bevy_animation::{animation_curves::*, gltf_curves::*, VariableCurve}; + use bevy_animation::{animated_field, animation_curves::*, gltf_curves::*, VariableCurve}; use bevy_math::curve::{ConstantCurve, Interval, UnevenSampleAutoCurve}; use bevy_math::{Quat, Vec4}; use gltf::animation::util::ReadOutputs;