diff options
Diffstat (limited to 'intern/cycles/blender/blender_session.cpp')
-rw-r--r-- | intern/cycles/blender/blender_session.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp index 4b7d2265092..c2bdec0e53d 100644 --- a/intern/cycles/blender/blender_session.cpp +++ b/intern/cycles/blender/blender_session.cpp @@ -441,17 +441,17 @@ void BlenderSession::stamp_view_layer_metadata(Scene *scene, const string &view_ } /* Write cryptomatte metadata. */ - if (scene->film->get_cryptomatte_passes() & CRYPT_OBJECT) { + if (scene->film->cryptomatte_passes & CRYPT_OBJECT) { add_cryptomatte_layer(b_rr, view_layer_name + ".CryptoObject", scene->object_manager->get_cryptomatte_objects(scene)); } - if (scene->film->get_cryptomatte_passes() & CRYPT_MATERIAL) { + if (scene->film->cryptomatte_passes & CRYPT_MATERIAL) { add_cryptomatte_layer(b_rr, view_layer_name + ".CryptoMaterial", scene->shader_manager->get_cryptomatte_materials(scene)); } - if (scene->film->get_cryptomatte_passes() & CRYPT_ASSET) { + if (scene->film->cryptomatte_passes & CRYPT_ASSET) { add_cryptomatte_layer(b_rr, view_layer_name + ".CryptoAsset", scene->object_manager->get_cryptomatte_assets(scene)); @@ -502,9 +502,9 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_) /* Set buffer params, using film settings from sync_render_passes. */ buffer_params.passes = passes; - buffer_params.denoising_data_pass = scene->film->get_denoising_data_pass(); - buffer_params.denoising_clean_pass = scene->film->get_denoising_clean_pass(); - buffer_params.denoising_prefiltered_pass = scene->film->get_denoising_prefiltered_pass(); + buffer_params.denoising_data_pass = scene->film->denoising_data_pass; + buffer_params.denoising_clean_pass = scene->film->denoising_clean_pass; + buffer_params.denoising_prefiltered_pass = scene->film->denoising_prefiltered_pass; BL::RenderResult::views_iterator b_view_iter; @@ -541,9 +541,8 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_) /* Make sure all views have different noise patterns. - hardcoded value just to make it random */ if (view_index != 0) { - int seed = scene->integrator->get_seed(); - seed += hash_uint2(seed, hash_uint2(view_index * 0xdeadbeef, 0)); - scene->integrator->set_seed(seed); + scene->integrator->seed += hash_uint2(scene->integrator->seed, + hash_uint2(view_index * 0xdeadbeef, 0)); scene->integrator->tag_update(scene); } @@ -715,7 +714,7 @@ void BlenderSession::do_write_update_render_result(BL::RenderLayer &b_rlay, if (!buffers->copy_from_device()) return; - float exposure = scene->film->get_exposure(); + float exposure = scene->film->exposure; vector<float> pixels(rtile.w * rtile.h * 4); @@ -832,7 +831,10 @@ void BlenderSession::synchronize(BL::Depsgraph &b_depsgraph_) session->set_denoising(session_params.denoising); /* Update film if denoising data was enabled or disabled. */ - scene->film->set_denoising_data_pass(buffer_params.denoising_data_pass); + if (scene->film->denoising_data_pass != buffer_params.denoising_data_pass) { + scene->film->denoising_data_pass = buffer_params.denoising_data_pass; + scene->film->tag_update(scene); + } /* reset if needed */ if (scene->need_reset()) { @@ -891,7 +893,7 @@ bool BlenderSession::draw(int w, int h) sync->sync_view(b_v3d, b_rv3d, width, height); - if (scene->camera->is_modified()) + if (scene->camera->need_update) reset = true; session->scene->mutex.unlock(); @@ -1106,11 +1108,8 @@ void BlenderSession::update_resumable_tile_manager(int num_samples) VLOG(1) << "Samples range start is " << range_start_sample << ", " << "number of samples to render is " << range_num_samples; - scene->integrator->set_start_sample(rounded_range_start_sample); - - if (scene->integrator->is_modified()) { - scene->integrator->tag_update(scene); - } + scene->integrator->start_sample = rounded_range_start_sample; + scene->integrator->tag_update(scene); session->tile_manager.range_start_sample = rounded_range_start_sample; session->tile_manager.range_num_samples = rounded_range_num_samples; |