diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-26 11:34:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-26 11:34:40 +0300 |
commit | 87627374000b7de7445736a7239a3f2b168ce7eb (patch) | |
tree | 2f0fe5d42d0938fc1b684af702d8613099bea1bd /source/blender/editors/transform/transform_snap.c | |
parent | 784d8ee37a52f3ef689aa6d02e75e50566efe93f (diff) | |
parent | ba8ea9ec63c25b1ce134a846176f7bf252f4d487 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17853:HEAD
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 023b97058d3..7663f3418fb 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1212,10 +1212,22 @@ int snapObjects(TransInfo *t, int *dist, float *loc, float *no, int mode) { Object *ob = dupli_ob->ob; if (ob->type == OB_MESH) { - DerivedMesh *dm = mesh_get_derived_final(t->scene, ob, CD_MASK_BAREMESH); + DerivedMesh *dm; + EditMesh *em; int val; - - val = snapDerivedMesh(t, ob, dm, NULL, dupli_ob->mat, ray_start, ray_normal, t->mval, loc, no, dist, &depth); + + if(ob == t->obedit) + { + em = ((Mesh *)ob->data)->edit_mesh; + dm = editmesh_get_derived_cage(t->scene, t->obedit, em, CD_MASK_BAREMESH); + } + else + { + em = NULL; + dm = mesh_get_derived_final(t->scene, ob, CD_MASK_BAREMESH); + } + + val = snapDerivedMesh(t, ob, dm, em, dupli_ob->mat, ray_start, ray_normal, t->mval, loc, no, dist, &depth); retval = retval || val; |