Fix T100833: Cycles UDIM baking broken after recent changes

This commit is contained in:
Brecht Van Lommel 2022-09-08 20:23:02 +02:00
parent 03fbfb3092
commit 609422c0a1
Notes: blender-bot 2023-02-14 11:42:40 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #100833, 3.4 Regression: Baking to Udims only bakes first tile
2 changed files with 3 additions and 1 deletions

View File

@ -702,7 +702,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_,
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());
buffer_params.layer = string_printf("bake_%d\n", bake_id++);
/* Update session. */
session->reset(session_params, buffer_params);

View File

@ -146,6 +146,8 @@ class BlenderSession {
BlenderDisplayDriver *display_driver_ = nullptr;
vector<string> full_buffer_files_;
int bake_id = 0;
};
CCL_NAMESPACE_END