bugfix [#25260] Solidify function UV mapping problems
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 06:02:52 +0000 (06:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Dec 2010 06:02:52 +0000 (06:02 +0000)
source/blender/editors/mesh/editmesh_lib.c

index b7ae0759f7edfb1eb4678dc9460b5d93da4ecc01..acbd9a3bb3e99669d2c1a40e19eb966d61d5ef4e 100644 (file)
@@ -1391,27 +1391,22 @@ static short extrudeflag_edge(Object *obedit, EditMesh *em, short UNUSED(flag),
                        if (efa->v4 && (efa->v4->tmp.v == NULL))
                                efa->v4->tmp.v = addvertlist(em, efa->v4->co, efa->v4);
                        
-                       if(del_old==0) {        // keep old faces means flipping normal
-                               if(efa->v4)
-                                       efan = addfacelist(em, efa->v4->tmp.v, efa->v3->tmp.v, 
-                                                               efa->v2->tmp.v, efa->v1->tmp.v, efa, efa);
-                               else
-                                       efan = addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v, 
-                                                               efa->v1->tmp.v, NULL, efa, efa);
-                       }
-                       else {
-                               if(efa->v4)
-                                       efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, 
-                                                               efa->v3->tmp.v, efa->v4->tmp.v, efa, efa);
-                               else
-                                       efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, 
-                                                               efa->v3->tmp.v, NULL, efa, efa);
+                       if(efa->v4)
+                               efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v,
+                                                       efa->v3->tmp.v, efa->v4->tmp.v, efa, efa);
+                       else
+                               efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v,
+                                                       efa->v3->tmp.v, NULL, efa, efa);
+
+                       /* keep old faces means flipping normal, reverse vertex order gives bad UV's & VCols etc - [#25260] */
+                       if(del_old==0) {
+                               flipface(em, efan);
                        }
-                       
+
                        if (em->act_face == efa) {
                                em->act_face = efan; 
                        }
-                       
+
                        /* for transform */
                        add_normal_aligned(nor, efa->n);
                }