Skip to content

Commit

Permalink
Make bevy_gltf compile without bevy_animation feature (bevyengine…
Browse files Browse the repository at this point in the history
…#16551)

# Objective

See title.

## Solution

Move `bevy_animation` import to where it is used.

## Testing

Compiled with and without `bevy_animation` feature enabled.
  • Loading branch information
mweatherley authored and ecoskey committed Dec 2, 2024
1 parent 3f13b86 commit 222be81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 222be81

Please sign in to comment.