Cleanup: Remove unused argument from ED_update_for_newframe
This funciton will be extended, so better to get rid of unused arguments before adding new ones.
This commit is contained in:
@@ -163,7 +163,7 @@ bool ED_workspace_layout_cycle(
|
||||
struct bContext *C) ATTR_NONNULL();
|
||||
|
||||
/* anim */
|
||||
void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, int mute);
|
||||
void ED_update_for_newframe(struct Main *bmain, struct Scene *scene);
|
||||
|
||||
void ED_refresh_viewport_fps(struct bContext *C);
|
||||
int ED_screen_animation_play(struct bContext *C, int sync, int mode);
|
||||
|
||||
@@ -2193,7 +2193,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
|
||||
* this part of the process before a threaded job is created */
|
||||
|
||||
//scene->r.cfra = f;
|
||||
//ED_update_for_newframe(CTX_data_main(C), scene, 1);
|
||||
//ED_update_for_newframe(CTX_data_main(C), scene);
|
||||
|
||||
/* ok, this doesn't work with drivers, but is way faster.
|
||||
* let's use this for now and hope nobody wants to drive the time value... */
|
||||
|
||||
@@ -364,7 +364,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job)
|
||||
frame = surface->start_frame;
|
||||
orig_frame = scene->r.cfra;
|
||||
scene->r.cfra = (int)frame;
|
||||
ED_update_for_newframe(job->bmain, scene, 1);
|
||||
ED_update_for_newframe(job->bmain, scene);
|
||||
|
||||
/* Init surface */
|
||||
if (!dynamicPaint_createUVSurface(scene, surface, job->progress, job->do_update)) {
|
||||
@@ -390,7 +390,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job)
|
||||
|
||||
/* calculate a frame */
|
||||
scene->r.cfra = (int)frame;
|
||||
ED_update_for_newframe(job->bmain, scene, 1);
|
||||
ED_update_for_newframe(job->bmain, scene);
|
||||
if (!dynamicPaint_calculateFrame(surface, job->eval_ctx, scene, cObject, frame)) {
|
||||
job->success = 0;
|
||||
return;
|
||||
|
||||
@@ -408,7 +408,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
|
||||
/* Modifying the global scene isn't nice, but we can do it in
|
||||
* this part of the process before a threaded job is created */
|
||||
scene->r.cfra = (int)eval_time;
|
||||
ED_update_for_newframe(CTX_data_main(C), scene, 1);
|
||||
ED_update_for_newframe(CTX_data_main(C), scene);
|
||||
|
||||
/* now scene data should be current according to animation system, so we fill the channels */
|
||||
|
||||
@@ -957,7 +957,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
|
||||
|
||||
/* reset to original current frame */
|
||||
scene->r.cfra = origFrame;
|
||||
ED_update_for_newframe(CTX_data_main(C), scene, 1);
|
||||
ED_update_for_newframe(CTX_data_main(C), scene);
|
||||
|
||||
/* ******** init domain object's matrix ******** */
|
||||
copy_m4_m4(domainMat, fsDomain->obmat);
|
||||
|
||||
@@ -338,7 +338,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
|
||||
RE_SetReports(re, NULL);
|
||||
|
||||
// no redraw needed, we leave state as we entered it
|
||||
ED_update_for_newframe(mainp, scene, 1);
|
||||
ED_update_for_newframe(mainp, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene);
|
||||
|
||||
@@ -652,7 +652,7 @@ static void render_endjob(void *rjv)
|
||||
if (rj->anim && !(rj->scene->r.scemode & R_NO_FRAME_UPDATE)) {
|
||||
/* possible this fails of loading new file while rendering */
|
||||
if (G.main->wm.first) {
|
||||
ED_update_for_newframe(G.main, rj->scene, 1);
|
||||
ED_update_for_newframe(G.main, rj->scene);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1177,7 +1177,7 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* no redraw needed, we leave state as we entered it */
|
||||
// ED_update_for_newframe(C, 1);
|
||||
// ED_update_for_newframe(C);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, CTX_data_scene(C));
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -132,7 +132,7 @@ void ED_scene_changed_update(Main *bmain, bContext *C, Scene *scene_new, const b
|
||||
|
||||
ED_screen_update_after_scene_change(active_screen, scene_new);
|
||||
ED_render_engine_changed(bmain);
|
||||
ED_update_for_newframe(bmain, scene_new, 1);
|
||||
ED_update_for_newframe(bmain, scene_new);
|
||||
|
||||
/* complete redraw */
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
@@ -1725,9 +1725,8 @@ void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
|
||||
}
|
||||
}
|
||||
|
||||
/* results in fully updated anim system
|
||||
* screen can be NULL */
|
||||
void ED_update_for_newframe(Main *bmain, Scene *scene, int UNUSED(mute))
|
||||
/* results in fully updated anim system */
|
||||
void ED_update_for_newframe(Main *bmain, Scene *scene)
|
||||
{
|
||||
#ifdef DURIAN_CAMERA_SWITCH
|
||||
void *camera = BKE_scene_camera_switch_find(scene);
|
||||
|
||||
@@ -3555,7 +3555,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
|
||||
}
|
||||
|
||||
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
|
||||
ED_update_for_newframe(bmain, scene, 1);
|
||||
ED_update_for_newframe(bmain, scene);
|
||||
|
||||
for (window = wm->windows.first; window; window = window->next) {
|
||||
const bScreen *win_screen = WM_window_get_active_screen(window);
|
||||
|
||||
@@ -297,7 +297,7 @@ static void track_markers_endjob(void *tmv)
|
||||
tmj->scene->r.cfra = BKE_movieclip_remap_clip_to_scene_frame(tmj->clip,
|
||||
tmj->lastfra);
|
||||
if (wm != NULL) {
|
||||
ED_update_for_newframe(tmj->main, tmj->scene, 0);
|
||||
ED_update_for_newframe(tmj->main, tmj->scene);
|
||||
}
|
||||
|
||||
BKE_autotrack_context_sync(tmj->context);
|
||||
|
||||
@@ -399,7 +399,7 @@ void wm_event_do_notifiers(bContext *C)
|
||||
if (G.is_rendering == false) {
|
||||
|
||||
/* depsgraph gets called, might send more notifiers */
|
||||
ED_update_for_newframe(CTX_data_main(C), scene, 1);
|
||||
ED_update_for_newframe(CTX_data_main(C), scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2619,7 +2619,7 @@ void wm_event_do_handlers(bContext *C)
|
||||
int ncfra = time * (float)FPS + 0.5f;
|
||||
if (ncfra != scene->r.cfra) {
|
||||
scene->r.cfra = ncfra;
|
||||
ED_update_for_newframe(CTX_data_main(C), scene, 1);
|
||||
ED_update_for_newframe(CTX_data_main(C), scene);
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user