diff options
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 8 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.cc | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 23619a2049a..afad4df2c88 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -638,7 +638,13 @@ static short snap_select_type_get(TransInfo *t) const int obedit_type = t->obedit_type; if (obedit_type != -1) { /* Edit mode */ - if (ELEM(obedit_type, OB_MESH, OB_ARMATURE, OB_CURVES_LEGACY, OB_LATTICE, OB_MBALL)) { + if (ELEM(obedit_type, + OB_MESH, + OB_ARMATURE, + OB_CURVES_LEGACY, + OB_SURF, + OB_LATTICE, + OB_MBALL)) { /* Temporary limited to edit mode meshes, armature, curves, lattice and metaballs. */ if ((obedit_type == OB_MESH) && (t->flag & T_PROP_EDIT)) { diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index abeb376a9a6..f533b2c298c 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -2746,6 +2746,14 @@ static void snap_obj_fn(SnapObjectContext *sctx, sctx, params, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index); break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */ case OB_SURF: + if (BKE_object_is_in_editmode(ob_eval)) { + retval = snapCurve( + sctx, params, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index); + if (params->edit_mode_type != SNAP_GEOM_FINAL) { + break; + } + } + ATTR_FALLTHROUGH; case OB_FONT: { const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval); if (mesh_eval) { |