[Bf-blender-cvs] [b1b020806e2] master: Cleanup: remove unused ScreenAnimData.refresh

Campbell Barton noreply at git.blender.org
Fri Feb 21 17:02:27 CET 2020


Commit: b1b020806e2d5ca403de62dc956c4a27f36bc377
Author: Campbell Barton
Date:   Sat Feb 22 03:00:23 2020 +1100
Branches: master
https://developer.blender.org/rBb1b020806e2d5ca403de62dc956c4a27f36bc377

Cleanup: remove unused ScreenAnimData.refresh

===================================================================

M	source/blender/editors/include/ED_screen.h
M	source/blender/editors/include/ED_screen_types.h
M	source/blender/editors/screen/screen_edit.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/makesrna/intern/rna_screen.c

===================================================================

diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 1390567d5af..d003dac7fbf 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -230,8 +230,8 @@ bool ED_screen_change(struct bContext *C, struct bScreen *sc);
 void ED_screen_scene_change(struct bContext *C, struct wmWindow *win, struct Scene *scene);
 void ED_screen_set_active_region(struct bContext *C, struct wmWindow *win, const int xy[2]);
 void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen);
-void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable);
-void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh);
+void ED_screen_animation_timer(struct bContext *C, int redraws, int sync, int enable);
+void ED_screen_animation_timer_update(struct bScreen *screen, int redraws);
 void ED_screen_restore_temp_type(struct bContext *C, ScrArea *sa);
 ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
 void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index c515d501a8d..bbbcaab165a 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -30,7 +30,6 @@
 typedef struct ScreenAnimData {
   ARegion *ar; /* do not read from this, only for comparing if region exists */
   short redraws;
-  short refresh;
   short flag;           /* flags for playback */
   int sfra;             /* frame that playback was started from */
   int nextfra;          /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 61affe3896b..8e0e8116da2 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1449,7 +1449,7 @@ void ED_refresh_viewport_fps(bContext *C)
 /* redraws: uses defines from stime->redraws
  * enable: 1 - forward on, -1 - backwards on, 0 - off
  */
-void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync, int enable)
+void ED_screen_animation_timer(bContext *C, int redraws, int sync, int enable)
 {
   bScreen *screen = CTX_wm_screen(C);
   wmWindowManager *wm = CTX_wm_manager(C);
@@ -1489,7 +1489,6 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
       }
     }
     sad->redraws = redraws;
-    sad->refresh = refresh;
     sad->flag |= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
     sad->flag |= (sync == 0) ? ANIMPLAY_FLAG_NO_SYNC : (sync == 1) ? ANIMPLAY_FLAG_SYNC : 0;
 
@@ -1534,14 +1533,13 @@ static ARegion *time_top_left_3dwindow(bScreen *screen)
   return aret;
 }
 
-void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
+void ED_screen_animation_timer_update(bScreen *screen, int redraws)
 {
   if (screen && screen->animtimer) {
     wmTimer *wt = screen->animtimer;
     ScreenAnimData *sad = wt->customdata;
 
     sad->redraws = redraws;
-    sad->refresh = refresh;
     sad->ar = NULL;
     if (redraws & TIME_REGION) {
       sad->ar = time_top_left_3dwindow(screen);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index bd7475dc1a2..35d84d5d75e 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4616,20 +4616,18 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
 
   if (ED_screen_animation_playing(CTX_wm_manager(C))) {
     /* stop playback now */
-    ED_screen_animation_timer(C, 0, 0, 0, 0);
+    ED_screen_animation_timer(C, 0, 0, 0);
     BKE_sound_stop_scene(scene_eval);
 
     WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
   }
   else {
     /* these settings are currently only available from a menu in the TimeLine */
-    int refresh = SPACE_ACTION;
-
     if (mode == 1) { /* XXX only play audio forwards!? */
       BKE_sound_play_scene(scene_eval);
     }
 
-    ED_screen_animation_timer(C, screen->redraws_flag, refresh, sync, mode);
+    ED_screen_animation_timer(C, screen->redraws_flag, sync, mode);
 
     if (screen->animtimer) {
       wmTimer *wt = screen->animtimer;
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index b0304b742df..89f65da335a 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -80,7 +80,7 @@ static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
   /* the settings for this are currently only available from a menu in the TimeLine,
    * hence refresh=SPACE_ACTION, as timeline is now in there
    */
-  ED_screen_animation_timer_update(screen, screen->redraws_flag, SPACE_ACTION);
+  ED_screen_animation_timer_update(screen, screen->redraws_flag);
 }
 
 static bool rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr))



More information about the Bf-blender-cvs mailing list