diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/session.cpp | 7 | ||||
-rw-r--r-- | intern/cycles/session/session.cpp | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/blender/session.cpp b/intern/cycles/blender/session.cpp index 5954d5fb572..321771b67a5 100644 --- a/intern/cycles/blender/session.cpp +++ b/intern/cycles/blender/session.cpp @@ -659,6 +659,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_, session->set_display_driver(nullptr); session->set_output_driver(make_unique<BlenderOutputDriver>(b_engine)); + session->full_buffer_written_cb = [&](string_view filename) { full_buffer_written(filename); }; /* Sync scene. */ BL::Object b_camera_override(b_engine.camera_override()); @@ -700,6 +701,10 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_, BufferParams buffer_params; buffer_params.width = bake_width; buffer_params.height = bake_height; + buffer_params.window_width = bake_width; + buffer_params.window_height = bake_height; + /* Unique layer name for multi-image baking. */ + buffer_params.layer = string_printf("bake_%d\n", (int)full_buffer_files_.size()); /* Update session. */ session->reset(session_params, buffer_params); @@ -713,8 +718,6 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_, session->start(); session->wait(); } - - session->set_output_driver(nullptr); } void BlenderSession::synchronize(BL::Depsgraph &b_depsgraph_) diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp index e5df22211e7..a2955da5480 100644 --- a/intern/cycles/session/session.cpp +++ b/intern/cycles/session/session.cpp @@ -436,8 +436,7 @@ int2 Session::get_effective_tile_size() const const int image_width = buffer_params_.width; const int image_height = buffer_params_.height; - /* No support yet for baking with tiles. */ - if (!params.use_auto_tile || scene->bake_manager->get_baking()) { + if (!params.use_auto_tile) { return make_int2(image_width, image_height); } |