[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46196] trunk/blender/source/blender/ modifiers/intern/MOD_mirror.c: Fix #31190: mirror modifier caused non-planar quads to be split differently on
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed May 2 18:17:07 CEST 2012
Revision: 46196
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46196
Author: blendix
Date: 2012-05-02 16:17:04 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Fix #31190: mirror modifier caused non-planar quads to be split differently on
the other side, now keep the first vertex of the polygon the same to avoid this.
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_mirror.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_mirror.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_mirror.c 2012-05-02 16:05:25 UTC (rev 46195)
+++ trunk/blender/source/blender/modifiers/intern/MOD_mirror.c 2012-05-02 16:17:04 UTC (rev 46196)
@@ -113,7 +113,7 @@
float mtx[4][4];
int i, j;
int a, totshape;
- int *vtargetmap, *vtmap_a = NULL, *vtmap_b = NULL;
+ int *vtargetmap = NULL, *vtmap_a = NULL, *vtmap_b = NULL;
/* mtx is the mirror transformation */
unit_m4(mtx);
@@ -223,10 +223,11 @@
MLoop *ml2;
int e;
- /* reverse the loop */
- for (j = 0; j < mp->totloop; j++) {
- DM_copy_loop_data(result, result, mp->loopstart + j, mp->loopstart + maxLoops + mp->totloop - j - 1, 1);
- }
+ /* reverse the loop, but we keep the first vertex in the face the same,
+ * to ensure that quads are split the same way as on the other side */
+ DM_copy_loop_data(result, result, mp->loopstart, mp->loopstart + maxLoops, 1);
+ for (j = 1; j < mp->totloop; j++)
+ DM_copy_loop_data(result, result, mp->loopstart + j, mp->loopstart + maxLoops + mp->totloop - j, 1);
ml2 = ml + mp->loopstart + maxLoops;
e = ml2[0].e;
More information about the Bf-blender-cvs
mailing list