diff options
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index b614ee207c6..5b90cc93083 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -55,10 +55,12 @@ #include "BIF_gl.h" #include "BKE_DerivedMesh.h" +#include "BKE_global.h" #include "BKE_object.h" #include "BKE_anim.h" /* for duplis */ #include "BKE_context.h" #include "BKE_editmesh.h" +#include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_tracking.h" @@ -321,8 +323,9 @@ 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(t->scene, td->ob); + BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob); copy_v3_v3(iloc, td->ob->obmat[3]); } @@ -393,7 +396,7 @@ void applyGridAbsolute(TransInfo *t) } else if (t->flag & T_OBJECT) { td->ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; - BKE_object_handle_update(t->scene, td->ob); + BKE_object_handle_update(G.main->eval_ctx, t->scene, td->ob); copy_v3_v3(iloc, td->ob->obmat[3]); } @@ -1872,7 +1875,7 @@ static bool snapObjectsRay(Scene *scene, short snap_mode, Base *base_act, View3D if (ob->transflag & OB_DUPLI) { DupliObject *dupli_ob; - ListBase *lb = object_duplilist(scene, ob, FALSE); + ListBase *lb = object_duplilist(G.main->eval_ctx, scene, ob); for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) { retval |= snapObject(scene, snap_mode, ar, dupli_ob->ob, dupli_ob->mat, false, @@ -2124,7 +2127,7 @@ static bool peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, if (ob->transflag & OB_DUPLI) { DupliObject *dupli_ob; - ListBase *lb = object_duplilist(scene, ob, FALSE); + ListBase *lb = object_duplilist(G.main->eval_ctx, scene, ob); for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) { Object *dob = dupli_ob->ob; |