diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-10-02 10:26:53 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-10-02 12:52:16 +0400 |
commit | c47682d6abd36c607bc6aa25595afc4034df0d5c (patch) | |
tree | 0332c8ff03bfb88c4aa8db96647a3d8a7477bbc4 /source/blender/freestyle/intern/stroke | |
parent | c946a450ed285caff001e75cad9c0dc9ccf45e3a (diff) |
Freestyle: Fix for destructive view map modifications during chaining operations.
The view map is mostly treated as a read-only data structure by line stylization
operations (i.e., selection, chaining, splitting, sorting and stroke creation). The
only exception is the chaining operation in some cases where insertion of extra
FEdge objects is necessary to ensure the continuity of underlying FEdges from
which a chain is constructed.
The present revision addresses the removal of extra FEdges so to keep the view
map clean and suitable for reuse in subsequent render frames.
Diffstat (limited to 'source/blender/freestyle/intern/stroke')
-rw-r--r-- | source/blender/freestyle/intern/stroke/Chain.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/stroke/Chain.cpp b/source/blender/freestyle/intern/stroke/Chain.cpp index 7fd756472b0..0e8c2c9ae6f 100644 --- a/source/blender/freestyle/intern/stroke/Chain.cpp +++ b/source/blender/freestyle/intern/stroke/Chain.cpp @@ -59,6 +59,7 @@ void Chain::push_viewedge_back(ViewEdge *iViewEdge, bool orientation) CurvePoint *cp = _Vertices.back(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.f); SVertex *sv_first = (*vfirst); FEdge *fe = _fedgeB->duplicate(); + fe->setTemporary(true); fe->setVertexB(sv_first); fe->vertexA()->shape()->AddEdge(fe); fe->vertexA()->AddFEdge(fe); @@ -119,6 +120,7 @@ void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation) SVertex *sv_curr = (*v); FEdge *fe = (orientation) ? iViewEdge->fedgeA() : iViewEdge->fedgeB(); FEdge *fe2 = fe->duplicate(); + fe2->setTemporary(true); fe2->setVertexA(sv_curr); fe2->setVertexB(sv_last); sv_last->AddFEdge(fe2); |