Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2006-06-17 18:08:15 +0400
committerKen Hughes <khughes@pacific.edu>2006-06-17 18:08:15 +0400
commitf478c9eca3ab579e566307db57803479e7bc2a23 (patch)
tree1fb783d3ad0a1aa3bf412578e57ba439ed1a6bfc /source
parent9b79c57f38da9b11135ae27e56a2f5d2b8680acd (diff)
===Python API===
Bugfix #4347: deleting vertex 0 incorrectly deleted all triangle face, since check for v4==0 wasn't being done.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Mesh.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index c1f19d8541d..051659af57f 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -661,7 +661,10 @@ static void delete_faces( Mesh *mesh, unsigned int *vert_table, int to_delete )
tmpface->v1 = vert_table[tmpface->v1];
tmpface->v2 = vert_table[tmpface->v2];
tmpface->v3 = vert_table[tmpface->v3];
- tmpface->v4 = vert_table[tmpface->v4];
+ if(len4)
+ tmpface->v4 = vert_table[tmpface->v4];
+ else
+ tmpface->v4 = 0;
eeek_fix( tmpface, tmptface, len4 );
@@ -1979,7 +1982,7 @@ static PyObject *MVertSeq_delete( BPy_MVertSeq * self, PyObject *args )
if( vert_table[tmpface->v1] == UINT_MAX ||
vert_table[tmpface->v2] == UINT_MAX ||
vert_table[tmpface->v3] == UINT_MAX ||
- vert_table[tmpface->v4] == UINT_MAX ) {
+ ( tmpface->v4 && vert_table[tmpface->v4] == UINT_MAX ) ) {
tmpface->v1 = UINT_MAX;
++face_count;
}