[Bf-blender-cvs] [d3a792431e6] master: Cleanup: Use more clear visibility tag function name

Sergey Sharybin noreply at git.blender.org
Tue Jun 22 10:03:03 CEST 2021


Commit: d3a792431e6a71d23ea0916294b197003a8e2367
Author: Sergey Sharybin
Date:   Mon Jun 21 14:05:13 2021 +0200
Branches: master
https://developer.blender.org/rBd3a792431e6a71d23ea0916294b197003a8e2367

Cleanup: Use more clear visibility tag function name

No functional changes. Just makes it clear this is not an immediate
update, and will make an upcoming change more localized.

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

M	source/blender/blenkernel/intern/blender_undo.c
M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/builder/pipeline.cc
M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/editors/render/render_internal.c
M	source/blender/editors/scene/scene_edit.c
M	source/blender/editors/space_view3d/view3d_view.c
M	source/blender/makesrna/intern/rna_screen.c
M	source/blender/windowmanager/intern/wm_event_system.c

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

diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index 02076823675..ba41786c7fd 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -105,7 +105,7 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu,
 
   if (success) {
     /* important not to update time here, else non keyed transforms are lost */
-    DEG_on_visible_update(bmain, false);
+    DEG_tag_on_visible_update(bmain, false);
   }
 
   return success;
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 740124f6113..d547c7cb440 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -109,11 +109,11 @@ void DEG_free_node_types(void);
 
 /* Update Tagging -------------------------------- */
 
-/* Update dependency graph when visible scenes/layers changes. */
-void DEG_graph_on_visible_update(struct Main *bmain, Depsgraph *depsgraph, const bool do_time);
+/* Tag dependency graph for updates when visible scenes/layers changes. */
+void DEG_graph_tag_on_visible_update(struct Main *bmain, Depsgraph *depsgraph, const bool do_time);
 
-/* Update all dependency graphs when visible scenes/layers changes. */
-void DEG_on_visible_update(struct Main *bmain, const bool do_time);
+/* Tag all dependency graphs for update when visible scenes/layers changes. */
+void DEG_tag_on_visible_update(struct Main *bmain, const bool do_time);
 
 /* NOTE: Will return NULL if the flag is not known, allowing to gracefully handle situations
  * when recalc flag has been removed. */
diff --git a/source/blender/depsgraph/intern/builder/pipeline.cc b/source/blender/depsgraph/intern/builder/pipeline.cc
index 10bc7213061..db0ad98f25a 100644
--- a/source/blender/depsgraph/intern/builder/pipeline.cc
+++ b/source/blender/depsgraph/intern/builder/pipeline.cc
@@ -98,7 +98,7 @@ void AbstractBuilderPipeline::build_step_finalize()
   deg_graph_->scene_cow = (Scene *)deg_graph_->get_cow_id(&deg_graph_->scene->id);
   /* Flush visibility layer and re-schedule nodes for update. */
   deg_graph_build_finalize(bmain_, deg_graph_);
-  DEG_graph_on_visible_update(bmain_, reinterpret_cast<::Depsgraph *>(deg_graph_), false);
+  DEG_graph_tag_on_visible_update(bmain_, reinterpret_cast<::Depsgraph *>(deg_graph_), false);
 #if 0
   if (!DEG_debug_consistency_check(deg_graph_)) {
     printf("Consistency validation failed, ABORTING!\n");
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 204143d7cbd..24d333df1b0 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -804,16 +804,16 @@ void DEG_id_type_tag(Main *bmain, short id_type)
 }
 
 /* Update dependency graph when visible scenes/layers changes. */
-void DEG_graph_on_visible_update(Main *bmain, Depsgraph *depsgraph, const bool do_time)
+void DEG_graph_tag_on_visible_update(Main *bmain, Depsgraph *depsgraph, const bool do_time)
 {
   deg::Depsgraph *graph = (deg::Depsgraph *)depsgraph;
   deg::deg_graph_on_visible_update(bmain, graph, do_time);
 }
 
-void DEG_on_visible_update(Main *bmain, const bool do_time)
+void DEG_tag_on_visible_update(Main *bmain, const bool do_time)
 {
   for (deg::Depsgraph *depsgraph : deg::get_all_registered_graphs(bmain)) {
-    DEG_graph_on_visible_update(bmain, reinterpret_cast<::Depsgraph *>(depsgraph), do_time);
+    deg::deg_graph_on_visible_update(bmain, depsgraph, do_time);
   }
 }
 
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 0bec509cd7e..a2c3460c88b 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -773,7 +773,7 @@ static void render_endjob(void *rjv)
      * was locked before running the job.
      */
     WM_set_locked_interface(G_MAIN->wm.first, false);
-    DEG_on_visible_update(G_MAIN, false);
+    DEG_tag_on_visible_update(G_MAIN, false);
   }
 }
 
diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c
index 2b2a0d10e29..5195bc8303a 100644
--- a/source/blender/editors/scene/scene_edit.c
+++ b/source/blender/editors/scene/scene_edit.c
@@ -120,7 +120,7 @@ void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer)
 
   BKE_scene_set_background(bmain, scene);
   DEG_graph_relations_update(depsgraph);
-  DEG_on_visible_update(bmain, false);
+  DEG_tag_on_visible_update(bmain, false);
 
   ED_render_engine_changed(bmain, false);
   ED_update_for_newframe(bmain, depsgraph);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index f49b94280d6..b2db4de8d7e 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1517,7 +1517,7 @@ static int localview_remove_from_exec(bContext *C, wmOperator *op)
   }
 
   if (changed) {
-    DEG_on_visible_update(bmain, false);
+    DEG_tag_on_visible_update(bmain, false);
     DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
     WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
     WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index fba1d3cda9a..68bce2c00a3 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -169,7 +169,7 @@ static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
 
       /* It is possible that new layers becomes visible. */
       if (area->spacetype == SPACE_VIEW3D) {
-        DEG_on_visible_update(CTX_data_main(C), false);
+        DEG_tag_on_visible_update(CTX_data_main(C), false);
       }
 
       CTX_wm_window_set(C, prevwin);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 43d4859945d..7639f4a3d23 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -380,8 +380,10 @@ void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
      */
     Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer);
     if (is_after_open_file) {
+      /* TODO(sergey): Remove after the handling of visibility tags is delayed until graph
+       * evaluation. */
       DEG_graph_relations_update(depsgraph);
-      DEG_graph_on_visible_update(bmain, depsgraph, true);
+      DEG_graph_tag_on_visible_update(bmain, depsgraph, true);
     }
     DEG_make_active(depsgraph);
     BKE_scene_graph_update_tagged(depsgraph, bmain);



More information about the Bf-blender-cvs mailing list