|
Blender V4.3
|
General operations for probes. More...
Go to the source code of this file.
Functions | |
| void | BKE_lightprobe_type_set (struct LightProbe *probe, short lightprobe_type) |
| void * | BKE_lightprobe_add (struct Main *bmain, const char *name) |
| void | BKE_lightprobe_cache_blend_write (struct BlendWriter *writer, struct LightProbeObjectCache *cache) |
| void | BKE_lightprobe_cache_blend_read (struct BlendDataReader *reader, struct LightProbeObjectCache *cache) |
| struct LightProbeGridCacheFrame * | BKE_lightprobe_grid_cache_frame_create (void) |
| LightProbeGridCacheFrame * | BKE_lightprobe_grid_cache_frame_copy (LightProbeGridCacheFrame *src) |
| void | BKE_lightprobe_grid_cache_frame_free (struct LightProbeGridCacheFrame *cache) |
| void | BKE_lightprobe_cache_create (struct Object *object) |
| LightProbeObjectCache * | BKE_lightprobe_cache_copy (LightProbeObjectCache *src_cache) |
| void | BKE_lightprobe_cache_free (struct Object *object) |
| int64_t | BKE_lightprobe_grid_cache_frame_sample_count (const struct LightProbeGridCacheFrame *cache) |
General operations for probes.
Definition in file BKE_lightprobe.h.
| void * BKE_lightprobe_add | ( | struct Main * | bmain, |
| const char * | name ) |
Definition at line 107 of file lightprobe.cc.
References BKE_id_new(), and ID_LP.
Referenced by BKE_object_obdata_add_from_type().
| void BKE_lightprobe_cache_blend_read | ( | struct BlendDataReader * | reader, |
| struct LightProbeObjectCache * | cache ) |
Definition at line 182 of file lightprobe.cc.
References BLO_read_struct, LightProbeObjectCache::grid_static_cache, and lightprobe_grid_cache_frame_blend_read().
Referenced by object_blend_read_data().
| void BKE_lightprobe_cache_blend_write | ( | struct BlendWriter * | writer, |
| struct LightProbeObjectCache * | cache ) |
Definition at line 174 of file lightprobe.cc.
References BLO_write_struct, LightProbeObjectCache::grid_static_cache, and lightprobe_grid_cache_frame_blend_write().
Referenced by object_blend_write().
| LightProbeObjectCache * BKE_lightprobe_cache_copy | ( | LightProbeObjectCache * | src_cache | ) |
Create a copy of a whole cache. This does not include the in-progress baking data.
Definition at line 253 of file lightprobe.cc.
References BKE_lightprobe_grid_cache_frame_copy(), BLI_assert, LightProbeObjectCache::grid_static_cache, and MEM_dupallocN.
Referenced by object_copy_data().
| void BKE_lightprobe_cache_create | ( | struct Object * | object | ) |
Create the grid cache list depending on the lightprobe baking settings. The list is left empty to be filled by the baking process.
Definition at line 245 of file lightprobe.cc.
References BLI_assert, and MEM_callocN.
Referenced by lightprobe_cache_irradiance_volume_subset_get().
| void BKE_lightprobe_cache_free | ( | struct Object * | object | ) |
Free all irradiance grids allocated for the given object.
Definition at line 267 of file lightprobe.cc.
References BKE_lightprobe_grid_cache_frame_free(), LightProbeObjectCache::grid_static_cache, MEM_SAFE_FREE, and LightProbeObjectCache::shared.
Referenced by lightprobe_cache_free_exec(), lightprobe_cache_irradiance_volume_subset_get(), and object_free_data().
| LightProbeGridCacheFrame * BKE_lightprobe_grid_cache_frame_copy | ( | LightProbeGridCacheFrame * | src | ) |
Create a copy of a cache frame. This does not include the in-progress baking data.
Definition at line 213 of file lightprobe.cc.
References LightProbeGridCacheFrame::baking, LightProbeGridCacheFrame::block_infos, LightProbeGridCacheFrame::connectivity, LightProbeGridCacheFrame::irradiance, LightProbeBakingData::L0, LightProbeBakingData::L1_a, LightProbeBakingData::L1_b, LightProbeBakingData::L1_c, MEM_dupallocN, spherical_harmonic_copy(), LightProbeGridCacheFrame::surfels, LightProbeBakingData::validity, LightProbeConnectivityData::validity, LightProbeBakingData::virtual_offset, and LightProbeGridCacheFrame::visibility.
Referenced by BKE_lightprobe_cache_copy().
| struct LightProbeGridCacheFrame * BKE_lightprobe_grid_cache_frame_create | ( | void | ) |
Create a single empty irradiance grid cache.
Definition at line 206 of file lightprobe.cc.
References MEM_callocN.
Referenced by blender::eevee::IrradianceBake::read_result_packed(), and blender::eevee::IrradianceBake::read_result_unpacked().
| void BKE_lightprobe_grid_cache_frame_free | ( | struct LightProbeGridCacheFrame * | cache | ) |
Free a single grid cache.
Definition at line 231 of file lightprobe.cc.
References LightProbeGridCacheFrame::baking, LightProbeGridCacheFrame::block_infos, LightProbeGridCacheFrame::connectivity, LightProbeGridCacheFrame::irradiance, MEM_SAFE_FREE, spherical_harmonic_free(), LightProbeGridCacheFrame::surfels, LightProbeBakingData::validity, LightProbeConnectivityData::validity, LightProbeBakingData::virtual_offset, and LightProbeGridCacheFrame::visibility.
Referenced by BKE_lightprobe_cache_free(), blender::eevee::LightBake::run(), and blender::eevee::LightBake::update().
| int64_t BKE_lightprobe_grid_cache_frame_sample_count | ( | const struct LightProbeGridCacheFrame * | cache | ) |
Return the number of sample stored inside an irradiance cache. This depends on the light cache type.
| void BKE_lightprobe_type_set | ( | struct LightProbe * | probe, |
| short | lightprobe_type ) |
Definition at line 83 of file lightprobe.cc.
References LightProbe::attenuation_type, BLI_assert_msg, LightProbe::clipsta, LightProbe::distinf, LightProbe::falloff, LIGHTPROBE_SHAPE_ELIPSOID, LIGHTPROBE_TYPE_PLANE, LIGHTPROBE_TYPE_SPHERE, LIGHTPROBE_TYPE_VOLUME, and LightProbe::type.
Referenced by blender::ed::object::lightprobe_add_exec().