[Bf-blender-cvs] [0782c9f8dc4] blender2.8: Fix T51920: Invalidate draw cache when changing object origin

Luca Rood noreply at git.blender.org
Wed Jun 28 14:59:33 CEST 2017


Commit: 0782c9f8dc4c9ab64321af27e1a64b5eb3523ffc
Author: Luca Rood
Date:   Wed Jun 28 14:58:25 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB0782c9f8dc4c9ab64321af27e1a64b5eb3523ffc

Fix T51920: Invalidate draw cache when changing object origin

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

M	source/blender/editors/object/object_transform.c

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

diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 8733b3c1b06..542b98d771f 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1053,9 +1053,12 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
 	}
 	BLI_freelistN(&ctx_data_list);
 
-	for (tob = bmain->object.first; tob; tob = tob->id.next)
-		if (tob->data && (((ID *)tob->data)->tag & LIB_TAG_DOIT))
+	for (tob = bmain->object.first; tob; tob = tob->id.next) {
+		if (tob->data && (((ID *)tob->data)->tag & LIB_TAG_DOIT)) {
+			BKE_mesh_batch_cache_dirty(tob->data, BKE_MESH_BATCH_DIRTY_NOCHECK);
 			DEG_id_tag_update(&tob->id, OB_RECALC_OB | OB_RECALC_DATA);
+		}
+	}
 
 	if (tot_change) {
 		WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);




More information about the Bf-blender-cvs mailing list