Page MenuHome

Fix T83422: Dimensions incorrect after undoing if it has modified geometry.
ClosedPublic

Authored by Bastien Montagne (mont29) on Dec 8 2020, 6:04 PM.

Details

Summary

Root of the issue is that BKE_object_eval_boundbox (that ports back
evaluated bbox to orig object during active depsgraph evaluation) is
only called when object's geometry actually is evaluated.

However, with new undo, often Object itself can be changed by undo,
without requiring its geometry to be re-evaluated, which was leading to
the evaluated bbox not being copied back into orig object anymore.

Fixing that by moving bbox copying-to-orig code into
BKE_object_sync_to_original instead, which is always executed when
object is evaluated (as hinted by the comment above
BKE_object_eval_boundbox actually).

Also allows to cleanup code for armature eval, apparently.

Diff Detail

Repository
rB Blender
Branch
T83422 (branched from master)
Build Status
Buildable 11924
Build 11924: arc lint + arc unit

Event Timeline

Bastien Montagne (mont29) requested review of this revision.Dec 8 2020, 6:04 PM
Bastien Montagne (mont29) created this revision.

Rebase on master, removed debug prints.

@Sergey Sharybin (sergey) think this is ready for review.

Generally fine, one thing i would do different is to change void BKE_object_eval_boundbox() to static void object_sync_boundbox_to_original() and do the call from BKE_object_sync_to_original().

This revision is now accepted and ready to land.Jan 11 2021, 4:03 PM