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.
This commit is contained in:
Bastien Montagne 2014-12-10 13:25:04 +01:00
parent 7366283c01
commit 01bda15832
Notes: blender-bot 2023-02-14 10:14:07 +01:00
Referenced by issue #42472, Tweaking last operator after duplicating+rotating group instance resets previous duplicate if 3D cursor is used for rotation
1 changed files with 9 additions and 0 deletions

View File

@ -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);