diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-29 17:29:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-29 17:37:09 +0300 |
commit | 60703e45f36a92f8e49a7be7c951538e5b747a41 (patch) | |
tree | d6fea68e590991c636ea4499687a4e45f6ee2299 /source/blender/editors/transform | |
parent | c8b1a83a8c41f5e162a3c9b31ea75923415d57cd (diff) |
Transform: Avoid use of ob->recalc in snapping code
Do a direct update of object transform instead, without involving
manual trickery of recalc flag.
Shouldn't be functional changes as far as artists are concerned,
but will allow us to get rid of recalc flags in 2.8.
Thanks Bastien for review!
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 45b8ca3749f..5750224de3d 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -316,9 +316,7 @@ void applyProject(TransInfo *t) mul_m4_v3(ob->obmat, iloc); } else if (t->flag & T_OBJECT) { - /* TODO(sergey): Ideally force update is not needed here. */ - td->ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; - BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob); + BKE_object_eval_transform_all(G.main->eval_ctx, t->scene, td->ob); copy_v3_v3(iloc, td->ob->obmat[3]); } @@ -407,8 +405,7 @@ void applyGridAbsolute(TransInfo *t) mul_m4_v3(obmat, iloc); } else if (t->flag & T_OBJECT) { - td->ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; - BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob); + BKE_object_eval_transform_all(G.main->eval_ctx, t->scene, td->ob); copy_v3_v3(iloc, td->ob->obmat[3]); } |