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
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-22 17:37:35 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-22 18:18:47 +0400
commit97d047a3e9a52d9e2d8c0eee6932ab9ab9199ab9 (patch)
tree5eb2a0155474121a60387cdb02c1434a1cfbd2a5 /source/blender/freestyle/intern/application
parent7a8676509505bf5fbf50943f3bcc561bf95fabef (diff)
Fix T40307: Crash with freestyle and particle hair.
The scene file provided by the problem report has many degenerate faces coming from a particle system. These zero-area faces were not expected in the ray-casting line visibility algorithms of Freestyle. Now degenerate faces are properly excluded from the imported mesh data and not fed to the line visibility algorithms.
Diffstat (limited to 'source/blender/freestyle/intern/application')
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 2bd31ea03a1..176199600ac 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -298,12 +298,19 @@ int Controller::LoadMesh(Render *re, SceneRenderLayer *srl)
_bboxDiag = (_RootNode->bbox().getMax() - _RootNode->bbox().getMin()).norm();
if (G.debug & G_DEBUG_FREESTYLE) {
- cout << "Triangles nb : " << _SceneNumFaces << endl;
+ cout << "Triangles nb : " << _SceneNumFaces << " imported, " <<
+ _winged_edge->getNumFaces() << " retained" << endl;
cout << "Bounding Box : " << _bboxDiag << endl;
}
ClearRootNode();
+ _SceneNumFaces = _winged_edge->getNumFaces();
+ if (_SceneNumFaces == 0) {
+ DeleteWingedEdge();
+ return 1;
+ }
+
return 0;
}