From 1f8fac50829d1dfb8a68ff56ad8f5ddabc1ea3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 14 Feb 2024 12:43:53 +0100 Subject: [PATCH] Fix: EEVEE-Next: Broken light baking from script The G.is_break was not properly set back to false and the data was never copied back to the original object. --- source/blender/editors/render/render_shading.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc index 0591f1c1051..a438f0fa318 100644 --- a/source/blender/editors/render/render_shading.cc +++ b/source/blender/editors/render/render_shading.cc @@ -1642,6 +1642,8 @@ static int lightprobe_cache_bake_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); + G.is_break = false; + blender::Vector probes = lightprobe_cache_irradiance_volume_subset_get(C, op); /* TODO: abort if selected engine is not eevee. */ @@ -1649,7 +1651,8 @@ static int lightprobe_cache_bake_exec(bContext *C, wmOperator *op) /* Do the job. */ wmJobWorkerStatus worker_status = {}; EEVEE_NEXT_lightbake_job(rj, &worker_status); - /* Free baking data. Result is already stored in the scene data. */ + /* Move baking data to original object and then free it. */ + EEVEE_NEXT_lightbake_update(rj); EEVEE_NEXT_lightbake_job_data_free(rj); return OPERATOR_FINISHED;