Cleanup: remove blender-internal update flag
authorCampbell Barton <ideasman42@gmail.com>
Sat, 26 Jan 2019 07:18:13 +0000 (18:18 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 26 Jan 2019 07:46:40 +0000 (18:46 +1100)
source/blender/editors/render/render_update.c
source/blender/render/extern/include/RE_engine.h

index 47d8eff8eb6a3b55b8d209e20c70201ffb3ec661..fede0507f3649cdb9882aae533ee733da70dcf37 100644 (file)
@@ -210,32 +210,6 @@ void ED_render_engine_changed(Main *bmain)
  * editor level updates when the ID changes. when these ID blocks are in *
  * the dependency graph, we can get rid of the manual dependency checks  */
 
-static void render_engine_flag_changed(Main *bmain, int update_flag)
-{
-       bScreen *sc;
-       ScrArea *sa;
-       ARegion *ar;
-
-       for (sc = bmain->screen.first; sc; sc = sc->id.next) {
-               for (sa = sc->areabase.first; sa; sa = sa->next) {
-                       if (sa->spacetype != SPACE_VIEW3D)
-                               continue;
-
-                       for (ar = sa->regionbase.first; ar; ar = ar->next) {
-                               RegionView3D *rv3d;
-
-                               if (ar->regiontype != RGN_TYPE_WINDOW)
-                                       continue;
-
-                               rv3d = ar->regiondata;
-                               if (rv3d->render_engine)
-                                       rv3d->render_engine->update_flag |= update_flag;
-
-                       }
-               }
-       }
-}
-
 static void material_changed(Main *UNUSED(bmain), Material *ma)
 {
        /* icons */
@@ -317,7 +291,6 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id)
        switch (GS(id->name)) {
                case ID_MA:
                        material_changed(bmain, (Material *)id);
-                       render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_MA);
                        break;
                case ID_TE:
                        texture_changed(bmain, (Tex *)id);
@@ -333,10 +306,8 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id)
                        break;
                case ID_SCE:
                        scene_changed(bmain, (Scene *)id);
-                       render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_OTHER);
                        break;
                default:
-                       render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_OTHER);
                        break;
        }
 }
index 8a6282aee01672d53663e2d88741ddbeeb722993..8ce3cfe75f843a83aaf6e3e522f24d88a82097ff 100644 (file)
@@ -79,11 +79,6 @@ struct ViewLayer;
 #define RE_ENGINE_HIGHLIGHT_TILES      32
 #define RE_ENGINE_USED_FOR_VIEWPORT    64
 
-/* RenderEngine.update_flag, used by internal now */
-#define RE_ENGINE_UPDATE_MA                    1
-#define RE_ENGINE_UPDATE_OTHER         2
-#define RE_ENGINE_UPDATE_DATABASE      4
-
 extern ListBase R_engines;
 
 typedef struct RenderEngineType {
@@ -138,10 +133,6 @@ typedef struct RenderEngine {
        /* Depsgraph */
        struct Depsgraph *depsgraph;
 
-       /* for blender internal only */
-       int update_flag;
-       int job_update_flag;
-
        /* callback for render pass query */
        ThreadMutex update_render_passes_mutex;
        update_render_passes_cb_t update_render_passes_cb;