Blender V5.0
lightprobe.cc File Reference
#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_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.

Functions

static void lightprobe_init_data (ID *id)
static void lightprobe_foreach_id (ID *id, LibraryForeachIDData *data)
static void lightprobe_blend_write (BlendWriter *writer, ID *id, const void *id_address)
void BKE_lightprobe_type_set (LightProbe *probe, const short lightprobe_type)
LightProbeBKE_lightprobe_add (Main *bmain, const char *name)
static void lightprobe_grid_cache_frame_blend_write (BlendWriter *writer, const LightProbeGridCacheFrame *cache)
static void lightprobe_grid_cache_frame_blend_read (BlendDataReader *reader, LightProbeGridCacheFrame *cache)
void BKE_lightprobe_cache_blend_write (BlendWriter *writer, LightProbeObjectCache *cache)
void BKE_lightprobe_cache_blend_read (BlendDataReader *reader, LightProbeObjectCache *cache)
template<typename T>
static void spherical_harmonic_free (T &data)
template<typename DataT, typename T>
static void spherical_harmonic_copy (T &dst, T &src)
LightProbeGridCacheFrameBKE_lightprobe_grid_cache_frame_create ()
LightProbeGridCacheFrameBKE_lightprobe_grid_cache_frame_copy (LightProbeGridCacheFrame *src)
void BKE_lightprobe_grid_cache_frame_free (LightProbeGridCacheFrame *cache)
void BKE_lightprobe_cache_create (Object *object)
LightProbeObjectCacheBKE_lightprobe_cache_copy (LightProbeObjectCache *src_cache)
void BKE_lightprobe_cache_free (Object *object)
int64_t BKE_lightprobe_grid_cache_frame_sample_count (const LightProbeGridCacheFrame *cache)

Variables

IDTypeInfo IDType_ID_LP

Function Documentation

◆ BKE_lightprobe_add()

LightProbe * BKE_lightprobe_add ( Main * bmain,
const char * name )

Definition at line 107 of file lightprobe.cc.

References BKE_id_new(), and name.

Referenced by BKE_object_obdata_add_from_type().

◆ BKE_lightprobe_cache_blend_read()

void BKE_lightprobe_cache_blend_read ( BlendDataReader * reader,
LightProbeObjectCache * cache )

◆ BKE_lightprobe_cache_blend_write()

void BKE_lightprobe_cache_blend_write ( BlendWriter * writer,
LightProbeObjectCache * cache )

◆ BKE_lightprobe_cache_copy()

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 252 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().

◆ BKE_lightprobe_cache_create()

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, Object::lightprobe_cache, and MEM_callocN().

Referenced by lightprobe_cache_irradiance_volume_subset_get().

◆ BKE_lightprobe_cache_free()

void BKE_lightprobe_cache_free ( struct Object * object)

◆ BKE_lightprobe_grid_cache_frame_copy()

◆ BKE_lightprobe_grid_cache_frame_create()

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().

◆ BKE_lightprobe_grid_cache_frame_free()

◆ BKE_lightprobe_grid_cache_frame_sample_count()

◆ BKE_lightprobe_type_set()

◆ lightprobe_blend_write()

void lightprobe_blend_write ( BlendWriter * writer,
ID * id,
const void * id_address )
static

Definition at line 43 of file lightprobe.cc.

References BKE_id_blend_write(), BLO_write_id_struct, and LightProbe::id.

◆ lightprobe_foreach_id()

void lightprobe_foreach_id ( ID * id,
LibraryForeachIDData * data )
static

◆ lightprobe_grid_cache_frame_blend_read()

◆ lightprobe_grid_cache_frame_blend_write()

◆ lightprobe_init_data()

void lightprobe_init_data ( ID * id)
static

◆ spherical_harmonic_copy()

template<typename DataT, typename T>
void spherical_harmonic_copy ( T & dst,
T & src )
static

Definition at line 198 of file lightprobe.cc.

References MEM_dupallocN(), and T.

Referenced by BKE_lightprobe_grid_cache_frame_copy().

◆ spherical_harmonic_free()

template<typename T>
void spherical_harmonic_free ( T & data)
static

Definition at line 190 of file lightprobe.cc.

References data, MEM_SAFE_FREE, and T.

Referenced by BKE_lightprobe_grid_cache_frame_free().

Variable Documentation

◆ IDType_ID_LP

IDTypeInfo IDType_ID_LP
Initial value:
= {
LightProbe::id_type,
sizeof(LightProbe),
"LightProbe",
N_("lightprobes"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition BKE_idtype.hh:47
#define BLT_I18NCONTEXT_ID_LIGHTPROBE
@ INDEX_ID_LP
Definition DNA_ID.h:1335
#define FILTER_ID_IM
Definition DNA_ID.h:1204
#define FILTER_ID_LP
Definition DNA_ID.h:1227
static void lightprobe_init_data(ID *id)
Definition lightprobe.cc:28
static void lightprobe_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition lightprobe.cc:43
static void lightprobe_foreach_id(ID *id, LibraryForeachIDData *data)
Definition lightprobe.cc:36
#define N_(msgid)

Definition at line 52 of file lightprobe.cc.