Fix for an unnormalized normal vector in ViewEdgeXBuilder::BuildSmoothFEdge().
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 7 Apr 2012 15:54:21 +0000 (15:54 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 7 Apr 2012 15:54:21 +0000 (15:54 +0000)
source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp

index d158e345505bc26a53f4b335d129e7e013305480..7cf177dedb7d23d97738e1bef396cb7bee2aa3bf 100755 (executable)
@@ -492,6 +492,8 @@ FEdge * ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer
   fe->setFrsMaterialIndex(ifl.fl->getFace()->frs_materialIndex());
   fe->setFace(ifl.fl->getFace());
   fe->setFaceMark(ifl.fl->getFace()->GetMark());
+  if(feprevious == 0)
+         normal.normalize();
   fe->setNormal(normal);
   fe->setPreviousEdge(feprevious);
   if(feprevious)