Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_tag.cc
| Context not available. | |||||
| int deg_recalc_flags_for_legacy_zero() | int deg_recalc_flags_for_legacy_zero() | ||||
| { | { | ||||
| return ID_RECALC_ALL & | return ID_RECALC_ALL & ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE); | ||||
| ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | ID_RECALC_TIME); | |||||
| } | } | ||||
| int deg_recalc_flags_effective(Depsgraph *graph, int flags) | int deg_recalc_flags_effective(Depsgraph *graph, int flags) | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| static void deg_graph_clear_id_node_func(void *__restrict data_v, | |||||
| const int i, | |||||
| const TaskParallelTLS *__restrict /*tls*/) | |||||
| { | |||||
| /* TODO: we clear original ID recalc flags here, but this may not work | |||||
| * correctly when there are multiple depsgraph with others still using | |||||
| * the recalc flag. */ | |||||
| DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(data_v); | |||||
| DEG::IDNode *id_node = deg_graph->id_nodes[i]; | |||||
| id_node->is_user_modified = false; | |||||
| deg_graph_clear_id_recalc_flags(id_node->id_cow); | |||||
| if (deg_graph->is_active) { | |||||
| deg_graph_clear_id_recalc_flags(id_node->id_orig); | |||||
| } | |||||
| } | |||||
| void DEG_ids_clear_recalc(Main *UNUSED(bmain), Depsgraph *depsgraph) | void DEG_ids_clear_recalc(Main *UNUSED(bmain), Depsgraph *depsgraph) | ||||
| { | { | ||||
| DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph); | DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph); | ||||
| Context not available. | |||||
| return; | return; | ||||
| } | } | ||||
| /* Go over all ID nodes nodes, clearing tags. */ | /* Go over all ID nodes nodes, clearing tags. */ | ||||
| for (DEG::IDNode *id_node : deg_graph->id_nodes) { | const int num_id_nodes = deg_graph->id_nodes.size(); | ||||
| /* TODO: we clear original ID recalc flags here, but this may not work | TaskParallelSettings settings; | ||||
| * correctly when there are multiple depsgraph with others still using | BLI_parallel_range_settings_defaults(&settings); | ||||
| * the recalc flag. */ | settings.min_iter_per_thread = 1024; | ||||
| id_node->is_user_modified = false; | BLI_task_parallel_range(0, num_id_nodes, deg_graph, deg_graph_clear_id_node_func, &settings); | ||||
| deg_graph_clear_id_recalc_flags(id_node->id_cow); | memset(deg_graph->id_type_updated, 0, sizeof(deg_graph->id_type_updated)); | ||||
| if (deg_graph->is_active) { | |||||
| deg_graph_clear_id_recalc_flags(id_node->id_orig); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| Context not available. | |||||