[Bf-blender-cvs] [bc6b612d8b6] master: Depsgraph: Make variable naming more clear

Sergey Sharybin noreply at git.blender.org
Tue Jul 19 15:24:55 CEST 2022


Commit: bc6b612d8b673a6dcfce110466cd8e924103fb1d
Author: Sergey Sharybin
Date:   Tue Jul 19 15:23:44 2022 +0200
Branches: master
https://developer.blender.org/rBbc6b612d8b673a6dcfce110466cd8e924103fb1d

Depsgraph: Make variable naming more clear

Disambiguate from nodes visibility flags.

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

M	source/blender/depsgraph/intern/depsgraph.cc
M	source/blender/depsgraph/intern/depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_tag.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 4514084059a..787b4210cff 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -46,8 +46,8 @@ namespace blender::deg {
 Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
     : time_source(nullptr),
       need_update(true),
-      need_visibility_update(true),
-      need_visibility_time_update(false),
+      need_tag_id_on_graph_visibility_update(true),
+      need_tag_id_on_graph_visibility_time_update(false),
       bmain(bmain),
       scene(scene),
       view_layer(view_layer),
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index fc92580f5f5..fc24e98acb7 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -93,8 +93,8 @@ struct Depsgraph {
 
   /* Indicated whether IDs in this graph are to be tagged as if they first appear visible, with
    * an optional tag for their animation (time) update. */
-  bool need_visibility_update;
-  bool need_visibility_time_update;
+  bool need_tag_id_on_graph_visibility_update;
+  bool need_tag_id_on_graph_visibility_time_update;
 
   /* Indicates which ID types were updated. */
   char id_type_updated[INDEX_ID_MAX];
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index b50081458ad..9cd5980d8fe 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -494,19 +494,19 @@ void deg_graph_node_tag_zero(Main *bmain,
 
 void graph_tag_on_visible_update(Depsgraph *graph, const bool do_time)
 {
-  graph->need_visibility_update = true;
-  graph->need_visibility_time_update |= do_time;
+  graph->need_tag_id_on_graph_visibility_update = true;
+  graph->need_tag_id_on_graph_visibility_time_update |= do_time;
 }
 
 } /* namespace */
 
 void graph_tag_ids_for_visible_update(Depsgraph *graph)
 {
-  if (!graph->need_visibility_update) {
+  if (!graph->need_tag_id_on_graph_visibility_update) {
     return;
   }
 
-  const bool do_time = graph->need_visibility_time_update;
+  const bool do_time = graph->need_tag_id_on_graph_visibility_time_update;
   Main *bmain = graph->bmain;
 
   /* NOTE: It is possible to have this function called with `do_time=false` first and later (prior
@@ -561,8 +561,8 @@ void graph_tag_ids_for_visible_update(Depsgraph *graph)
     id_node->previously_visible_components_mask = id_node->visible_components_mask;
   }
 
-  graph->need_visibility_update = false;
-  graph->need_visibility_time_update = false;
+  graph->need_tag_id_on_graph_visibility_update = false;
+  graph->need_tag_id_on_graph_visibility_time_update = false;
 }
 
 NodeType geometry_tag_to_component(const ID *id)



More information about the Bf-blender-cvs mailing list