diff options
author | Bastien Montagne <bastien@blender.org> | 2020-12-08 19:57:16 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-01-11 19:59:21 +0300 |
commit | 2a8b987e9e4dacd788ce955966d28c04ed91caf3 (patch) | |
tree | 3d55baaab4acbb89753228eb92836a108a7c13d2 /source/blender/blenkernel/intern/armature_update.c | |
parent | e44e0e4e78bed21846c4c2455f81d678f61d212e (diff) |
Fix T83422: Dimensions incorrect after undoing if it has modified geometry.
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.
Maniphest Tasks: T83422
Differential Revision: https://developer.blender.org/D9789
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index de00372c3ec..8c666597276 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -830,18 +830,6 @@ void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, BKE_splineik_execute_tree(depsgraph, scene, object, rootchan, ctime); } -/* Common part for both original and proxy armatrues. */ -static void pose_eval_done_common(struct Depsgraph *depsgraph, Object *object) -{ - const bArmature *armature = (bArmature *)object->data; - if (armature->edbo != NULL) { - return; - } - bPose *pose = object->pose; - UNUSED_VARS_NDEBUG(pose); - BLI_assert(pose != NULL); - BKE_object_eval_boundbox(depsgraph, object); -} static void pose_eval_cleanup_common(Object *object) { bPose *pose = object->pose; @@ -857,7 +845,6 @@ void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) UNUSED_VARS_NDEBUG(pose); DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); BLI_assert(object->type == OB_ARMATURE); - pose_eval_done_common(depsgraph, object); } void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, Scene *scene, Object *object) @@ -885,7 +872,6 @@ void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, Object *object) { BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); - pose_eval_done_common(depsgraph, object); } void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, Object *object) |