diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-07-23 01:41:01 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-07-25 18:42:53 +0400 |
commit | fc55c41bba8121bf3db67280c26e840f8b3f4124 (patch) | |
tree | 181abfb43fbbdf84b85206ddc1c2de7635a0dbaf /intern/cycles/render/bake.cpp | |
parent | 2e50b4dc511567a3dfb280e30b5606873fc62d31 (diff) |
Cycles Bake: show progress bar during bake
Baking progress preview is not possible, in parts due to the way the API
was designed. But at least you get to see the progress bar while baking.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D656
Diffstat (limited to 'intern/cycles/render/bake.cpp')
-rw-r--r-- | intern/cycles/render/bake.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/bake.cpp b/intern/cycles/render/bake.cpp index c68f6e1f08e..bc313a52491 100644 --- a/intern/cycles/render/bake.cpp +++ b/intern/cycles/render/bake.cpp @@ -155,6 +155,10 @@ bool BakeManager::bake(Device *device, DeviceScene *dscene, Scene *scene, Progre task.shader_w = d_output.size(); task.num_samples = is_aa_pass(shader_type)? scene->integrator->aa_samples: 1; task.get_cancel = function_bind(&Progress::get_cancel, &progress); + task.update_progress_sample = function_bind(&Progress::increment_sample_update, &progress); + + this->num_parts = device->get_split_task_count(task); + this->num_samples = task.num_samples; device->task_add(task); device->task_wait(); |