From 01bda15832bf2084618fdbf242cd550f0ebbf727 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 10 Dec 2014 13:25:04 +0100 Subject: Fix T42472: Undoing/Redoing repeated transform operator gives wrong final matrix on objects with no geom data. This hack should not be needed here, quoting Sergey, the actual issue comes from BKE_object_handle_update_ex, which is calling BKE_object_where_is_calc_ex when it shouldn't. Propper fix is depsgraph refactor topic, though. --- source/blender/blenkernel/intern/depsgraph.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/blenkernel/intern/depsgraph.c') diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 44a0b93fc01..566aa6657b9 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2357,6 +2357,15 @@ void DAG_on_visible_update(Main *bmain, const bool do_time) ob->recalc |= OB_RECALC_DATA; lib_id_recalc_tag(bmain, &ob->id); } + /* This should not be needed here, but in some cases, like after a redo, we can end up with + * a wrong final matrix (see T42472). + * Quoting Sergey, this comes from BKE_object_handle_update_ex, which is calling + * BKE_object_where_is_calc_ex when it shouldn't, but that issue is not easily fixable. + */ + else { + ob->recalc |= OB_RECALC_OB; + lib_id_recalc_tag(bmain, &ob->id); + } if (ob->proxy && (ob->proxy_group == NULL)) { ob->proxy->recalc |= OB_RECALC_DATA; lib_id_recalc_tag(bmain, &ob->id); -- cgit v1.2.3