diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/session.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/session.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/blender/session.cpp b/intern/cycles/blender/session.cpp index 321771b67a5..1b7aa38efb4 100644 --- a/intern/cycles/blender/session.cpp +++ b/intern/cycles/blender/session.cpp @@ -704,7 +704,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); diff --git a/intern/cycles/blender/session.h b/intern/cycles/blender/session.h index f9a5b6faf7e..ceca86016b8 100644 --- a/intern/cycles/blender/session.h +++ b/intern/cycles/blender/session.h @@ -146,6 +146,8 @@ class BlenderSession { BlenderDisplayDriver *display_driver_ = nullptr; vector<string> full_buffer_files_; + + int bake_id = 0; }; CCL_NAMESPACE_END |