Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder.cc
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | |||||
| void deg_graph_build_finalize(Main *bmain, Depsgraph *graph) | void deg_graph_build_finalize(Main *bmain, Depsgraph *graph) | ||||
| { | { | ||||
| /* Make sure dependencies of visible ID datablocks are visible. */ | /* Make sure dependencies of visible ID datablocks are visible. */ | ||||
| deg_graph_build_flush_visibility(graph); | deg_graph_build_flush_visibility(graph); | ||||
| /* Re-tag IDs for update if it was tagged before the relations | /* Re-tag IDs for update if it was tagged before the relations | ||||
| * update tag. */ | * update tag. */ | ||||
| for (IDNode *id_node : graph->id_nodes) { | for (IDNode *id_node : graph->id_nodes) { | ||||
| ID *id = id_node->id_orig; | ID *id_orig = id_node->id_orig; | ||||
| id_node->finalize_build(graph); | id_node->finalize_build(graph); | ||||
| int flag = 0; | int flag = 0; | ||||
| /* Tag rebuild if special evaluation flags changed. */ | /* Tag rebuild if special evaluation flags changed. */ | ||||
| if (id_node->eval_flags != id_node->previous_eval_flags) { | if (id_node->eval_flags != id_node->previous_eval_flags) { | ||||
| flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY; | flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY; | ||||
| } | } | ||||
| /* Tag rebuild if the custom data mask changed. */ | /* Tag rebuild if the custom data mask changed. */ | ||||
| if (id_node->customdata_masks != id_node->previous_customdata_masks) { | if (id_node->customdata_masks != id_node->previous_customdata_masks) { | ||||
| flag |= ID_RECALC_GEOMETRY; | flag |= ID_RECALC_GEOMETRY; | ||||
| } | } | ||||
| if (!deg_copy_on_write_is_expanded(id_node->id_cow)) { | if (!deg_copy_on_write_is_expanded(id_node->id_cow)) { | ||||
| flag |= ID_RECALC_COPY_ON_WRITE; | flag |= ID_RECALC_COPY_ON_WRITE; | ||||
| /* This means ID is being added to the dependency graph first | /* This means ID is being added to the dependency graph first | ||||
| * time, which is similar to "ob-visible-change" */ | * time, which is similar to "ob-visible-change" */ | ||||
| if (GS(id->name) == ID_OB) { | if (GS(id_orig->name) == ID_OB) { | ||||
| flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY; | flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY; | ||||
| } | } | ||||
| } | } | ||||
| /* Restore recalc flags from original ID, which could possibly contain recalc flags set by | |||||
| * an operator and then were carried on by the undo system. */ | |||||
brecht: `then were` -> `then were` | |||||
| flag |= id_orig->recalc; | |||||
| if (flag != 0) { | if (flag != 0) { | ||||
| graph_id_tag_update(bmain, graph, id_node->id_orig, flag, DEG_UPDATE_SOURCE_RELATIONS); | graph_id_tag_update(bmain, graph, id_node->id_orig, flag, DEG_UPDATE_SOURCE_RELATIONS); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } // namespace DEG | } // namespace DEG | ||||
then were -> then were