svn merge -r40000:40179 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / mesh / editmesh_mods.c
index 7f82cf0..27cc2b7 100644 (file)
@@ -829,7 +829,7 @@ static int similar_face_select__internal(EditMesh *em, int mode, float thresh)
                                float angle;
                                for(efa= em->faces.first; efa; efa= efa->next) {
                                        if (!(efa->f & SELECT) && !efa->h) {
-                                               angle= RAD2DEGF(angle_v2v2(base_efa->n, efa->n));
+                                               angle= RAD2DEGF(angle_v3v3(base_efa->n, efa->n));
                                                if (angle/180.0f<=thresh) {
                                                        EM_select_face(efa, 1);
                                                        selcount++;
@@ -844,7 +844,7 @@ static int similar_face_select__internal(EditMesh *em, int mode, float thresh)
                                base_dot= dot_v3v3(base_efa->cent, base_efa->n);
                                for(efa= em->faces.first; efa; efa= efa->next) {
                                        if (!(efa->f & SELECT) && !efa->h) {
-                                               angle= RAD2DEGF(angle_v2v2(base_efa->n, efa->n));
+                                               angle= RAD2DEGF(angle_v3v3(base_efa->n, efa->n));
                                                if (angle/180.0f<=thresh) {
                                                        dot=dot_v3v3(efa->cent, base_efa->n);
                                                        if (fabsf(base_dot-dot) <= thresh) {
@@ -961,7 +961,7 @@ static int similar_edge_select__internal(EditMesh *em, int mode, float thresh)
                                        else if (eed->f2==0) /* first access, assign the face */
                                                eed->tmp.f= efa;
                                        else if (eed->f2==1) /* second, we assign the angle*/
-                                               eed->tmp.fp= RAD2DEGF(angle_v2v2(eed->tmp.f->n, efa->n))/180;
+                                               eed->tmp.fp= RAD2DEGF(angle_v3v3(eed->tmp.f->n, efa->n))/180;
                                        eed->f2++; /* f2==0 no face assigned. f2==1 one face found. f2==2 angle calculated.*/
                                }
                                j++;
@@ -991,7 +991,7 @@ static int similar_edge_select__internal(EditMesh *em, int mode, float thresh)
                                for(eed= em->edges.first; eed; eed= eed->next) {
                                        if (!(eed->f & SELECT) && !eed->h) {
                                                sub_v3_v3v3(dir, eed->v1->co, eed->v2->co);
-                                               angle= RAD2DEGF(angle_v2v2(base_dir, dir));
+                                               angle= RAD2DEGF(angle_v3v3(base_dir, dir));
                                                
                                                if (angle>90.0f) /* use the smallest angle between the edges */
                                                        angle= fabsf(angle-180.0f);
@@ -1088,7 +1088,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
        Mesh *me= obedit->data;
        EditMesh *em= BKE_mesh_get_editmesh(me); 
 
-       int selcount = similar_edge_select__internal(em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold"));
+       int selcount = similar_edge_select__internal(em, RNA_enum_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold"));
        
        if (selcount) {
                /* here was an edge-mode only select flush case, has to be generalized */
@@ -1161,7 +1161,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
                                float angle;
                                for(eve= em->verts.first; eve; eve= eve->next) {
                                        if (!(eve->f & SELECT) && !eve->h) {
-                                               angle= RAD2DEGF(angle_v2v2(base_eve->no, eve->no));
+                                               angle= RAD2DEGF(angle_v3v3(base_eve->no, eve->no));
                                                if (angle/180.0f<=thresh) {
                                                        eve->f |= SELECT;
                                                        selcount++;
@@ -4150,7 +4150,7 @@ static int smooth_vertex(bContext *C, wmOperator *op)
         * are within tolerance of the plane(s) of reflection 
         */
        for(md=obedit->modifiers.first; md; md=md->next) {
-               if(md->type==eModifierType_Mirror) {
+               if((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
                        MirrorModifierData *mmd = (MirrorModifierData*) md;     
                
                        if(mmd->flag & MOD_MIR_CLIPPING) {