Blender V4.3
eevee_lightcache.hh File Reference
#include "BLI_vector.hh"
#include <string>

Go to the source code of this file.

Functions

Light Bake Job
wmJobEEVEE_NEXT_lightbake_job_create (wmWindowManager *wm, wmWindow *win, Main *bmain, ViewLayer *view_layer, Scene *scene, blender::Vector< Object * > original_probes, std::string &report, int delay_ms, int frame)
 
void * EEVEE_NEXT_lightbake_job_data_alloc (Main *bmain, ViewLayer *view_layer, Scene *scene, blender::Vector< Object * > original_probes, std::string &report, int frame)
 
void EEVEE_NEXT_lightbake_job_data_free (void *job_data)
 
void EEVEE_NEXT_lightbake_update (void *job_data)
 
void EEVEE_NEXT_lightbake_job (void *job_data, wmJobWorkerStatus *worker_status)
 

Function Documentation

◆ EEVEE_NEXT_lightbake_job()

void EEVEE_NEXT_lightbake_job ( void * job_data,
wmJobWorkerStatus * worker_status )

Do the full light baking for all samples. Will call EEVEE_NEXT_lightbake_update() on finish.

Definition at line 361 of file eevee_lightcache.cc.

References wmJobWorkerStatus::do_update, wmJobWorkerStatus::progress, and wmJobWorkerStatus::stop.

Referenced by EEVEE_NEXT_lightbake_job_create(), and lightprobe_cache_bake_exec().

◆ EEVEE_NEXT_lightbake_job_create()

wmJob * EEVEE_NEXT_lightbake_job_create ( wmWindowManager * wm,
wmWindow * win,
Main * bmain,
ViewLayer * view_layer,
Scene * scene,
blender::Vector< Object * > original_probes,
std::string & report,
int delay_ms,
int frame )

Create the job description. This is called for asynchronous (modal) bake operator. The actual work will be done by EEVEE_NEXT_lightbake_job(). IMPORTANT: Must run on the main thread because of potential GPUContext creation.

Definition at line 297 of file eevee_lightcache.cc.

References EEVEE_NEXT_lightbake_job(), EEVEE_NEXT_lightbake_job_data_free(), EEVEE_NEXT_lightbake_update(), G, NA_EDITED, NC_SCENE, WM_JOB_EXCL_RENDER, WM_JOB_PRIORITY, WM_JOB_PROGRESS, WM_JOB_TYPE_LIGHT_BAKE, WM_JOB_TYPE_RENDER, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_stop_type(), WM_jobs_test(), and WM_jobs_timer().

Referenced by lightprobe_cache_bake_invoke().

◆ EEVEE_NEXT_lightbake_job_data_alloc()

void * EEVEE_NEXT_lightbake_job_data_alloc ( Main * bmain,
ViewLayer * view_layer,
Scene * scene,
blender::Vector< Object * > original_probes,
std::string & report,
int frame )

Allocate dependency graph and job description (EEVEE_NEXT_LightBake). Dependency graph evaluation does not happen here. It is delayed until EEVEE_NEXT_lightbake_job runs. IMPORTANT: Must run on the main thread because of potential GPUContext creation. Return EEVEE_NEXT_LightBake * but cast to void * because of compatibility with existing EEVEE function.

Definition at line 338 of file eevee_lightcache.cc.

Referenced by lightprobe_cache_bake_exec().

◆ EEVEE_NEXT_lightbake_job_data_free()

void EEVEE_NEXT_lightbake_job_data_free ( void * job_data)

Free the job data. NOTE: Does not free the GPUContext. This is the responsibility of EEVEE_NEXT_lightbake_job()

Definition at line 351 of file eevee_lightcache.cc.

Referenced by EEVEE_NEXT_lightbake_job_create(), and lightprobe_cache_bake_exec().

◆ EEVEE_NEXT_lightbake_update()

void EEVEE_NEXT_lightbake_update ( void * job_data)

Callback for updating original scene light cache with bake result. Run by the job system for each update step and the finish step. This is called manually by EEVEE_NEXT_lightbake_job() if not run from a job.

Definition at line 356 of file eevee_lightcache.cc.

References update().

Referenced by EEVEE_NEXT_lightbake_job_create(), and lightprobe_cache_bake_exec().