Fix regression in bevy_gltf build (#15512)
				
					
				
			# Objective Fixes #15503 ## Solution Move the use ## Testing Compiled with `cargo build --no-default-features --features bevy_gltf` successfully. ## Showcase 
This commit is contained in:
		
							parent
							
								
									c32e0b9ec2
								
							
						
					
					
						commit
						bd20382a4a
					
				| @ -4,9 +4,6 @@ use crate::{ | ||||
| }; | ||||
| 
 | ||||
| use alloc::collections::VecDeque; | ||||
| use bevy_animation::prelude::{ | ||||
|     Keyframes, MorphWeightsKeyframes, RotationKeyframes, ScaleKeyframes, TranslationKeyframes, | ||||
| }; | ||||
| use bevy_asset::{ | ||||
|     io::Reader, AssetLoadError, AssetLoader, Handle, LoadContext, ReadAssetBytesError, | ||||
| }; | ||||
| @ -65,7 +62,7 @@ use std::{ | ||||
| use thiserror::Error; | ||||
| #[cfg(feature = "bevy_animation")] | ||||
| use { | ||||
|     bevy_animation::{AnimationTarget, AnimationTargetId}, | ||||
|     bevy_animation::{prelude::*, AnimationTarget, AnimationTargetId}, | ||||
|     smallvec::SmallVec, | ||||
| }; | ||||
| 
 | ||||
| @ -277,7 +274,7 @@ async fn load_gltf<'a, 'b, 'c>( | ||||
|         let mut named_animations = HashMap::default(); | ||||
|         let mut animation_roots = HashSet::default(); | ||||
|         for animation in gltf.animations() { | ||||
|             let mut animation_clip = bevy_animation::AnimationClip::default(); | ||||
|             let mut animation_clip = AnimationClip::default(); | ||||
|             for channel in animation.channels() { | ||||
|                 let interpolation = match channel.sampler().interpolation() { | ||||
|                     gltf::animation::Interpolation::Linear => Interpolation::Linear, | ||||
| @ -330,7 +327,7 @@ async fn load_gltf<'a, 'b, 'c>( | ||||
|                     animation_roots.insert(*root_index); | ||||
|                     animation_clip.add_curve_to_target( | ||||
|                         AnimationTargetId::from_names(path.iter()), | ||||
|                         bevy_animation::VariableCurve { | ||||
|                         VariableCurve { | ||||
|                             keyframe_timestamps, | ||||
|                             keyframes, | ||||
|                             interpolation, | ||||
| @ -738,7 +735,7 @@ async fn load_gltf<'a, 'b, 'c>( | ||||
|                 if animation_roots.contains(&node.index()) { | ||||
|                     world | ||||
|                         .entity_mut(*node_index_to_entity_map.get(&node.index()).unwrap()) | ||||
|                         .insert(bevy_animation::AnimationPlayer::default()); | ||||
|                         .insert(AnimationPlayer::default()); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Benjamin Brienen
						Benjamin Brienen