svn merge ^/trunk/blender -r49118:49143
[blender.git] / intern / cycles / blender / blender_sync.cpp
index bc35e6dc5c94e37755aa36ba8971da58469499ce..bab467746c782c5aff80828c94d55b7b0a757885 100644 (file)
@@ -220,7 +220,9 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        layer = layername.c_str();
                }
                else {
+                       render_layer.use_localview = (b_v3d.local_view() ? true : false);
                        render_layer.scene_layer = get_layer(b_v3d.layers(), b_v3d.layers_local_view());
+                       CYCLES_LOCAL_LAYER_HACK(render_layer.use_localview, render_layer.scene_layer);
                        render_layer.layer = render_layer.scene_layer;
                        render_layer.holdout_layer = 0;
                        render_layer.material_override = PointerRNA_NULL;
@@ -246,6 +248,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        render_layer.material_override = b_rlay->material_override();
                        render_layer.use_background = b_rlay->use_sky();
                        render_layer.use_viewport_visibility = false;
+                       render_layer.use_localview = false;
                        render_layer.samples = b_rlay->samples();
                }