Cleanup: remove unused ScreenAnimData.refresh
This commit is contained in:
@@ -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_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_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_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(struct bContext *C, int redraws, int sync, int enable);
|
||||||
void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh);
|
void ED_screen_animation_timer_update(struct bScreen *screen, int redraws);
|
||||||
void ED_screen_restore_temp_type(struct bContext *C, ScrArea *sa);
|
void ED_screen_restore_temp_type(struct bContext *C, ScrArea *sa);
|
||||||
ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
|
ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
|
||||||
void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
|
void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
typedef struct ScreenAnimData {
|
typedef struct ScreenAnimData {
|
||||||
ARegion *ar; /* do not read from this, only for comparing if region exists */
|
ARegion *ar; /* do not read from this, only for comparing if region exists */
|
||||||
short redraws;
|
short redraws;
|
||||||
short refresh;
|
|
||||||
short flag; /* flags for playback */
|
short flag; /* flags for playback */
|
||||||
int sfra; /* frame that playback was started from */
|
int sfra; /* frame that playback was started from */
|
||||||
int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
|
int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
|
||||||
|
@@ -1449,7 +1449,7 @@ void ED_refresh_viewport_fps(bContext *C)
|
|||||||
/* redraws: uses defines from stime->redraws
|
/* redraws: uses defines from stime->redraws
|
||||||
* enable: 1 - forward on, -1 - backwards on, 0 - off
|
* 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);
|
bScreen *screen = CTX_wm_screen(C);
|
||||||
wmWindowManager *wm = CTX_wm_manager(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->redraws = redraws;
|
||||||
sad->refresh = refresh;
|
|
||||||
sad->flag |= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
|
sad->flag |= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
|
||||||
sad->flag |= (sync == 0) ? ANIMPLAY_FLAG_NO_SYNC : (sync == 1) ? ANIMPLAY_FLAG_SYNC : 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;
|
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) {
|
if (screen && screen->animtimer) {
|
||||||
wmTimer *wt = screen->animtimer;
|
wmTimer *wt = screen->animtimer;
|
||||||
ScreenAnimData *sad = wt->customdata;
|
ScreenAnimData *sad = wt->customdata;
|
||||||
|
|
||||||
sad->redraws = redraws;
|
sad->redraws = redraws;
|
||||||
sad->refresh = refresh;
|
|
||||||
sad->ar = NULL;
|
sad->ar = NULL;
|
||||||
if (redraws & TIME_REGION) {
|
if (redraws & TIME_REGION) {
|
||||||
sad->ar = time_top_left_3dwindow(screen);
|
sad->ar = time_top_left_3dwindow(screen);
|
||||||
|
@@ -4616,20 +4616,18 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
|
|||||||
|
|
||||||
if (ED_screen_animation_playing(CTX_wm_manager(C))) {
|
if (ED_screen_animation_playing(CTX_wm_manager(C))) {
|
||||||
/* stop playback now */
|
/* 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);
|
BKE_sound_stop_scene(scene_eval);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* these settings are currently only available from a menu in the TimeLine */
|
/* these settings are currently only available from a menu in the TimeLine */
|
||||||
int refresh = SPACE_ACTION;
|
|
||||||
|
|
||||||
if (mode == 1) { /* XXX only play audio forwards!? */
|
if (mode == 1) { /* XXX only play audio forwards!? */
|
||||||
BKE_sound_play_scene(scene_eval);
|
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) {
|
if (screen->animtimer) {
|
||||||
wmTimer *wt = screen->animtimer;
|
wmTimer *wt = screen->animtimer;
|
||||||
|
@@ -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,
|
/* the settings for this are currently only available from a menu in the TimeLine,
|
||||||
* hence refresh=SPACE_ACTION, as timeline is now in there
|
* 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))
|
static bool rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr))
|
||||||
|
Reference in New Issue
Block a user