diff options
author | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-11 16:09:14 +0400 |
---|---|---|
committer | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-11 16:09:14 +0400 |
commit | 7ac1c7c89956d5df7f99509917fd933002d2861d (patch) | |
tree | 63ea9c43e6cb05409a3bea34f198cba6f0259721 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 4081f33687c88a9fcb0c09be86b79964b2c13f08 (diff) |
fixed the code that updates normals of quads when sculpting
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index c9353f697db..b88fe5a9d7a 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1017,6 +1017,18 @@ static void update_damaged_vert(SculptSession *ss, ListBase *lb) VECCOPY(&buffer[(cur->element-cur->element%3)*3],norm); VECCOPY(&buffer[(cur->element-cur->element%3+1)*3],norm); VECCOPY(&buffer[(cur->element-cur->element%3+2)*3],norm); + + /* maybe this was a quad - need to update the other triangle of the quad */ + if( ss->drawobject->faceRemap[cur->element/3-1] == i ) { + VECCOPY(&buffer[(cur->element-cur->element%3-3)*3],norm); + VECCOPY(&buffer[(cur->element-cur->element%3-2)*3],norm); + VECCOPY(&buffer[(cur->element-cur->element%3-1)*3],norm); + } + if( ss->drawobject->faceRemap[cur->element/3+1] == i ) { + VECCOPY(&buffer[(cur->element-cur->element%3+3)*3],norm); + VECCOPY(&buffer[(cur->element-cur->element%3+4)*3],norm); + VECCOPY(&buffer[(cur->element-cur->element%3+5)*3],norm); + } } //VECCOPY(&buffer[cur->element*3],ss->mvert[vert->Index].no); |