|
Blender V5.0
|
#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) |
| Light * | BKE_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 |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 15 of file blenkernel/intern/light.cc.
Definition at line 197 of file blenkernel/intern/light.cc.
References BKE_id_new(), and name.
Referenced by BKE_object_obdata_add_from_type(), blender::io::usd::USDLightReader::create_object(), and blender::io::fbx::FbxImportContext::import_lights().
| float BKE_light_area | ( | const Light & | light, |
| const blender::float4x4 & | object_to_world ) |
Definition at line 229 of file blenkernel/intern/light.cc.
References angle(), Light::area_shape, Light::area_size, Light::area_sizey, BLI_assert_unreachable, ELEM, float, LA_AREA, LA_AREA_DISK, LA_AREA_ELLIPSE, LA_AREA_RECT, LA_LOCAL, LA_SPOT, LA_SUN, M_PI, Light::radius, sinf, blender::math::square(), Light::sun_angle, blender::math::to_scale(), Light::type, and blender::MatBase< T, NumCol, NumRow, Alignment >::view().
Referenced by blender::eevee::Light::sync().
| blender::float3 BKE_light_color | ( | const Light & | light | ) |
Definition at line 216 of file blenkernel/intern/light.cc.
References IMB_colormanagement_blackbody_temperature_to_rgb(), LA_USE_TEMPERATURE, Light::mode, Light::r, and Light::temperature.
Referenced by blender::eevee::Light::sync().
| 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.
Definition at line 211 of file blenkernel/intern/light.cc.
References Light::energy, and Light::exposure.
Referenced by blender::eevee::Light::sync().
|
static |
Definition at line 158 of file blenkernel/intern/light.cc.
References BKE_previewimg_blend_read(), BLO_read_struct, and Light::preview.
|
static |
Definition at line 133 of file blenkernel/intern/light.cc.
References BKE_id_blend_write(), BKE_previewimg_blend_write(), BLO_write_id_struct, BLO_write_struct_at_address, Light::energy, Light::exposure, BLO_Write_IDBuffer::get(), bNodeTree::id, Light::id, LA_AREA, M_PI_4, blender::bke::node_tree_blend_write(), Light::nodetree, Light::preview, and Light::type.
|
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!
| flag | Copying 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.
|
static |
Definition at line 115 of file blenkernel/intern/light.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_library_foreach_ID_embedded(), data, and Light::nodetree.
|
static |
Definition at line 126 of file blenkernel/intern/light.cc.
References Light::r, and IDTypeForeachColorFunctionCallback::single.
|
static |
Definition at line 99 of file blenkernel/intern/light.cc.
References BKE_icon_id_delete(), BKE_previewimg_free(), ID::icon_id, Light::id, MEM_freeN(), blender::bke::node_tree_free_embedded_tree(), Light::nodetree, and Light::preview.
|
static |
Definition at line 43 of file blenkernel/intern/light.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
| IDTypeInfo IDType_ID_LA |
Definition at line 166 of file blenkernel/intern/light.cc.