Cleanup: Remove unused argument from ED_update_for_newframe
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 26 Oct 2017 08:18:15 +0000 (10:18 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 26 Oct 2017 08:18:15 +0000 (10:18 +0200)
This funciton will be extended, so better to get rid of unused arguments before
adding new ones.

source/blender/editors/include/ED_screen.h
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/scene/scene_edit.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_clip/tracking_ops_track.c
source/blender/windowmanager/intern/wm_event_system.c

index 2490b61cae2b80b070aea17fc251f2dec0f58c07..5db85d582fcc4e759789739cecf5d0f0e9071303 100644 (file)
@@ -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);
index b7ac6c5de32c417bd8968cb3c3d09080115c849a..e8e8fb2bfc207b4c545af8a047b270d3f87b9872 100644 (file)
@@ -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... */
index 93f010778f1948c4ee5c7e19f29cc1ce7a3c3cae..7de94be0c7aeae16d617e021e3172fdbcafe53f0 100644 (file)
@@ -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;
index b38b8640c8d59b7ce250e61520391ef157c3a0d5..060ac046ba1a6d8937c823fecf328baa56f4a54c 100644 (file)
@@ -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);
index 037e8adff9a0402fa0c3b942a2b38d185015a590..a5730686a4c28fc3559cba4df7cfb1163a752162 100644 (file)
@@ -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);
                }
        }
        
index c17beded91e1a023741c42d0f7aabb5eacf069e9..ec293c60d67ff4594a4f10e1664b28da86d28f89 100644 (file)
@@ -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;
index 0ac883d38cab414253943ccf5416cca3f7197341..061a783930d55071a553871ce6db5b76dcdea519 100644 (file)
@@ -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);
index 1f2d24a88f74b59719d1524234b50e5c0c46d9d5..e6bdd0e83b5c6d071d86b50c7cabfd4ef63eb640 100644 (file)
@@ -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);
index aeafa8066892bcbe8edb3ba2f32e0f05cf8fcf24..bc8aa756931bbc90cc8797bc843fe38720515e7e 100644 (file)
@@ -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);
index 0dd0ee8c7d46d2ecbccb56ba1b0a888a0eafb2a5..755cda9412816930af84cf342036aaf61ec72c9b 100644 (file)
@@ -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);
index d8feeb24d863b90254311d691fb721520c4fc389..2c3d36cdcfbb299a7680e6587fba2a2a4c4f5525 100644 (file)
@@ -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);
                                                        }
                                                }