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.
This commit is contained in:
@@ -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<Object *> 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;
|
||||
|
||||
Reference in New Issue
Block a user