diff options
author | Martijn Versteegh <Baardaap> | 2020-10-01 15:28:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-10-01 15:37:59 +0300 |
commit | f117966c4e2723704c71b1d36978bc0f372ed93c (patch) | |
tree | 4106d5f81c6552726f703c94c6e0e4ea3bcd6d38 /intern/cycles | |
parent | 2caa6dd7f87ac5e0fecbefca9054d7a3ca7948a2 (diff) |
Fix T80395: Cycles baking crash when Surfaces are disabled in the view layer
Always enable surfaces for baking, otherwise there is nothing to bake to.
Differential Revision: https://developer.blender.org/D9015
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index ec62fa63f73..1cdaba57be7 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -422,11 +422,13 @@ void BlenderSync::sync_film(BL::SpaceView3D &b_v3d) void BlenderSync::sync_view_layer(BL::SpaceView3D & /*b_v3d*/, BL::ViewLayer &b_view_layer) { - /* render layer */ view_layer.name = b_view_layer.name(); + + /* Filter. */ view_layer.use_background_shader = b_view_layer.use_sky(); view_layer.use_background_ao = b_view_layer.use_ao(); - view_layer.use_surfaces = b_view_layer.use_solid(); + /* Always enable surfaces for baking, otherwise there is nothing to bake to. */ + view_layer.use_surfaces = b_view_layer.use_solid() || scene->bake_manager->get_baking(); view_layer.use_hair = b_view_layer.use_strand(); view_layer.use_volumes = b_view_layer.use_volumes(); |