diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-31 02:43:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-31 02:43:43 +0400 |
commit | 5f070227acf6e92bc584230dcac5a6708b4a5dca (patch) | |
tree | 257c4c4e1a21405f33eb43d599d0119531cd814b | |
parent | c9a93211b5b4450e9cbeb5aebaa2e2c32d0d1caf (diff) |
trick to give correct normals for cyclic curves used with the screw modifier.
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 543895a5973..a8afa779dba 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -629,6 +629,12 @@ static void make_edges_mdata(MVert *allvert, MFace *allface, int totvert, int to medge->v2= ed->v2; if(old==0 || ed->is_draw) medge->flag= ME_EDGEDRAW|ME_EDGERENDER; if(ed->is_loose) medge->flag|= ME_LOOSEEDGE; + + /* order is swapped so extruding this edge as a surface wont flip face normals + * with cyclic curves */ + if(ed->v1+1 != ed->v2) { + SWAP(int, medge->v1, medge->v2); + } medge++; } else { |