[Bf-blender-cvs] [b27ba26] master: Fix T49299: Removing offset object in modifiers doesn't update mesh.

Bastien Montagne noreply at git.blender.org
Fri Sep 9 10:46:46 CEST 2016


Commit: b27ba26b440e5ba53e4f2af821cd81a3cdc35ee8
Author: Bastien Montagne
Date:   Fri Sep 9 10:44:49 2016 +0200
Branches: master
https://developer.blender.org/rBb27ba26b440e5ba53e4f2af821cd81a3cdc35ee8

Fix T49299: Removing offset object in modifiers doesn't update mesh.

Own fault in new ID management work, thought rebuild the DAG itself was
enough to actually update whole scene, but we actually need to tag datablocks
for update as well, when we change (or remove) one of their ID pointers...

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

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

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

diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 9b89a2f..442c407 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -154,7 +154,7 @@ enum {
 	ID_REMAP_IS_USER_ONE_SKIPPED    = 1 << 1,  /* There was some skipped 'user_one' usages of old_id. */
 };
 
-static int foreach_libblock_remap_callback(void *user_data, ID *UNUSED(id_self), ID **id_p, int cb_flag)
+static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id_p, int cb_flag)
 {
 	IDRemap *id_remap_data = user_data;
 	ID *old_id = id_remap_data->old_id;
@@ -212,6 +212,7 @@ static int foreach_libblock_remap_callback(void *user_data, ID *UNUSED(id_self),
 		else {
 			if (!is_never_null) {
 				*id_p = new_id;
+				DAG_id_tag_update(id_self, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
 			}
 			if (cb_flag & IDWALK_USER) {
 				id_us_min(old_id);




More information about the Bf-blender-cvs mailing list