gate import on bevy_animation in bevy_gltf (#18403)

# Objective

- `collect_path` is only declared when feature `bevy_animation` is
enabled
- it is imported without checking for the feature, not compiling when
not enabled

## Solution

- Gate the import
This commit is contained in:
François Mockers 2025-03-19 00:27:46 +01:00 committed by François Mockers
parent 920515adab
commit f3cbe4267a

View File

@ -66,6 +66,8 @@ use crate::{
GltfMaterialName, GltfMeshExtras, GltfNode, GltfSceneExtras, GltfSkin, GltfMaterialName, GltfMeshExtras, GltfNode, GltfSceneExtras, GltfSkin,
}; };
#[cfg(feature = "bevy_animation")]
use self::gltf_ext::scene::collect_path;
use self::{ use self::{
extensions::{AnisotropyExtension, ClearcoatExtension, SpecularExtension}, extensions::{AnisotropyExtension, ClearcoatExtension, SpecularExtension},
gltf_ext::{ gltf_ext::{
@ -75,7 +77,7 @@ use self::{
warn_on_differing_texture_transforms, warn_on_differing_texture_transforms,
}, },
mesh::{primitive_name, primitive_topology}, mesh::{primitive_name, primitive_topology},
scene::{collect_path, node_name, node_transform}, scene::{node_name, node_transform},
texture::{texture_handle, texture_sampler, texture_transform_to_affine2}, texture::{texture_handle, texture_sampler, texture_transform_to_affine2},
}, },
}; };