Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-27 02:46:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-27 03:03:16 +0300
commit3051e2f4ae8fd3e72a43dd1e5d40893d0efec500 (patch)
tree6de62ee531c71705a8d86592770d26f8ecb75d1f /source/blender/editors
parentce104ca89643c4b0e6358fd22a2b056ecd603e62 (diff)
DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light - Main.lamp -> light
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/animation/anim_filter.c10
-rw-r--r--source/blender/editors/include/ED_anim_api.h2
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/editors/object/object_add.c6
-rw-r--r--source/blender/editors/object/object_relations.c10
-rw-r--r--source/blender/editors/object/object_select.c4
-rw-r--r--source/blender/editors/object/object_transform.c6
-rw-r--r--source/blender/editors/render/render_preview.c18
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/render/render_update.c4
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_node/space_node.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_lamp.c22
17 files changed, 49 insertions, 49 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index d4985b10382..b4a6254abd2 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1483,7 +1483,7 @@ static int acf_dslight_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
/* get pointer to the setting */
static void *acf_dslight_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
{
- Lamp *la = (Lamp *)ale->data;
+ Light *la = (Light *)ale->data;
/* clear extra return data first */
*type = 0;
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 2736bf8b06f..3d8eee958a3 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -672,7 +672,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
}
case ANIMTYPE_DSLAM:
{
- Lamp *la = (Lamp *)data;
+ Light *la = (Light *)data;
AnimData *adt = la->adt;
ale->flag = FILTER_LAM_OBJD(la);
@@ -2082,7 +2082,7 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac, ListBase *anim_data,
}
/* NOTE: owner_id is the direct owner of the texture stack in question
- * It used to be Material/Lamp/World before the Blender Internal removal for 2.8
+ * It used to be Material/Light/World before the Blender Internal removal for 2.8
*/
static size_t animdata_filter_ds_textures(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, int filter_mode)
{
@@ -2363,9 +2363,9 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
expanded = FILTER_CAM_OBJD(ca);
break;
}
- case OB_LAMP: /* ---------- Lamp ----------- */
+ case OB_LAMP: /* ---------- Light ----------- */
{
- Lamp *la = (Lamp *)ob->data;
+ Light *la = (Light *)ob->data;
if (ads->filterflag & ADS_FILTER_NOLAM)
return 0;
@@ -2451,7 +2451,7 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
switch (ob->type) {
case OB_LAMP: /* lamp - textures + nodetree */
{
- Lamp *la = ob->data;
+ Light *la = ob->data;
bNodeTree *ntree = la->nodetree;
/* nodetree */
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 4d06e8b6262..305e6eaa097 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -335,7 +335,7 @@ typedef enum eAnimFilter_Flags {
/* 'Sub-object' channels (flags stored in Data block) */
#define FILTER_SKE_OBJD(key) (CHECK_TYPE_INLINE(key, Key *), ((key->flag & KEY_DS_EXPAND)))
#define FILTER_MAT_OBJD(ma) (CHECK_TYPE_INLINE(ma, Material *), ((ma->flag & MA_DS_EXPAND)))
-#define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Lamp *), ((la->flag & LA_DS_EXPAND)))
+#define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Light *), ((la->flag & LA_DS_EXPAND)))
#define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND)))
#define FILTER_CACHEFILE_OBJD(cf) (CHECK_TYPE_INLINE(cf, CacheFile *), ((cf->flag & CACHEFILE_DS_EXPAND)))
#define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND)))
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 274eb6d8554..3159177e624 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2192,7 +2192,7 @@ void uiTemplatePreview(
else if (parent && (GS(parent->name) == ID_WO))
pr_texture = &((World *)parent)->pr_texture;
else if (parent && (GS(parent->name) == ID_LA))
- pr_texture = &((Lamp *)parent)->pr_texture;
+ pr_texture = &((Light *)parent)->pr_texture;
else if (parent && (GS(parent->name) == ID_LS))
pr_texture = &((FreestyleLineStyle *)parent)->pr_texture;
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index febd8005e4a..61853f05f46 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1115,7 +1115,7 @@ static int object_light_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob;
- Lamp *la;
+ Light *la;
int type = RNA_enum_get(op->ptr, "type");
ushort local_view_bits;
float loc[3], rot[3];
@@ -1141,7 +1141,7 @@ static int object_light_add_exec(bContext *C, wmOperator *op)
}
BKE_object_obdata_size_init(ob, size);
- la = (Lamp *)ob->data;
+ la = (Light *)ob->data;
la->type = type;
if (BKE_scene_uses_cycles(scene)) {
@@ -2351,7 +2351,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
if (dupflag & USER_DUP_LAMP) {
ID_NEW_REMAP_US2(obn->data)
else {
- obn->data = ID_NEW_SET(obn->data, BKE_lamp_copy(bmain, obn->data));
+ obn->data = ID_NEW_SET(obn->data, BKE_light_copy(bmain, obn->data));
didit = 1;
}
id_us_min(id);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 7cb83834b94..de17b3ca281 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1180,7 +1180,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
- /* Lamp, Camera and Speaker track differently by default */
+ /* Light, Camera and Speaker track differently by default */
if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) {
data->trackflag = TRACK_nZ;
}
@@ -1203,7 +1203,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
- /* Lamp, Camera and Speaker track differently by default */
+ /* Light, Camera and Speaker track differently by default */
if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) {
data->reserved1 = TRACK_nZ;
data->reserved2 = UP_Y;
@@ -1227,7 +1227,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
data->tar = obact;
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
- /* Lamp, Camera and Speaker track differently by default */
+ /* Light, Camera and Speaker track differently by default */
if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) {
data->trackflag = TRACK_nZ;
data->lockflag = LOCK_Y;
@@ -1699,7 +1699,7 @@ static void new_id_matar(Main *bmain, Material **matar, const int totcol)
static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
{
- Lamp *la;
+ Light *la;
Curve *cu;
/* Camera *cam; */
Mesh *me;
@@ -1716,7 +1716,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
switch (ob->type) {
case OB_LAMP:
- ob->data = la = ID_NEW_SET(ob->data, BKE_lamp_copy(bmain, ob->data));
+ ob->data = la = ID_NEW_SET(ob->data, BKE_light_copy(bmain, ob->data));
break;
case OB_CAMERA:
ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data));
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 6cc9a495597..88713b36094 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -868,14 +868,14 @@ static bool select_grouped_siblings(bContext *C, Object *ob)
}
static bool select_grouped_lamptype(bContext *C, Object *ob)
{
- Lamp *la = ob->data;
+ Light *la = ob->data;
bool changed = false;
CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
{
if (base->object->type == OB_LAMP) {
- Lamp *la_test = base->object->data;
+ Light *la_test = base->object->data;
if ((la->type == la_test->type) && ((base->flag & BASE_SELECTED) == 0)) {
ED_object_base_select(base, BA_SELECT);
changed = true;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 00374c12473..ee9df67a830 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -510,7 +510,7 @@ static int apply_objects_internal(
}
if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
if (la->type == LA_AREA) {
if (apply_rot || apply_loc) {
BKE_reportf(reports, RPT_ERROR,
@@ -654,7 +654,7 @@ static int apply_objects_internal(
}
}
else if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
if (la->type != LA_AREA) {
continue;
}
@@ -1361,7 +1361,7 @@ static void object_transform_axis_target_calc_depth_init(struct XFormAxisData *x
static bool object_is_target_compat(const Object *ob)
{
if (ob->type == OB_LAMP) {
- const Lamp *la = ob->data;
+ const Light *la = ob->data;
if (ELEM(la->type, LA_SUN, LA_SPOT, LA_AREA)) {
return true;
}
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index fe3a6f96dcf..bacafbaee9b 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -156,7 +156,7 @@ typedef struct ShaderPreview {
/* datablocks with nodes need full copy during preview render, glsl uses it too */
Material *matcopy;
Tex *texcopy;
- Lamp *lampcopy;
+ Light *lampcopy;
World *worldcopy;
/** Copy of the active objects #Object.color */
@@ -268,7 +268,7 @@ static const char *preview_collection_name(const char pr_type)
case MA_TEXTURE:
return "Texture";
case MA_LAMP:
- return "Lamp";
+ return "Light";
case MA_SKY:
return "Sky";
case MA_HAIR:
@@ -330,7 +330,7 @@ static ID *duplicate_ids(ID *id, Depsgraph *depsgraph)
case ID_TE:
return (ID *)BKE_texture_localize((Tex *)id_eval);
case ID_LA:
- return (ID *)BKE_lamp_localize((Lamp *)id_eval);
+ return (ID *)BKE_light_localize((Light *)id_eval);
case ID_WO:
return (ID *)BKE_world_localize((World *)id_eval);
case ID_IM:
@@ -479,14 +479,14 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
}
}
else if (id_type == ID_LA) {
- Lamp *la = NULL, *origla = (Lamp *)id;
+ Light *la = NULL, *origla = (Light *)id;
/* work on a copy */
if (origla) {
BLI_assert(sp->id_copy != NULL);
- la = sp->lampcopy = (Lamp *)sp->id_copy;
+ la = sp->lampcopy = (Light *)sp->id_copy;
sp->id_copy = NULL;
- BLI_addtail(&pr_main->lamp, la);
+ BLI_addtail(&pr_main->light, la);
}
set_preview_collection(sce, view_layer, MA_LAMP);
@@ -705,7 +705,7 @@ static void shader_preview_updatejob(void *spv)
ntreeLocalSync(sp->worldcopy->nodetree, wrld->nodetree);
}
else if (GS(sp->id->name) == ID_LA) {
- Lamp *la = (Lamp *)sp->id;
+ Light *la = (Light *)sp->id;
if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree)
ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree);
@@ -912,7 +912,7 @@ static void shader_preview_free(void *customdata)
}
if (sp->lampcopy) {
sp->id_copy = (ID *)sp->lampcopy;
- BLI_remlink(&pr_main->lamp, sp->lampcopy);
+ BLI_remlink(&pr_main->light, sp->lampcopy);
}
if (sp->id_copy) {
/* node previews */
@@ -934,7 +934,7 @@ static void shader_preview_free(void *customdata)
BKE_texture_free((Tex *)sp->id_copy);
break;
case ID_LA:
- BKE_lamp_free((Lamp *)sp->id_copy);
+ BKE_light_free((Light *)sp->id_copy);
break;
case ID_WO:
BKE_world_free((World *)sp->id_copy);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 8526f20f4e8..1afe0763699 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1916,7 +1916,7 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
if (id == NULL) {
Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
- Lamp *la = CTX_data_pointer_get_type(C, "light", &RNA_Light).data;
+ Light *la = CTX_data_pointer_get_type(C, "light", &RNA_Light).data;
World *wo = CTX_data_pointer_get_type(C, "world", &RNA_World).data;
ParticleSystem *psys = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data;
FreestyleLineStyle *linestyle = CTX_data_pointer_get_type(C, "line_style", &RNA_FreestyleLineStyle).data;
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 9332a6a56e6..6dd2d345726 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -210,7 +210,7 @@ static void material_changed(Main *UNUSED(bmain), Material *ma)
BKE_icon_changed(BKE_icon_id_ensure(&ma->id));
}
-static void lamp_changed(Main *UNUSED(bmain), Lamp *la)
+static void lamp_changed(Main *UNUSED(bmain), Light *la)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&la->id));
@@ -293,7 +293,7 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id)
world_changed(bmain, (World *)id);
break;
case ID_LA:
- lamp_changed(bmain, (Lamp *)id);
+ lamp_changed(bmain, (Light *)id);
break;
case ID_IM:
image_changed(bmain, (Image *)id);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index ed1db0e6fae..ffc9ba54c99 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -102,7 +102,7 @@ static bNodeTree *node_tree_from_ID(ID *id)
case ID_MA:
return ((Material *)id)->nodetree;
case ID_LA:
- return ((Lamp *)id)->nodetree;
+ return ((Light *)id)->nodetree;
case ID_WO:
return ((World *)id)->nodetree;
case ID_SCE:
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 91fc344ec01..6347548cd7e 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -413,7 +413,7 @@ void ED_node_shader_default(const bContext *C, ID *id)
}
case ID_LA:
{
- Lamp *la = (Lamp *)id;
+ Light *la = (Light *)id;
la->nodetree = ntree;
output_type = SH_NODE_OUTPUT_LIGHT;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 0039fb1e2ab..b94a27b7839 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -531,7 +531,7 @@ static void node_area_refresh(const struct bContext *C, ScrArea *sa)
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
else if (GS(snode->id->name) == ID_LA) {
- Lamp *la = (Lamp *)snode->id;
+ Light *la = (Light *)snode->id;
if (la->use_nodes)
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 0180e3d391e..ff6def955ce 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1337,7 +1337,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
data.icon = ICON_OUTLINER_DATA_LATTICE; break;
case ID_LA:
{
- Lamp *la = (Lamp *)tselem->id;
+ Light *la = (Light *)tselem->id;
switch (la->type) {
case LA_LOCAL:
data.icon = ICON_LIGHT_POINT; break;
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index f4f91e0ffde..09176e08621 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -584,7 +584,7 @@ static void outliner_add_id_contents(SpaceOutliner *soops, TreeElement *te, Tree
}
case ID_LA:
{
- Lamp *la = (Lamp *)id;
+ Light *la = (Light *)id;
if (outliner_animdata_test(la->adt))
outliner_add_element(soops, &te->subtree, la, te, TSE_ANIM_DATA, 0);
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
index 0854a7e60c5..208470f76f4 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
@@ -45,7 +45,7 @@
#include "view3d_intern.h" /* own include */
/* -------------------------------------------------------------------- */
-/** \name Spot Lamp Gizmos
+/** \name Spot Light Gizmos
* \{ */
static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
@@ -62,7 +62,7 @@ static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmGizmoGroupType *UNUS
if (base && BASE_SELECTABLE(v3d, base)) {
Object *ob = base->object;
if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
return (la->type == LA_SPOT);
}
}
@@ -90,7 +90,7 @@ static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmGizmoGroup *gzgro
wmGizmo *gz = wwrapper->gizmo;
ViewLayer *view_layer = CTX_data_view_layer(C);
Object *ob = OBACT(view_layer);
- Lamp *la = ob->data;
+ Light *la = ob->data;
float dir[3];
negate_v3_v3(dir, ob->obmat[2]);
@@ -122,7 +122,7 @@ void VIEW3D_GGT_lamp_spot(wmGizmoGroupType *gzgt)
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Area Lamp Gizmos
+/** \name Area Light Gizmos
* \{ */
/* scale callbacks */
@@ -132,7 +132,7 @@ static void gizmo_area_lamp_prop_matrix_get(
{
BLI_assert(gz_prop->type->array_length == 16);
float (*matrix)[4] = value_p;
- const Lamp *la = gz_prop->custom_func.user_data;
+ const Light *la = gz_prop->custom_func.user_data;
matrix[0][0] = la->area_size;
matrix[1][1] = ELEM(la->area_shape, LA_AREA_RECT, LA_AREA_ELLIPSE) ? la->area_sizey : la->area_size;
@@ -144,7 +144,7 @@ static void gizmo_area_lamp_prop_matrix_set(
{
const float (*matrix)[4] = value_p;
BLI_assert(gz_prop->type->array_length == 16);
- Lamp *la = gz_prop->custom_func.user_data;
+ Light *la = gz_prop->custom_func.user_data;
if (ELEM(la->area_shape, LA_AREA_RECT, LA_AREA_ELLIPSE)) {
la->area_size = len_v3(matrix[0]);
@@ -170,7 +170,7 @@ static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmGizmoGroupType *UNUS
if (base && BASE_SELECTABLE(v3d, base)) {
Object *ob = base->object;
if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
return (la->type == LA_AREA);
}
}
@@ -198,7 +198,7 @@ static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmGizmoGroup *gzgro
wmGizmoWrapper *wwrapper = gzgroup->customdata;
ViewLayer *view_layer = CTX_data_view_layer(C);
Object *ob = OBACT(view_layer);
- Lamp *la = ob->data;
+ Light *la = ob->data;
wmGizmo *gz = wwrapper->gizmo;
copy_m4_m4(gz->matrix_basis, ob->obmat);
@@ -238,7 +238,7 @@ void VIEW3D_GGT_lamp_area(wmGizmoGroupType *gzgt)
/* -------------------------------------------------------------------- */
-/** \name Lamp Target Gizmo
+/** \name Light Target Gizmo
* \{ */
static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
@@ -253,7 +253,7 @@ static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmGizmoGroupType *UN
if (base && BASE_SELECTABLE(v3d, base)) {
Object *ob = base->object;
if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
return (ELEM(la->type, LA_SUN, LA_SPOT, LA_AREA));
}
#if 0
@@ -297,7 +297,7 @@ static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmGizmoGroup
unit_m4(gz->matrix_offset);
if (ob->type == OB_LAMP) {
- Lamp *la = ob->data;
+ Light *la = ob->data;
if (la->type == LA_SPOT) {
/* Draw just past the lamp size angle gizmo. */
madd_v3_v3fl(gz->matrix_basis[3], gz->matrix_basis[2], -la->spotsize);