Fix #37251: Snap not working correctly in metaball edit mode.

It wasn't enabled in snapping code from the beginning it seems,
but from quick tests snapping for mballs works just fine.

Maybe we could drop out check for edit object type now?
This commit is contained in:
Sergey Sharybin 2013-11-06 08:27:18 +00:00
parent 99c5e71397
commit 17994825f0
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ int BIF_snappingSupported(Object *obedit)
{
int status = 0;
if (obedit == NULL || ELEM4(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE)) /* only support object mesh, armature, curves */
if (obedit == NULL || ELEM5(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL)) /* only support object mesh, armature, curves */
{
status = 1;
}
@ -440,7 +440,7 @@ static void initSnappingMode(TransInfo *t)
/* Edit mode */
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
(obedit != NULL && ELEM4(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE)) ) // Temporary limited to edit mode meshes, armature, curves
(obedit != NULL && ELEM5(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL)) ) // Temporary limited to edit mode meshes, armature, curves, mballs
{
/* Exclude editmesh if using proportional edit */
if ((obedit->type == OB_MESH) && (t->flag & T_PROP_EDIT)) {