Depsgraph: Fix unwanted node tree copy-over
Was caused by two things from the past: - Tagging would set id->recalc to COW update flag. This one is to be ignored. - Particle tagging will use psys recalc flags on id->recalc, but we only need to use flags from particles. Otherwise it will be some collisions in bit masks.
This commit is contained in:
@@ -410,7 +410,7 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
|
||||
}
|
||||
deg_graph_id_tag_legacy_compat(bmain, id, (eDepsgraph_Tag)0);
|
||||
}
|
||||
id->recalc |= flag;
|
||||
id->recalc |= (flag & PSYS_RECALC);
|
||||
int current_flag = flag;
|
||||
while (current_flag != 0) {
|
||||
eDepsgraph_Tag tag =
|
||||
|
||||
@@ -649,7 +649,9 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
|
||||
* everything is done by node tree update function which
|
||||
* only copies socket values.
|
||||
*/
|
||||
const int ignore_flag = (ID_RECALC_DRAW | ID_RECALC_ANIMATION);
|
||||
const int ignore_flag = (ID_RECALC_DRAW |
|
||||
ID_RECALC_ANIMATION |
|
||||
ID_RECALC_COPY_ON_WRITE);
|
||||
if ((id_cow->recalc & ~ignore_flag) == 0) {
|
||||
return id_cow;
|
||||
}
|
||||
|
||||
@@ -460,6 +460,7 @@ enum {
|
||||
LIB_TAG_NOT_ALLOCATED = 1 << 16,
|
||||
};
|
||||
|
||||
/* WARNING - when adding flags check on PSYS_RECALC */
|
||||
enum {
|
||||
/* RESET_AFTER_USE, used by update code (depsgraph). */
|
||||
ID_RECALC_NONE = 0,
|
||||
|
||||
Reference in New Issue
Block a user