mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +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"]
|
keywords = ["bevy"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
dds = []
|
dds = ["bevy_render/dds"]
|
||||||
pbr_transmission_textures = []
|
pbr_transmission_textures = ["bevy_pbr/pbr_transmission_textures"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# bevy
|
# bevy
|
||||||
|
|
|
@ -605,7 +605,9 @@ async fn load_gltf<'a, 'b, 'c>(
|
||||||
&mut entity_to_skin_index_map,
|
&mut entity_to_skin_index_map,
|
||||||
&mut active_camera_found,
|
&mut active_camera_found,
|
||||||
&Transform::default(),
|
&Transform::default(),
|
||||||
|
#[cfg(feature = "bevy_animation")]
|
||||||
&animation_roots,
|
&animation_roots,
|
||||||
|
#[cfg(feature = "bevy_animation")]
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
if result.is_err() {
|
if result.is_err() {
|
||||||
|
@ -1011,8 +1013,8 @@ fn load_node(
|
||||||
entity_to_skin_index_map: &mut EntityHashMap<usize>,
|
entity_to_skin_index_map: &mut EntityHashMap<usize>,
|
||||||
active_camera_found: &mut bool,
|
active_camera_found: &mut bool,
|
||||||
parent_transform: &Transform,
|
parent_transform: &Transform,
|
||||||
animation_roots: &HashSet<usize>,
|
#[cfg(feature = "bevy_animation")] animation_roots: &HashSet<usize>,
|
||||||
mut animation_context: Option<AnimationContext>,
|
#[cfg(feature = "bevy_animation")] mut animation_context: Option<AnimationContext>,
|
||||||
) -> Result<(), GltfError> {
|
) -> Result<(), GltfError> {
|
||||||
let mut gltf_error = None;
|
let mut gltf_error = None;
|
||||||
let transform = node_transform(gltf_node);
|
let transform = node_transform(gltf_node);
|
||||||
|
@ -1261,7 +1263,9 @@ fn load_node(
|
||||||
entity_to_skin_index_map,
|
entity_to_skin_index_map,
|
||||||
active_camera_found,
|
active_camera_found,
|
||||||
&world_transform,
|
&world_transform,
|
||||||
|
#[cfg(feature = "bevy_animation")]
|
||||||
animation_roots,
|
animation_roots,
|
||||||
|
#[cfg(feature = "bevy_animation")]
|
||||||
animation_context.clone(),
|
animation_context.clone(),
|
||||||
) {
|
) {
|
||||||
gltf_error = Some(err);
|
gltf_error = Some(err);
|
||||||
|
@ -1632,10 +1636,6 @@ struct AnimationContext {
|
||||||
path: SmallVec<[Name; 8]>,
|
path: SmallVec<[Name; 8]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "bevy_animation"))]
|
|
||||||
#[derive(Clone)]
|
|
||||||
struct AnimationContext;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
Loading…
Reference in a new issue