From 9a19c5c8fe5e17c771866f5284d42020153703a1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 May 2008 17:55:06 +0000 Subject: [PATCH] Fix for bug #13230: particle mirror could fail on some faces. --- source/blender/src/meshtools.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index e27e772edee..ac165d6aeb2 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -957,6 +957,12 @@ int *mesh_get_x_mirror_faces(Object *ob) mirrormf.v3= mirrorverts[mf->v1]; mirrormf.v4= (mf->v4)? mirrorverts[mf->v4]: 0; + /* make sure v4 is not 0 if a quad */ + if(mf->v4 && mirrormf.v4==0) { + SWAP(int, mirrormf.v1, mirrormf.v3); + SWAP(int, mirrormf.v2, mirrormf.v4); + } + hashmf= BLI_ghash_lookup(fhash, &mirrormf); if(hashmf) { mirrorfaces[a*2]= hashmf - mface;