[Bf-blender-cvs] [dcdffe719f5] master: Fix ID_swap not keeping original recalc flags.

Bastien Montagne noreply at git.blender.org
Mon Jun 29 17:28:09 CEST 2020


Commit: dcdffe719f5e2c5474f26da3c47fb2e147867887
Author: Bastien Montagne
Date:   Fri Jun 26 17:55:23 2020 +0200
Branches: master
https://developer.blender.org/rBdcdffe719f5e2c5474f26da3c47fb2e147867887

Fix ID_swap not keeping original recalc flags.

Note that we might be missing more things there still, maybe some tags
e.g. should also be swapped?

===================================================================

M	source/blender/blenkernel/intern/lib_id.c

===================================================================

diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index 1c0ce2a5472..0312fa566e8 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -679,6 +679,9 @@ static void id_swap(Main *bmain, ID *id_a, ID *id_b, const bool do_full_id)
     /* Exception: IDProperties. */
     id_a->properties = id_b_back.properties;
     id_b->properties = id_a_back.properties;
+    /* Exception: recalc flags. */
+    id_a->recalc = id_b_back.recalc;
+    id_b->recalc = id_a_back.recalc;
   }
 
   if (bmain != NULL) {



More information about the Bf-blender-cvs mailing list