Skip to content

Commit 33a48a9

Browse files
authored
Delete unused WeightsCurve, and enable feature for bevy_animation. (#21793)
# Objective - Fix `cargo b -p bevy_gltf --all-features` ## Solution - Delete an unused symbol with the same name. - Add the `bevy_mesh` feature on `bevy_animation` in `bevy_gltf`, so the correct WeightsCurve is chosen. ## Testing - CI, and running with `--all-features`.
1 parent 0d46518 commit 33a48a9

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

crates/bevy_animation/src/gltf_curves.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -366,32 +366,6 @@ impl<T> WideCubicKeyframeCurve<T> {
366366
}
367367
}
368368

369-
/// A curve specifying the [`MorphWeights`] for a mesh in animation. The variants are broken
370-
/// down by interpolation mode (with the exception of `Constant`, which never interpolates).
371-
///
372-
/// This type is, itself, a `Curve<Vec<f32>>`; however, in order to avoid allocation, it is
373-
/// recommended to use its implementation of the [`IterableCurve`] trait, which allows iterating
374-
/// directly over information derived from the curve without allocating.
375-
///
376-
/// [`MorphWeights`]: bevy_mesh::morph::MorphWeights
377-
#[derive(Debug, Clone, Reflect)]
378-
#[reflect(Clone)]
379-
pub enum WeightsCurve {
380-
/// A curve which takes a constant value over its domain. Notably, this is how animations with
381-
/// only a single keyframe are interpreted.
382-
Constant(ConstantCurve<Vec<f32>>),
383-
384-
/// A curve which interpolates weights linearly between keyframes.
385-
Linear(WideLinearKeyframeCurve<f32>),
386-
387-
/// A curve which interpolates weights between keyframes in steps.
388-
Step(WideSteppedKeyframeCurve<f32>),
389-
390-
/// A curve which interpolates between keyframes by using auxiliary tangent data to join
391-
/// adjacent keyframes with a cubic Hermite spline, which is then sampled.
392-
CubicSpline(WideCubicKeyframeCurve<f32>),
393-
}
394-
395369
//---------//
396370
// HELPERS //
397371
//---------//

crates/bevy_gltf/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ pbr_specular_textures = ["bevy_pbr/pbr_specular_textures"]
1818

1919
[dependencies]
2020
# bevy
21-
bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true }
21+
bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true, features = [
22+
"bevy_mesh",
23+
] }
2224
bevy_app = { path = "../bevy_app", version = "0.18.0-dev" }
2325
bevy_asset = { path = "../bevy_asset", version = "0.18.0-dev" }
2426
bevy_color = { path = "../bevy_color", version = "0.18.0-dev" }

0 commit comments

Comments
 (0)