diff --git a/studio-bvh/src/macros.rs b/studio-bvh/src/macros.rs index 026470c..6e17800 100644 --- a/studio-bvh/src/macros.rs +++ b/studio-bvh/src/macros.rs @@ -501,6 +501,7 @@ mod tests { use std::time::Duration; // #[test] // FIXME + #[allow(dead_code)] fn macro_create() { let bvh = bvh! { HIERARCHY diff --git a/studio/src/anim/timeline_animation.rs b/studio/src/anim/timeline_animation.rs index 159427c..a64e0fd 100644 --- a/studio/src/anim/timeline_animation.rs +++ b/studio/src/anim/timeline_animation.rs @@ -1,10 +1,6 @@ use std::{str::FromStr, time::Duration}; use bevy::{ - ecs::{ - entity::{EntityMapper, MapEntities}, - reflect::ReflectMapEntities, - }, prelude::*, utils::{hashbrown::HashMap, HashSet}, }; @@ -14,10 +10,13 @@ use bevy_tweening::{ Animator, EaseMethod, Sequence, Targetable, Tracks, Tween, TweenCompleted, }; use itertools::Itertools; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use serde::{Deserialize, Serialize}; use space_editor::{prelude::PrefabMarker, space_prefab::editor_registry::EditorRegistryExt}; -use crate::{headless::HeadlessSettings, interaction::{MarkedForDeletion, Selectable}, StudioMode}; +use crate::{ + headless::HeadlessSettings, + interaction::{MarkedForDeletion, Selectable}, +}; pub struct TimelinePlugin; @@ -135,7 +134,7 @@ impl Default for TransformKeyframe { #[reflect(Component)] pub struct Keyframe { target: AnimationTarget, - pub time: f32 + pub time: f32, } #[derive(Component, Clone, Debug, Default, Reflect, PartialEq, Eq, PartialOrd, Ord)] @@ -152,7 +151,7 @@ impl Default for Keyframe { fn default() -> Self { Self { time: Default::default(), - target: AnimationTarget::Unknown + target: AnimationTarget::Unknown, } } } @@ -189,14 +188,16 @@ impl Default for TimedAnimationClipAsset { } } -#[derive(Component, Clone, Debug, Default, Reflect, PartialEq, Eq, Hash, Copy, Serialize, Deserialize)] +#[derive( + Component, Clone, Debug, Default, Reflect, PartialEq, Eq, Hash, Copy, Serialize, Deserialize, +)] #[reflect(Component)] #[serde(try_from = "&str", into = "String")] pub enum AnimationTarget { #[default] Unknown, MainCamera, - Uuid(uuid::Uuid) + Uuid(uuid::Uuid), } impl AnimationTarget { @@ -210,7 +211,7 @@ impl ToString for AnimationTarget { match self { Self::Unknown => "unknown".to_string(), Self::MainCamera => "MainCamera".to_string(), - Self::Uuid(uuid) => uuid.to_string() + Self::Uuid(uuid) => uuid.to_string(), } } } @@ -262,11 +263,15 @@ fn process_timeline_events( } } -fn update_tick(mut r_global_seek_time: ResMut, time: Res