diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-24 11:56:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-24 11:56:32 +0400 |
commit | 663f15cf2b057d3591e09728d4ca72092cbb1dad (patch) | |
tree | 0673b7f9a01522f528af7e085d2140f30f16e7b5 /source | |
parent | dfdb2eb9a88b14c0aade5e7e503a160e521f7c63 (diff) |
Fix #35493: Blender crash when rendering in terminal mode
Use the same window manager for freestyle bmain as
real bmain uses. This is needed because freestyle's
bmain could be used to tag scenes for update, which
implies call of ED_render_scene_update in some cases
and that function requires proper windoew manager
to present.
Alternative would be to make render scene update does
nothing if there's no window manager, but we wanted
freestyle to be applied in rendered viewport once and
think current change is what we'll need to support
freestyle in viewport.
But a bit further, perhaps that'd make sense to not
register ED_render_scene_update as a scene update
callback when in background mode?
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 0c1899a66f6..517b30467ce 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1640,6 +1640,15 @@ static void add_freestyle(Render *re) actsrl = BLI_findlink(&re->r.layers, re->r.actlay); + /* We use the same window manager for freestyle bmain as + * real bmain uses. This is needed because freestyle's + * bmain could be used to tag scenes for update, which + * implies call of ED_render_scene_update in some cases + * and that function requires proper windoew manager + * to present (sergey) + */ + re->freestyle_bmain.wm = re->main->wm; + FRS_init_stroke_rendering(re); for (srl= (SceneRenderLayer *)re->r.layers.first; srl; srl= srl->next) { |