mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
fix bevy_gltf
crate build (#13202)
# Objective Fixing `bevy_gltf` crate build fail when `bevy_animation` feature is disabled ## Solution Add missing `bevy_animation` feature
This commit is contained in:
parent
b9455afd0c
commit
9d8f94d461
2 changed files with 8 additions and 8 deletions
|
@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0"
|
|||
keywords = ["bevy"]
|
||||
|
||||
[features]
|
||||
dds = []
|
||||
pbr_transmission_textures = []
|
||||
dds = ["bevy_render/dds"]
|
||||
pbr_transmission_textures = ["bevy_pbr/pbr_transmission_textures"]
|
||||
|
||||
[dependencies]
|
||||
# bevy
|
||||
|
|
|
@ -605,7 +605,9 @@ async fn load_gltf<'a, 'b, 'c>(
|
|||
&mut entity_to_skin_index_map,
|
||||
&mut active_camera_found,
|
||||
&Transform::default(),
|
||||
#[cfg(feature = "bevy_animation")]
|
||||
&animation_roots,
|
||||
#[cfg(feature = "bevy_animation")]
|
||||
None,
|
||||
);
|
||||
if result.is_err() {
|
||||
|
@ -1011,8 +1013,8 @@ fn load_node(
|
|||
entity_to_skin_index_map: &mut EntityHashMap<usize>,
|
||||
active_camera_found: &mut bool,
|
||||
parent_transform: &Transform,
|
||||
animation_roots: &HashSet<usize>,
|
||||
mut animation_context: Option<AnimationContext>,
|
||||
#[cfg(feature = "bevy_animation")] animation_roots: &HashSet<usize>,
|
||||
#[cfg(feature = "bevy_animation")] mut animation_context: Option<AnimationContext>,
|
||||
) -> Result<(), GltfError> {
|
||||
let mut gltf_error = None;
|
||||
let transform = node_transform(gltf_node);
|
||||
|
@ -1261,7 +1263,9 @@ fn load_node(
|
|||
entity_to_skin_index_map,
|
||||
active_camera_found,
|
||||
&world_transform,
|
||||
#[cfg(feature = "bevy_animation")]
|
||||
animation_roots,
|
||||
#[cfg(feature = "bevy_animation")]
|
||||
animation_context.clone(),
|
||||
) {
|
||||
gltf_error = Some(err);
|
||||
|
@ -1632,10 +1636,6 @@ struct AnimationContext {
|
|||
path: SmallVec<[Name; 8]>,
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "bevy_animation"))]
|
||||
#[derive(Clone)]
|
||||
struct AnimationContext;
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::path::PathBuf;
|
||||
|
|
Loading…
Reference in a new issue