Fix #108778: Crash when rendering multiple view layers #108816
|
@ -21,6 +21,7 @@
|
|||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_collection.h"
|
||||
|
||||
#include "RNA_prototypes.h"
|
||||
|
||||
|
@ -183,6 +184,14 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
|
|||
flag |= ID_RECALC_NTREE_OUTPUT;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Collection content might have changed (children collection might have been added or
|
||||
* removed from the graph based on their inclusion and visibility flags). */
|
||||
const ID_Type id_type = GS(id_node->id_cow->name);
|
||||
if (id_type == ID_GR) {
|
||||
BKE_collection_object_cache_free(reinterpret_cast<Collection *>(id_node->id_cow));
|
||||
}
|
||||
}
|
||||
/* 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. */
|
||||
flag |= id_orig->recalc;
|
||||
|
|
Loading…
Reference in New Issue