|
Blender V4.3
|
#include <cstring>#include "DNA_collection_types.h"#include "DNA_defaults.h"#include "DNA_lightprobe_types.h"#include "DNA_object_types.h"#include "BLI_math_base.h"#include "BLI_span.hh"#include "BLI_utildefines.h"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_lightprobe.h"#include "BLT_translation.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Variables | |
| IDTypeInfo | IDType_ID_LP |
| void * BKE_lightprobe_add | ( | 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 | ( | BlendDataReader * | reader, |
| 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 | ( | BlendWriter * | writer, |
| 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().
| 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 LightProbeGridCacheFrame * | cache | ) |
Definition at line 284 of file lightprobe.cc.
References LightProbeGridCacheFrame::block_len, LightProbeGridCacheFrame::block_size, cube_i(), LightProbeGridCacheFrame::data_layout, LIGHTPROBE_CACHE_ADAPTIVE_RESOLUTION, and LightProbeGridCacheFrame::size.
Referenced by lightprobe_grid_cache_frame_blend_read(), and lightprobe_grid_cache_frame_blend_write().
| void BKE_lightprobe_type_set | ( | LightProbe * | probe, |
| const 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().
|
static |
Definition at line 44 of file lightprobe.cc.
References BKE_id_blend_write(), BLO_write_id_struct, and LightProbe::id.
|
static |
Definition at line 37 of file lightprobe.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, IDWALK_CB_NOP, and LightProbe::visibility_grp.
|
static |
Definition at line 136 of file lightprobe.cc.
References LightProbeGridCacheFrame::baking, BKE_lightprobe_grid_cache_frame_sample_count(), BLO_read_float3_array(), BLO_read_float_array(), BLO_read_int8_array(), BLO_read_struct_array, LightProbeGridCacheFrame::block_infos, LightProbeGridCacheFrame::block_len, LightProbeGridCacheFrame::connectivity, LightProbeGridCacheFrame::data_layout, ELEM, LightProbeGridCacheFrame::irradiance, LightProbeBakingData::L0, LightProbeIrradianceData::L0, LightProbeVisibilityData::L0, LightProbeBakingData::L1_a, LightProbeIrradianceData::L1_a, LightProbeVisibilityData::L1_a, LightProbeBakingData::L1_b, LightProbeIrradianceData::L1_b, LightProbeVisibilityData::L1_b, LightProbeBakingData::L1_c, LightProbeIrradianceData::L1_c, LightProbeVisibilityData::L1_c, LIGHTPROBE_CACHE_ADAPTIVE_RESOLUTION, LIGHTPROBE_CACHE_UNIFORM_GRID, LightProbeGridCacheFrame::surfels, LightProbeGridCacheFrame::surfels_len, LightProbeBakingData::validity, LightProbeConnectivityData::validity, LightProbeBakingData::virtual_offset, and LightProbeGridCacheFrame::visibility.
Referenced by BKE_lightprobe_cache_blend_read().
|
static |
Definition at line 116 of file lightprobe.cc.
References BKE_lightprobe_grid_cache_frame_sample_count(), BLO_write_float3_array(), BLO_write_float_array(), BLO_write_int8_array(), BLO_write_struct_array, LightProbeGridCacheFrame::block_infos, LightProbeGridCacheFrame::block_len, LightProbeGridCacheFrame::connectivity, LightProbeGridCacheFrame::irradiance, LightProbeIrradianceData::L0, LightProbeVisibilityData::L0, LightProbeIrradianceData::L1_a, LightProbeVisibilityData::L1_a, LightProbeIrradianceData::L1_b, LightProbeVisibilityData::L1_b, LightProbeIrradianceData::L1_c, LightProbeVisibilityData::L1_c, LightProbeConnectivityData::validity, and LightProbeGridCacheFrame::visibility.
Referenced by BKE_lightprobe_cache_blend_write().
|
static |
Definition at line 29 of file lightprobe.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 198 of file lightprobe.cc.
References MEM_dupallocN.
Referenced by BKE_lightprobe_grid_cache_frame_copy().
Definition at line 190 of file lightprobe.cc.
References MEM_SAFE_FREE.
Referenced by BKE_lightprobe_grid_cache_frame_free().
| IDTypeInfo IDType_ID_LP |
Definition at line 53 of file lightprobe.cc.