[Bf-blender-cvs] [b40b9195e41] master: Fix T65160: missing updates when setting origin on a collection instance

Philipp Oeser noreply at git.blender.org
Mon May 27 11:55:34 CEST 2019


Commit: b40b9195e41acb0d68739fc64a518b1a6ec718c5
Author: Philipp Oeser
Date:   Mon May 27 11:33:15 2019 +0200
Branches: master
https://developer.blender.org/rBb40b9195e41acb0d68739fc64a518b1a6ec718c5

Fix T65160: missing updates when setting origin on a collection instance

Reviewers: sergey, brecht

Maniphest Tasks: T65160

Differential Revision: https://developer.blender.org/D4953

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

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 8836d913475..61cdf689044 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1335,6 +1335,12 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
       BKE_object_batch_cache_dirty_tag(tob);
       DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
     }
+    /* special support for dupligroups */
+    else if (tob->instance_collection &&
+             tob->instance_collection->id.tag & LIB_TAG_DOIT) {
+      DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM);
+      DEG_id_tag_update(&tob->instance_collection->id, ID_RECALC_COPY_ON_WRITE);
+    }
   }
 
   if (tot_change) {



More information about the Bf-blender-cvs mailing list