remove use of deprecated struct members
[blender.git] / source / blender / editors / mesh / editmesh_tools.c
index acc6ab1fc0eee3ad6e943a50fee6ead31156c3fa..df81f80ade8a5710a544501ffab6fb5066b85248 100644 (file)
@@ -2666,20 +2666,11 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
                        if(mmd->flag & MOD_MIR_CLIPPING) {
                                for (eve= em->verts.first; eve; eve= eve->next) {
                                        eve->f2= 0;
-                                       switch(mmd->axis){
-                                               case 0:
-                                                       if (fabsf(eve->co[0]) < mmd->tolerance)
-                                                               eve->f2 |= 1;
-                                                       break;
-                                               case 1:
-                                                       if (fabsf(eve->co[1]) < mmd->tolerance)
-                                                               eve->f2 |= 2;
-                                                       break;
-                                               case 2:
-                                                       if (fabsf(eve->co[2]) < mmd->tolerance)
-                                                               eve->f2 |= 4;
-                                                       break;
-                                       }
+
+                                       if (mmd->flag & MOD_MIR_AXIS_X && fabsf(eve->co[0]) < mmd->tolerance) eve->f2 |= 1;
+                                       if (mmd->flag & MOD_MIR_AXIS_Y && fabsf(eve->co[1]) < mmd->tolerance) eve->f2 |= 2;
+                                       if (mmd->flag & MOD_MIR_AXIS_Z && fabsf(eve->co[2]) < mmd->tolerance) eve->f2 |= 4;
+
                                }
                        }
                }