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>2013-06-11 06:32:01 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-06-11 06:32:01 +0400
commit5520331215ffec52cd518f30bdf6e6276840e290 (patch)
tree77a5df7b902cb05a3780dd0aff46f851d514c45c /source/blender/freestyle/intern/application/Controller.cpp
parent9020df976ca37104a36a90d43c6e5b33c24cdbd2 (diff)
Fix #35561: freestyle + read full sample layers = crash.
Now add_freestyle() in pipeline.c takes a second argument to enable/disable stroke rendering. When stroke rendering is disabled, the function allocates data structures but does not perform stroke rendering. The allocated data structures (mostly left unpopulated with data elements) are intended to allow for the Read Full Sample Layers (Shift-R) command in the compositor.
Diffstat (limited to 'source/blender/freestyle/intern/application/Controller.cpp')
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 436cdbfe6b5..dbf3fa8349e 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -833,17 +833,18 @@ void Controller::ResetRenderCount()
_render_count = 0;
}
-Render *Controller::RenderStrokes(Render *re)
+Render *Controller::RenderStrokes(Render *re, bool render)
{
_Chrono.start();
BlenderStrokeRenderer *blenderRenderer = new BlenderStrokeRenderer(re, ++_render_count);
- _Canvas->Render(blenderRenderer);
+ if (render)
+ _Canvas->Render(blenderRenderer);
real d = _Chrono.stop();
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "Temporary scene generation: " << d << endl;
}
_Chrono.start();
- Render *freestyle_render = blenderRenderer->RenderScene(re);
+ Render *freestyle_render = blenderRenderer->RenderScene(re, render);
d = _Chrono.stop();
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "Stroke rendering : " << d << endl;