diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/blender/editors/transform/transform_snap.c | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index dc32a46a301..72901110388 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -554,13 +554,13 @@ void CalcSnapGeometry(TransInfo *t, float *vec) peelObjectsTransForm(t, &depth_peels, t->mval); -// if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) +// if (LAST_SNAP_POINT_VALID) // { -// last_p = stk->points[stk->nb_points - 1].p; +// last_p = LAST_SNAP_POINT; // } -// else if (LAST_SNAP_POINT_VALID) +// else // { -// last_p = LAST_SNAP_POINT; + last_p = t->tsnap.snapPoint; // } @@ -1617,13 +1617,26 @@ int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase Object *ob = dupli_ob->ob; if (ob->type == OB_MESH) { - DerivedMesh *dm; + EditMesh *em; + DerivedMesh *dm = NULL; int val; - - val = peelDerivedMesh(ob, dm, dupli_ob->mat, ray_start, ray_normal, mval, depth_peels); - + + if (ob != obedit) + { + dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); + + val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels); + } + else + { + em = ((Mesh *)ob->data)->edit_mesh; + dm = editmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH); + + val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels); + } + retval = retval || val; - + dm->release(dm); } } |