Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -67,6 +67,7 @@ Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluati
|
||||
{
|
||||
BLI_spin_init(&lock);
|
||||
memset(id_type_updated, 0, sizeof(id_type_updated));
|
||||
memset(id_type_updated_backup, 0, sizeof(id_type_updated_backup));
|
||||
memset(id_type_exist, 0, sizeof(id_type_exist));
|
||||
memset(physics_relations, 0, sizeof(physics_relations));
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@ struct Depsgraph {
|
||||
|
||||
/* Indicates which ID types were updated. */
|
||||
char id_type_updated[INDEX_ID_MAX];
|
||||
/* Accumulate id type updates from multiple update passes. */
|
||||
char id_type_updated_backup[INDEX_ID_MAX];
|
||||
|
||||
/* Indicates type of IDs present in the depsgraph. */
|
||||
char id_type_exist[INDEX_ID_MAX];
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <cstring> /* required for memset */
|
||||
#include <queue>
|
||||
|
||||
#include "BLI_index_range.hh"
|
||||
#include "BLI_math_bits.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_utildefines.h"
|
||||
@@ -968,6 +969,14 @@ void DEG_ids_clear_recalc(Depsgraph *depsgraph, const bool backup)
|
||||
deg_graph_clear_id_recalc_flags(id_node->id_orig);
|
||||
}
|
||||
}
|
||||
|
||||
if (backup) {
|
||||
for (const int64_t i : blender::IndexRange(INDEX_ID_MAX)) {
|
||||
if (deg_graph->id_type_updated[i] != 0) {
|
||||
deg_graph->id_type_updated_backup[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
memset(deg_graph->id_type_updated, 0, sizeof(deg_graph->id_type_updated));
|
||||
}
|
||||
|
||||
@@ -979,4 +988,11 @@ void DEG_ids_restore_recalc(Depsgraph *depsgraph)
|
||||
id_node->id_cow->recalc |= id_node->id_cow_recalc_backup;
|
||||
id_node->id_cow_recalc_backup = 0;
|
||||
}
|
||||
|
||||
for (const int64_t i : blender::IndexRange(INDEX_ID_MAX)) {
|
||||
if (deg_graph->id_type_updated_backup[i] != 0) {
|
||||
deg_graph->id_type_updated[i] = 1;
|
||||
}
|
||||
}
|
||||
memset(deg_graph->id_type_updated_backup, 0, sizeof(deg_graph->id_type_updated_backup));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user