Depsgraph: Make variable naming more clear

Disambiguate from nodes visibility flags.
This commit is contained in:
Sergey Sharybin
2022-07-19 15:23:44 +02:00
parent 44f1495b57
commit bc6b612d8b
3 changed files with 10 additions and 10 deletions

View File

@@ -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),

View File

@@ -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];

View File

@@ -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)