Blender V5.0
light.cc File Reference
#include <cstdlib>
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_light_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "BLI_math_base.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_utildefines.h"
#include "BKE_icons.h"
#include "BKE_idtype.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_light.h"
#include "BKE_node.hh"
#include "BKE_preview_image.hh"
#include "BLT_translation.hh"
#include "DEG_depsgraph.hh"
#include "IMB_colormanagement.hh"
#include "BLO_read_write.hh"

Go to the source code of this file.

Macros

#define DNA_DEPRECATED_ALLOW

Functions

static void light_init_data (ID *id)
static void light_copy_data (Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
static void light_free_data (ID *id)
static void light_foreach_id (ID *id, LibraryForeachIDData *data)
static void light_foreach_working_space_color (ID *id, const IDTypeForeachColorFunctionCallback &fn)
static void light_blend_write (BlendWriter *writer, ID *id, const void *id_address)
static void light_blend_read_data (BlendDataReader *reader, ID *id)
LightBKE_light_add (Main *bmain, const char *name)
void BKE_light_eval (Depsgraph *depsgraph, Light *la)
float BKE_light_power (const Light &light)
blender::float3 BKE_light_color (const Light &light)
float BKE_light_area (const Light &light, const blender::float4x4 &object_to_world)

Variables

IDTypeInfo IDType_ID_LA

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 15 of file blenkernel/intern/light.cc.

Function Documentation

◆ BKE_light_add()

◆ BKE_light_area()

◆ BKE_light_color()

◆ BKE_light_eval()

void BKE_light_eval ( Depsgraph * depsgraph,
Light * la )

Definition at line 206 of file blenkernel/intern/light.cc.

References DEG_debug_print_eval(), depsgraph, Light::id, and ID::name.

◆ BKE_light_power()

float BKE_light_power ( const Light & light)

Definition at line 211 of file blenkernel/intern/light.cc.

References Light::energy, and Light::exposure.

Referenced by blender::eevee::Light::sync().

◆ light_blend_read_data()

void light_blend_read_data ( BlendDataReader * reader,
ID * id )
static

◆ light_blend_write()

◆ light_copy_data()

void light_copy_data ( Main * bmain,
std::optional< Library * > owner_library,
ID * id_dst,
const ID * id_src,
const int flag )
static

Only copy internal data of Light ID from source to already allocated/initialized destination. You probably never want to use that directly, use BKE_id_copy or BKE_id_copy_ex for typical needs.

WARNING! This function will not handle ID user count!

Parameters
flagCopying options (see BKE_lib_id.hh's LIB_ID_COPY_... flags for more).

Definition at line 61 of file blenkernel/intern/light.cc.

References BKE_id_copy_in_lib(), BKE_previewimg_id_copy(), flag, bNodeTree::id, Light::id, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_LOCAL, LIB_ID_CREATE_NO_ALLOCATE, LIB_ID_CREATE_NO_USER_REFCOUNT, blender::bke::node_tree_localize(), Light::nodetree, and Light::preview.

◆ light_foreach_id()

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

◆ light_foreach_working_space_color()

void light_foreach_working_space_color ( ID * id,
const IDTypeForeachColorFunctionCallback & fn )
static

◆ light_free_data()

◆ light_init_data()

void light_init_data ( ID * id)
static

Variable Documentation

◆ IDType_ID_LA

IDTypeInfo IDType_ID_LA
Initial value:
= {
Light::id_type,
sizeof(Light),
"Light",
N_("lights"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition BKE_idtype.hh:47
#define BLT_I18NCONTEXT_ID_LIGHT
#define FILTER_ID_LA
Definition DNA_ID.h:1205
#define FILTER_ID_TE
Definition DNA_ID.h:1220
@ INDEX_ID_LA
Definition DNA_ID.h:1332
static void light_foreach_id(ID *id, LibraryForeachIDData *data)
static void light_blend_read_data(BlendDataReader *reader, ID *id)
static void light_copy_data(Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
static void light_foreach_working_space_color(ID *id, const IDTypeForeachColorFunctionCallback &fn)
static void light_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static void light_free_data(ID *id)
static void light_init_data(ID *id)
#define N_(msgid)

Definition at line 166 of file blenkernel/intern/light.cc.