diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-22 17:16:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-22 17:16:11 +0300 |
commit | 4a20c386fd14553a03f64bb433a2c3d335a971fe (patch) | |
tree | c5df7d6758915696d9e9a65ad01d93989cc9cf66 /source/blender/editors/transform/transform_snap.c | |
parent | 69246d908018abe7c47a924dd1a16183bc8ec803 (diff) |
bugfix [#20768] Project Snap Broken
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index d5f14f0a470..750165219e5 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -374,7 +374,8 @@ void initSnappingMode(TransInfo *t) if (t->tsnap.applySnap != NULL && // A snapping function actually exist (obedit != NULL && ELEM3(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE)) ) // Temporary limited to edit mode meshes, armature, curves { - if ((t->flag & T_PROP_EDIT) || t->tsnap.project) /* also exclude edit for project, for now */ + /* editmode meshes now supported */ + if ((obedit->type != OB_MESH) && ((t->flag & T_PROP_EDIT) || t->tsnap.project)) /* also exclude edit for project, for now */ { t->tsnap.modeSelect = SNAP_NOT_OBEDIT; } @@ -1266,7 +1267,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, E int retval = 0; int totvert = dm->getNumVerts(dm); int totface = dm->getNumFaces(dm); - + if (totvert > 0) { float imat[4][4]; float timat[3][3]; /* transpose inverse matrix for normals */ @@ -1306,6 +1307,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, E /* local scale in normal direction */ float local_scale = len_v3(ray_normal_local); + treeData.em_evil= em; bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 6); hit.index = -1; |