diff options
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 3a00384458a..ab986766211 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -44,6 +44,7 @@ CCL_NAMESPACE_BEGIN BlenderSync::BlenderSync(BL::RenderEngine& b_engine, BL::BlendData& b_data, + BL::Depsgraph& b_depsgraph, BL::Scene& b_scene, Scene *scene, bool preview, @@ -51,6 +52,7 @@ BlenderSync::BlenderSync(BL::RenderEngine& b_engine, bool is_cpu) : b_engine(b_engine), b_data(b_data), + b_depsgraph(b_depsgraph), b_scene(b_scene), shader_map(&scene->shaders), object_map(&scene->objects), @@ -385,26 +387,9 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer) /* 3d view */ if(b_v3d) { - if(RNA_boolean_get(&cscene, "preview_active_layer")) { - BL::RenderLayers layers(b_scene.render().ptr); - layername = layers.active().name(); - layer = layername.c_str(); - } - else { - render_layer.scene_layer = get_layer(b_v3d.layers(), b_v3d.layers_local_view()); - render_layer.layer = render_layer.scene_layer; - render_layer.exclude_layer = 0; - render_layer.holdout_layer = 0; - render_layer.material_override = PointerRNA_NULL; - render_layer.use_background_shader = true; - render_layer.use_background_ao = true; - render_layer.use_hair = true; - render_layer.use_surfaces = true; - render_layer.use_viewport_visibility = true; - render_layer.samples = 0; - render_layer.bound_samples = false; - return; - } + BL::RenderLayers layers(b_scene.render().ptr); + layername = layers.active().name(); + layer = layername.c_str(); } /* render layer */ @@ -433,7 +418,6 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer) render_layer.use_background_ao = b_rlay->use_ao(); render_layer.use_surfaces = b_rlay->use_solid(); render_layer.use_hair = b_rlay->use_strand(); - render_layer.use_viewport_visibility = false; render_layer.bound_samples = (use_layer_samples == 1); if(use_layer_samples != 2) { @@ -843,17 +827,8 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, params.shadingsystem = SHADINGSYSTEM_OSL; /* color managagement */ -#ifdef GLEW_MX - /* When using GLEW MX we need to check whether we've got an OpenGL - * context for current window. This is because command line rendering - * doesn't have OpenGL context actually. - */ - if(glewGetContext() != NULL) -#endif - { - params.display_buffer_linear = GLEW_ARB_half_float_pixel && - b_engine.support_display_space_shader(b_scene); - } + params.display_buffer_linear = GLEW_ARB_half_float_pixel && + b_engine.support_display_space_shader(b_scene); if(b_engine.is_preview()) { /* For preview rendering we're using same timeout as |