@@ -888,7 +888,7 @@ impl EditorPlugin for AnimationEditorPlugin {
888888 }
889889
890890 fn on_sync_to_model ( & mut self , editor : & mut Editor ) {
891- let entry = some_or_return ! ( editor. scenes. current_scene_entry_mut( ) ) ;
891+ let entry = editor. scenes . current_scene_entry_mut ( ) ;
892892 let animation_editor = some_or_return ! ( self . animation_editor. as_mut( ) ) ;
893893 let ui = editor. engine . user_interfaces . first_mut ( ) ;
894894 if let Some ( game_scene) = entry. controller . downcast_mut :: < GameScene > ( ) {
@@ -927,40 +927,39 @@ impl EditorPlugin for AnimationEditorPlugin {
927927 }
928928 }
929929
930- if let Some ( entry) = editor. scenes . current_scene_entry_mut ( ) {
931- let ui = editor. engine . user_interfaces . first_mut ( ) ;
932- if let Some ( game_scene) = entry. controller . downcast_mut :: < GameScene > ( ) {
933- let graph = & mut editor. engine . scenes [ game_scene. scene ] . graph ;
934- animation_editor. handle_ui_message (
935- message,
936- & entry. selection ,
937- graph,
938- game_scene. scene_content_root ,
939- ui,
940- & editor. engine . resource_manager ,
941- & editor. message_sender ,
942- game_scene. graph_switches . node_overrides . as_mut ( ) . unwrap ( ) ,
943- ) ;
944- } else if let Some ( ui_scene) = entry. controller . downcast_mut :: < UiScene > ( ) {
945- let ui_root = ui_scene. ui . root ( ) ;
946- animation_editor. handle_ui_message (
947- message,
948- & entry. selection ,
949- & mut ui_scene. ui ,
950- ui_root,
951- ui,
952- & editor. engine . resource_manager ,
953- & editor. message_sender ,
954- ui_scene. ui_update_switches . node_overrides . as_mut ( ) . unwrap ( ) ,
955- ) ;
956- }
930+ let entry = editor. scenes . current_scene_entry_mut ( ) ;
931+ let ui = editor. engine . user_interfaces . first_mut ( ) ;
932+ if let Some ( game_scene) = entry. controller . downcast_mut :: < GameScene > ( ) {
933+ let graph = & mut editor. engine . scenes [ game_scene. scene ] . graph ;
934+ animation_editor. handle_ui_message (
935+ message,
936+ & entry. selection ,
937+ graph,
938+ game_scene. scene_content_root ,
939+ ui,
940+ & editor. engine . resource_manager ,
941+ & editor. message_sender ,
942+ game_scene. graph_switches . node_overrides . as_mut ( ) . unwrap ( ) ,
943+ ) ;
944+ } else if let Some ( ui_scene) = entry. controller . downcast_mut :: < UiScene > ( ) {
945+ let ui_root = ui_scene. ui . root ( ) ;
946+ animation_editor. handle_ui_message (
947+ message,
948+ & entry. selection ,
949+ & mut ui_scene. ui ,
950+ ui_root,
951+ ui,
952+ & editor. engine . resource_manager ,
953+ & editor. message_sender ,
954+ ui_scene. ui_update_switches . node_overrides . as_mut ( ) . unwrap ( ) ,
955+ ) ;
957956 }
958957
959958 self . animation_editor = Some ( animation_editor) ;
960959 }
961960
962961 fn on_leave_preview_mode ( & mut self , editor : & mut Editor ) {
963- let entry = some_or_return ! ( editor. scenes. current_scene_entry_mut( ) ) ;
962+ let entry = editor. scenes . current_scene_entry_mut ( ) ;
964963 let animation_editor = some_or_return ! ( self . animation_editor. as_mut( ) ) ;
965964 if let Some ( game_scene) = entry. controller . downcast_mut :: < GameScene > ( ) {
966965 let engine = & mut editor. engine ;
@@ -984,7 +983,7 @@ impl EditorPlugin for AnimationEditorPlugin {
984983 }
985984
986985 fn on_update ( & mut self , editor : & mut Editor ) {
987- let entry = some_or_return ! ( editor. scenes. current_scene_entry_mut( ) ) ;
986+ let entry = editor. scenes . current_scene_entry_mut ( ) ;
988987 let animation_editor = some_or_return ! ( self . animation_editor. as_mut( ) ) ;
989988 if let Some ( game_scene) = entry. controller . downcast_ref :: < GameScene > ( ) {
990989 animation_editor. update (
@@ -1016,7 +1015,7 @@ impl EditorPlugin for AnimationEditorPlugin {
10161015 self . on_sync_to_model ( editor) ;
10171016 }
10181017
1019- let entry = some_or_return ! ( editor. scenes. current_scene_entry_mut( ) ) ;
1018+ let entry = editor. scenes . current_scene_entry_mut ( ) ;
10201019 let animation_editor = some_or_return ! ( self . animation_editor. as_mut( ) ) ;
10211020 if let Some ( game_scene) = entry. controller . downcast_mut :: < GameScene > ( ) {
10221021 animation_editor. handle_message (
0 commit comments