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.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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. */
|
||||
|
@@ -98,7 +98,7 @@ void AbstractBuilderPipeline::build_step_finalize()
|
||||
deg_graph_->scene_cow = (Scene *)deg_graph_->get_cow_id(°_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");
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user