[Bf-blender-cvs] [3f5960b] blender-v2.78-release: Fix T49299: Removing offset object in modifiers doesn't update mesh.

Bastien Montagne noreply at git.blender.org
Wed Sep 14 10:38:42 CEST 2016


Commit: 3f5960b869b44746b33ada062c1315c95bdb081c
Author: Bastien Montagne
Date:   Fri Sep 9 10:44:49 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB3f5960b869b44746b33ada062c1315c95bdb081c

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