From 06fc7ef06c7a4c7f12eaea5ca84a8b3b499f228d Mon Sep 17 00:00:00 2001 From: andriyDev Date: Sun, 9 Nov 2025 13:01:00 -0800 Subject: [PATCH] Delete unused WeightsCurve, and enable feature for bevy_animation. --- crates/bevy_animation/src/gltf_curves.rs | 26 ------------------------ crates/bevy_gltf/Cargo.toml | 4 +++- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/crates/bevy_animation/src/gltf_curves.rs b/crates/bevy_animation/src/gltf_curves.rs index 1493f604b6ca7..50f28ecf8d2ee 100644 --- a/crates/bevy_animation/src/gltf_curves.rs +++ b/crates/bevy_animation/src/gltf_curves.rs @@ -366,32 +366,6 @@ impl WideCubicKeyframeCurve { } } -/// A curve specifying the [`MorphWeights`] for a mesh in animation. The variants are broken -/// down by interpolation mode (with the exception of `Constant`, which never interpolates). -/// -/// This type is, itself, a `Curve>`; however, in order to avoid allocation, it is -/// recommended to use its implementation of the [`IterableCurve`] trait, which allows iterating -/// directly over information derived from the curve without allocating. -/// -/// [`MorphWeights`]: bevy_mesh::morph::MorphWeights -#[derive(Debug, Clone, Reflect)] -#[reflect(Clone)] -pub enum WeightsCurve { - /// A curve which takes a constant value over its domain. Notably, this is how animations with - /// only a single keyframe are interpreted. - Constant(ConstantCurve>), - - /// A curve which interpolates weights linearly between keyframes. - Linear(WideLinearKeyframeCurve), - - /// A curve which interpolates weights between keyframes in steps. - Step(WideSteppedKeyframeCurve), - - /// A curve which interpolates between keyframes by using auxiliary tangent data to join - /// adjacent keyframes with a cubic Hermite spline, which is then sampled. - CubicSpline(WideCubicKeyframeCurve), -} - //---------// // HELPERS // //---------// diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index 9870a2c5a4366..bd906090b96da 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -18,7 +18,9 @@ pbr_specular_textures = ["bevy_pbr/pbr_specular_textures"] [dependencies] # bevy -bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true } +bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true, features = [ + "bevy_mesh", +] } bevy_app = { path = "../bevy_app", version = "0.18.0-dev" } bevy_asset = { path = "../bevy_asset", version = "0.18.0-dev" } bevy_color = { path = "../bevy_color", version = "0.18.0-dev" }