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/application | |
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/application')
-rw-r--r-- | source/blender/freestyle/intern/application/Controller.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index a7f936ff171..29fed062cdf 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -423,10 +423,15 @@ void Controller::DeleteViewMap(bool freeCache) _DebugNode->addRef(); } - if ((freeCache || !_EnableViewMapCache) && NULL != _ViewMap) { - delete _ViewMap; - _ViewMap = NULL; - prevSceneHash = -1.0; + if (NULL != _ViewMap) { + if (freeCache || !_EnableViewMapCache) { + delete _ViewMap; + _ViewMap = NULL; + prevSceneHash = -1.0; + } + else { + _ViewMap->Clean(); + } } } |