diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-22 17:37:35 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-22 18:18:47 +0400 |
commit | 97d047a3e9a52d9e2d8c0eee6932ab9ab9199ab9 (patch) | |
tree | 5eb2a0155474121a60387cdb02c1434a1cfbd2a5 /source/blender/freestyle/intern/winged_edge/WEdge.h | |
parent | 7a8676509505bf5fbf50943f3bcc561bf95fabef (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/winged_edge/WEdge.h')
-rw-r--r-- | source/blender/freestyle/intern/winged_edge/WEdge.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 5dda41ad279..54461a6e8a6 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -1309,11 +1309,13 @@ public: for (vector<WShape *>::iterator it = _wshapes.begin(); it != _wshapes.end(); it++) delete *it; _wshapes.clear(); + _numFaces = 0; } void addWShape(WShape *wshape) { _wshapes.push_back(wshape); + _numFaces += wshape->GetFaceList().size(); } vector<WShape *>& getWShapes() @@ -1321,8 +1323,14 @@ public: return _wshapes; } + unsigned getNumFaces() + { + return _numFaces; + } + private: vector<WShape *> _wshapes; + unsigned _numFaces; #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WingedEdge") |