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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-27 15:41:53 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-06 21:06:09 +0300
commit74fd17e9d788394fa5bf781bb3e60bca7617b22c (patch)
treea27bcd7e67f74cd0abfeb06b6b9f13e049d736f2 /source
parent4ac048f4e4ef1945fe085c3c0ebf263eb51d8d1b (diff)
UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles were already calling them lights.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/intern/idcode.c2
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
-rw-r--r--source/blender/blenkernel/intern/object.c2
-rw-r--r--source/blender/collada/DocumentImporter.cpp6
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c26
-rw-r--r--source/blender/editors/include/UI_icons.h18
-rw-r--r--source/blender/editors/interface/interface_icons.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c6
-rw-r--r--source/blender/editors/object/object_add.c36
-rw-r--r--source/blender/editors/object/object_intern.h2
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_select.c8
-rw-r--r--source/blender/editors/object/object_transform.c6
-rw-r--r--source/blender/editors/render/render_internal.c2
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c8
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c16
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_empty.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_lamp.c8
-rw-r--r--source/blender/makesrna/RNA_access.h18
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/makesrna/intern/rna_ID.c6
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c6
-rw-r--r--source/blender/makesrna/intern/rna_internal.h6
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c215
-rw-r--r--source/blender/makesrna/intern/rna_main.c4
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c37
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_object.c6
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c6
-rw-r--r--source/blender/makesrna/intern/rna_space.c12
-rw-r--r--source/blender/makesrna/intern/rna_texture.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c11
-rw-r--r--source/blender/nodes/NOD_static_types.h4
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_lamp.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
48 files changed, 268 insertions, 265 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 9eb026b1c4f..13d6fd10eaa 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -733,7 +733,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, c
#define SH_NODE_OUTPUT_MATERIAL 124
#define SH_NODE_OUTPUT_WORLD 125
-#define SH_NODE_OUTPUT_LAMP 126
+#define SH_NODE_OUTPUT_LIGHT 126
#define SH_NODE_FRESNEL 127
#define SH_NODE_MIX_SHADER 128
#define SH_NODE_ATTRIBUTE 129
diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c
index 0edeaab8900..8328d71128a 100644
--- a/source/blender/blenkernel/intern/idcode.c
+++ b/source/blender/blenkernel/intern/idcode.c
@@ -67,7 +67,7 @@ static IDType idtypes[] = {
{ ID_IM, "Image", "images", BLT_I18NCONTEXT_ID_IMAGE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_IP, "Ipo", "ipos", "", IDTYPE_FLAGS_ISLINKABLE }, /* deprecated */
{ ID_KE, "Key", "shape_keys", BLT_I18NCONTEXT_ID_SHAPEKEY, 0 },
- { ID_LA, "Lamp", "lamps", BLT_I18NCONTEXT_ID_LAMP, IDTYPE_FLAGS_ISLINKABLE },
+ { ID_LA, "Light", "lights", BLT_I18NCONTEXT_ID_LAMP, IDTYPE_FLAGS_ISLINKABLE },
{ ID_LI, "Library", "libraries", BLT_I18NCONTEXT_ID_LIBRARY, 0 },
{ ID_LS, "FreestyleLineStyle", "linestyles", BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, IDTYPE_FLAGS_ISLINKABLE },
{ ID_LT, "Lattice", "lattices", BLT_I18NCONTEXT_ID_LATTICE, IDTYPE_FLAGS_ISLINKABLE },
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index f8040f0cf24..b7ca73e9f4a 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1999,7 +1999,7 @@ void do_versions_ipos_to_animato(Main *bmain)
for (id = bmain->lamp.first; id; id = id->next) {
Lamp *la = (Lamp *)id;
- if (G.debug & G_DEBUG) printf("\tconverting lamp %s\n", id->name + 2);
+ if (G.debug & G_DEBUG) printf("\tconverting light %s\n", id->name + 2);
/* we're only interested in the IPO */
if (la->ipo) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 0418634c704..a7c13ab2a81 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -653,7 +653,7 @@ static const char *get_obdata_defname(int type)
case OB_FONT: return DATA_("Text");
case OB_MBALL: return DATA_("Mball");
case OB_CAMERA: return DATA_("Camera");
- case OB_LAMP: return DATA_("Lamp");
+ case OB_LAMP: return DATA_("Light");
case OB_LATTICE: return DATA_("Lattice");
case OB_ARMATURE: return DATA_("Armature");
case OB_SPEAKER: return DATA_("Speaker");
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index a382b7cca9c..ced6e967acf 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -389,7 +389,7 @@ Object *DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce
{
const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId();
if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) {
- fprintf(stderr, "Couldn't find lamp by UID.\n");
+ fprintf(stderr, "Couldn't find light by UID.\n");
return NULL;
}
@@ -1122,7 +1122,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
else lamp = (Lamp *)BKE_lamp_add(bmain, (char *)la_id.c_str());
if (!lamp) {
- fprintf(stderr, "Cannot create lamp.\n");
+ fprintf(stderr, "Cannot create light.\n");
return true;
}
@@ -1234,7 +1234,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
break;
case COLLADAFW::Light::UNDEFINED:
{
- fprintf(stderr, "Current lamp type is not supported.\n");
+ fprintf(stderr, "Current light type is not supported.\n");
lamp->type = LA_LOCAL;
}
break;
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index f64c4f5aff0..1e0420ef6bc 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -679,7 +679,7 @@ void DepsgraphRelationBuilder::build_object_data_lamp(Object *object)
build_lamp(lamp);
ComponentKey object_parameters_key(&object->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey lamp_parameters_key(&lamp->id, DEG_NODE_TYPE_PARAMETERS);
- add_relation(lamp_parameters_key, object_parameters_key, "Lamp -> Object");
+ add_relation(lamp_parameters_key, object_parameters_key, "Light -> Object");
}
void DepsgraphRelationBuilder::build_object_data_lightprobe(Object *object)
@@ -1968,7 +1968,7 @@ void DepsgraphRelationBuilder::build_lamp(Lamp *lamp)
build_nodetree(lamp->nodetree);
ComponentKey lamp_parameters_key(&lamp->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey nodetree_key(&lamp->nodetree->id, DEG_NODE_TYPE_SHADING);
- add_relation(nodetree_key, lamp_parameters_key, "NTree->Lamp Parameters");
+ add_relation(nodetree_key, lamp_parameters_key, "NTree->Light Parameters");
build_nested_nodetree(&lamp->id, lamp->nodetree);
}
}
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 880519911ed..2b1bd9fbce3 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -334,7 +334,7 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
/* Step 1 find all lamps in the scene and setup them */
if (linfo->num_light >= MAX_LIGHT) {
- printf("Too many lamps in the scene !!!\n");
+ printf("Too many lights in the scene !!!\n");
}
else {
Lamp *la = (Lamp *)ob->data;
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 6bd333294c5..5bbaabcc6bc 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -638,7 +638,7 @@ static int acf_object_icon(bAnimListElem *ale)
/* icon depends on object-type */
switch (ob->type) {
case OB_LAMP:
- return ICON_OUTLINER_OB_LAMP;
+ return ICON_OUTLINER_OB_LIGHT;
case OB_MESH:
return ICON_OUTLINER_OB_MESH;
case OB_CAMERA:
@@ -1452,16 +1452,16 @@ static bAnimChannelType ACF_DSMAT =
acf_dsmat_setting_ptr /* pointer for setting */
};
-/* Lamp Expander ------------------------------------------- */
+/* Light Expander ------------------------------------------- */
// TODO: just get this from RNA?
-static int acf_dslam_icon(bAnimListElem *UNUSED(ale))
+static int acf_dslight_icon(bAnimListElem *UNUSED(ale))
{
- return ICON_LAMP_DATA;
+ return ICON_LIGHT_DATA;
}
/* get the appropriate flag(s) for the setting when it is valid */
-static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings setting, bool *neg)
+static int acf_dslight_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings setting, bool *neg)
{
/* clear extra return data first */
*neg = false;
@@ -1486,7 +1486,7 @@ static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
}
/* get pointer to the setting */
-static void *acf_dslam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
+static void *acf_dslight_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
{
Lamp *la = (Lamp *)ale->data;
@@ -1510,9 +1510,9 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings set
}
/* lamp expander type define */
-static bAnimChannelType ACF_DSLAM =
+static bAnimChannelType ACF_DSLIGHT =
{
- "Lamp Expander", /* type name */
+ "Light Expander", /* type name */
ACHANNEL_ROLE_EXPANDER, /* role */
acf_generic_dataexpand_color, /* backdrop color */
@@ -1521,12 +1521,12 @@ static bAnimChannelType ACF_DSLAM =
acf_generic_basic_offset, /* offset */
acf_generic_idblock_name, /* name */
- acf_generic_idblock_name_prop, /* name prop */
- acf_dslam_icon, /* icon */
+ acf_generic_idblock_name_prop, /* name prop */
+ acf_dslight_icon, /* icon */
acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dslam_setting_flag, /* flag for setting */
- acf_dslam_setting_ptr /* pointer for setting */
+ acf_dslight_setting_flag, /* flag for setting */
+ acf_dslight_setting_ptr /* pointer for setting */
};
/* Texture Expander ------------------------------------------- */
@@ -3580,7 +3580,7 @@ static void ANIM_init_channel_typeinfo_data(void)
animchannelTypeInfo[type++] = &ACF_FILLDRIVERS; /* Drivers Expander */
animchannelTypeInfo[type++] = &ACF_DSMAT; /* Material Channel */
- animchannelTypeInfo[type++] = &ACF_DSLAM; /* Lamp Channel */
+ animchannelTypeInfo[type++] = &ACF_DSLIGHT; /* Light Channel */
animchannelTypeInfo[type++] = &ACF_DSCAM; /* Camera Channel */
animchannelTypeInfo[type++] = &ACF_DSCACHEFILE; /* CacheFile Channel */
animchannelTypeInfo[type++] = &ACF_DSCUR; /* Curve Channel */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 4c67a306e75..68318835a00 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -119,7 +119,7 @@ DEF_ICON(FULLSCREEN_EXIT)
DEF_ICON(BLANK1) // Not actually blank - this is used all over the place
/* BUTTONS */
-DEF_ICON(LAMP)
+DEF_ICON(LIGHT)
DEF_ICON(MATERIAL)
DEF_ICON(TEXTURE)
DEF_ICON(ANIM)
@@ -216,7 +216,7 @@ DEF_ICON(MESH_DATA)
DEF_ICON(CURVE_DATA)
DEF_ICON(META_DATA)
DEF_ICON(LATTICE_DATA)
-DEF_ICON(LAMP_DATA)
+DEF_ICON(LIGHT_DATA)
DEF_ICON(MATERIAL_DATA)
DEF_ICON(TEXTURE_DATA)
DEF_ICON(ANIM_DATA)
@@ -304,7 +304,7 @@ DEF_ICON(OUTLINER_OB_MESH)
DEF_ICON(OUTLINER_OB_CURVE)
DEF_ICON(OUTLINER_OB_LATTICE)
DEF_ICON(OUTLINER_OB_META)
-DEF_ICON(OUTLINER_OB_LAMP)
+DEF_ICON(OUTLINER_OB_LIGHT)
DEF_ICON(OUTLINER_OB_CAMERA)
DEF_ICON(OUTLINER_OB_ARMATURE)
DEF_ICON(OUTLINER_OB_FONT)
@@ -336,7 +336,7 @@ DEF_ICON(OUTLINER_DATA_MESH)
DEF_ICON(OUTLINER_DATA_CURVE)
DEF_ICON(OUTLINER_DATA_LATTICE)
DEF_ICON(OUTLINER_DATA_META)
-DEF_ICON(OUTLINER_DATA_LAMP)
+DEF_ICON(OUTLINER_DATA_LIGHT)
DEF_ICON(OUTLINER_DATA_CAMERA)
DEF_ICON(OUTLINER_DATA_ARMATURE)
DEF_ICON(OUTLINER_DATA_FONT)
@@ -377,11 +377,11 @@ DEF_ICON(MESH_CAPSULE)
#ifndef DEF_ICON_BLANK_SKIP
DEF_ICON(BLANK611)
#endif
-DEF_ICON(LAMP_POINT)
-DEF_ICON(LAMP_SUN)
-DEF_ICON(LAMP_SPOT)
-DEF_ICON(LAMP_HEMI)
-DEF_ICON(LAMP_AREA)
+DEF_ICON(LIGHT_POINT)
+DEF_ICON(LIGHT_SUN)
+DEF_ICON(LIGHT_SPOT)
+DEF_ICON(LIGHT_HEMI)
+DEF_ICON(LIGHT_AREA)
#ifndef DEF_ICON_BLANK_SKIP
DEF_ICON(BLANK617)
DEF_ICON(BLANK618)
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index c3246213d4e..4748ff3310a 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1554,7 +1554,7 @@ int UI_idcode_icon_get(const int idcode)
case ID_IM:
return ICON_IMAGE_DATA;
case ID_LA:
- return ICON_LAMP_DATA;
+ return ICON_LIGHT_DATA;
case ID_LS:
return ICON_LINE_DATA;
case ID_LT:
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 1c3ed3e3c75..f80e4e486d6 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -518,7 +518,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
case ID_IM: return N_("Browse Image to be linked");
case ID_LS: return N_("Browse Line Style Data to be linked");
case ID_LT: return N_("Browse Lattice Data to be linked");
- case ID_LA: return N_("Browse Lamp Data to be linked");
+ case ID_LA: return N_("Browse Light Data to be linked");
case ID_CA: return N_("Browse Camera Data to be linked");
case ID_WO: return N_("Browse World Settings to be linked");
case ID_SCR: return N_("Choose Screen layout");
@@ -1863,7 +1863,7 @@ void uiTemplatePreview(
char _preview_id[UI_MAX_NAME_STR];
if (id && !ELEM(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA, ID_LS)) {
- RNA_warning("Expected ID of type material, texture, lamp, world or line style");
+ RNA_warning("Expected ID of type material, texture, light, world or line style");
return;
}
@@ -1954,7 +1954,7 @@ void uiTemplatePreview(
pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
}
else if (GS(parent->name) == ID_LA) {
- uiDefButS(block, UI_BTYPE_ROW, B_MATPRV, IFACE_("Lamp"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y,
+ uiDefButS(block, UI_BTYPE_ROW, B_MATPRV, IFACE_("Light"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y,
pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
}
else if (GS(parent->name) == ID_WO) {
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index a8c3c905dd4..a8917f4c4aa 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -120,12 +120,12 @@
/* this is an exact copy of the define in rna_lamp.c
* kept here because of linking order.
* Icons are only defined here */
-const EnumPropertyItem rna_enum_lamp_type_items[] = {
- {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"},
- {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"},
- {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"},
- {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemi", "180 degree constant light source"},
- {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source"},
+const EnumPropertyItem rna_enum_light_type_items[] = {
+ {LA_LOCAL, "POINT", ICON_LIGHT_POINT, "Point", "Omnidirectional point light source"},
+ {LA_SUN, "SUN", ICON_LIGHT_SUN, "Sun", "Constant direction parallel ray light source"},
+ {LA_SPOT, "SPOT", ICON_LIGHT_SPOT, "Spot", "Directional cone light source"},
+ {LA_HEMI, "HEMI", ICON_LIGHT_HEMI, "Hemi", "180 degree constant light source"},
+ {LA_AREA, "AREA", ICON_LIGHT_AREA, "Area", "Directional area light source"},
{0, NULL, 0, NULL, NULL}
};
@@ -985,9 +985,9 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot)
ED_object_add_generic_props(ot, false);
}
-/********************* Add Lamp Operator ********************/
+/********************* Add Light Operator ********************/
-static const char *get_lamp_defname(int type)
+static const char *get_light_defname(int type)
{
switch (type) {
case LA_LOCAL: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Point");
@@ -996,11 +996,11 @@ static const char *get_lamp_defname(int type)
case LA_HEMI: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Hemi");
case LA_AREA: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Area");
default:
- return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Lamp");
+ return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Light");
}
}
-static int object_lamp_add_exec(bContext *C, wmOperator *op)
+static int object_light_add_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob;
@@ -1013,10 +1013,10 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_LAMP, get_lamp_defname(type), loc, rot, false, layer);
+ ob = ED_object_add_type(C, OB_LAMP, get_light_defname(type), loc, rot, false, layer);
float size = RNA_float_get(op->ptr, "radius");
- /* Better defaults for lamp size. */
+ /* Better defaults for light size. */
switch (type) {
case LA_LOCAL:
case LA_SPOT:
@@ -1041,23 +1041,23 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void OBJECT_OT_lamp_add(wmOperatorType *ot)
+void OBJECT_OT_light_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Add Lamp";
- ot->description = "Add a lamp object to the scene";
- ot->idname = "OBJECT_OT_lamp_add";
+ ot->name = "Add Light";
+ ot->description = "Add a light object to the scene";
+ ot->idname = "OBJECT_OT_light_add";
/* api callbacks */
ot->invoke = WM_menu_invoke;
- ot->exec = object_lamp_add_exec;
+ ot->exec = object_light_add_exec;
ot->poll = ED_operator_objectmode;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_lamp_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_light_type_items, 0, "Type", "");
RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LAMP);
ED_object_add_unit_props(ot);
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index b1ea6d72346..1b5c6df2632 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -115,7 +115,7 @@ void OBJECT_OT_armature_add(struct wmOperatorType *ot);
void OBJECT_OT_empty_add(struct wmOperatorType *ot);
void OBJECT_OT_lightprobe_add(struct wmOperatorType *ot);
void OBJECT_OT_drop_named_image(struct wmOperatorType *ot);
-void OBJECT_OT_lamp_add(struct wmOperatorType *ot);
+void OBJECT_OT_light_add(struct wmOperatorType *ot);
void OBJECT_OT_effector_add(struct wmOperatorType *ot);
void OBJECT_OT_camera_add(struct wmOperatorType *ot);
void OBJECT_OT_speaker_add(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 43d993531bc..5a83d085aee 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -114,7 +114,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_empty_add);
WM_operatortype_append(OBJECT_OT_lightprobe_add);
WM_operatortype_append(OBJECT_OT_drop_named_image);
- WM_operatortype_append(OBJECT_OT_lamp_add);
+ WM_operatortype_append(OBJECT_OT_light_add);
WM_operatortype_append(OBJECT_OT_camera_add);
WM_operatortype_append(OBJECT_OT_speaker_add);
WM_operatortype_append(OBJECT_OT_add);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b1dee812f45..d5f7a93cc6e 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -485,7 +485,7 @@ enum {
OBJECT_GRPSEL_PASS = 8,
OBJECT_GRPSEL_COLOR = 9,
OBJECT_GRPSEL_KEYINGSET = 10,
- OBJECT_GRPSEL_LAMP_TYPE = 11,
+ OBJECT_GRPSEL_LIGHT_TYPE = 11,
};
static const EnumPropertyItem prop_select_grouped_types[] = {
@@ -499,7 +499,7 @@ static const EnumPropertyItem prop_select_grouped_types[] = {
{OBJECT_GRPSEL_PASS, "PASS", 0, "Pass", "Render pass Index"},
{OBJECT_GRPSEL_COLOR, "COLOR", 0, "Color", "Object Color"},
{OBJECT_GRPSEL_KEYINGSET, "KEYINGSET", 0, "Keying Set", "Objects included in active Keying Set"},
- {OBJECT_GRPSEL_LAMP_TYPE, "LAMP_TYPE", 0, "Lamp Type", "Matching lamp types"},
+ {OBJECT_GRPSEL_LIGHT_TYPE, "LIGHT_TYPE", 0, "Light Type", "Matching light types"},
{0, NULL, 0, NULL, NULL}
};
@@ -803,9 +803,9 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
case OBJECT_GRPSEL_KEYINGSET:
changed |= select_grouped_keyingset(C, ob, op->reports);
break;
- case OBJECT_GRPSEL_LAMP_TYPE:
+ case OBJECT_GRPSEL_LIGHT_TYPE:
if (ob->type != OB_LAMP) {
- BKE_report(op->reports, RPT_ERROR, "Active object must be a lamp");
+ BKE_report(op->reports, RPT_ERROR, "Active object must be a light");
break;
}
changed |= select_grouped_lamptype(C, ob);
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 721d248ae4c..d2a0879464b 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -485,7 +485,7 @@ static int apply_objects_internal(
if (la->type == LA_AREA) {
if (apply_rot || apply_loc) {
BKE_reportf(reports, RPT_ERROR,
- "Area Lamps can only have scale applied: \"%s\"",
+ "Area Lights can only have scale applied: \"%s\"",
ob->id.name + 2);
changed = false;
}
@@ -1540,8 +1540,8 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
void OBJECT_OT_transform_axis_target(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Interactive Lamp Track to Cursor";
- ot->description = "Interactively point cameras and lamps to a location (Ctrl translates)";
+ ot->name = "Interactive Light Track to Cursor";
+ ot->description = "Interactively point cameras and lights to a location (Ctrl translates)";
ot->idname = "OBJECT_OT_transform_axis_target";
/* api callbacks */
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index ae364828119..d6a968d993c 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -427,7 +427,7 @@ static void make_renderinfo_string(const RenderStats *rs,
if (rs->totface) spos += sprintf(spos, IFACE_("Fa:%d "), rs->totface);
if (rs->tothalo) spos += sprintf(spos, IFACE_("Ha:%d "), rs->tothalo);
if (rs->totstrand) spos += sprintf(spos, IFACE_("St:%d "), rs->totstrand);
- if (rs->totlamp) spos += sprintf(spos, IFACE_("La:%d "), rs->totlamp);
+ if (rs->totlamp) spos += sprintf(spos, IFACE_("Li:%d "), rs->totlamp);
if (rs->mem_peak == 0.0f)
spos += sprintf(spos, IFACE_("| Mem:%.2fM (%.2fM, Peak %.2fM) "),
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 07e0c124998..1673e0d7ca0 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1654,7 +1654,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, "lamp", &RNA_Lamp).data;
+ Lamp *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/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 4c6de3ec012..faee9c2b7ac 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -234,7 +234,7 @@ static int buttons_context_path_data(ButsContextPath *path, int type)
else if (RNA_struct_is_a(ptr->type, &RNA_MetaBall) && (type == -1 || type == OB_MBALL)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Lattice) && (type == -1 || type == OB_LATTICE)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1;
- else if (RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Light) && (type == -1 || type == OB_LAMP)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1;
else if (RNA_struct_is_a(ptr->type, &RNA_LightProbe) && (type == -1 || type == OB_LIGHTPROBE)) return 1;
/* try to get an object in the path, no pinning supported here */
@@ -679,7 +679,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
const char *buttons_context_dir[] = {
"texture_slot", "scene", "world", "object", "mesh", "armature", "lattice", "curve",
- "meta_ball", "lamp", "speaker", "lightprobe", "camera", "material", "material_slot",
+ "meta_ball", "light", "speaker", "lightprobe", "camera", "material", "material_slot",
"texture", "texture_user", "texture_user_property", "bone", "edit_bone",
"pose_bone", "particle_system", "particle_system_editable", "particle_settings",
"cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint",
@@ -736,8 +736,8 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
set_pointer_type(path, result, &RNA_MetaBall);
return 1;
}
- else if (CTX_data_equals(member, "lamp")) {
- set_pointer_type(path, result, &RNA_Lamp);
+ else if (CTX_data_equals(member, "light")) {
+ set_pointer_type(path, result, &RNA_Light);
return 1;
}
else if (CTX_data_equals(member, "camera")) {
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 09e2660a762..968757bc637 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -2357,7 +2357,7 @@ static void filelist_readjob_main_rec(Main *bmain, FileList *filelist)
filelist->filelist.entries[9].entry->relpath = BLI_strdup("Ika");
filelist->filelist.entries[10].entry->relpath = BLI_strdup("Wave");
filelist->filelist.entries[11].entry->relpath = BLI_strdup("Lattice");
- filelist->filelist.entries[12].entry->relpath = BLI_strdup("Lamp");
+ filelist->filelist.entries[12].entry->relpath = BLI_strdup("Light");
filelist->filelist.entries[13].entry->relpath = BLI_strdup("Camera");
filelist->filelist.entries[14].entry->relpath = BLI_strdup("Ipo");
filelist->filelist.entries[15].entry->relpath = BLI_strdup("World");
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index d7015ed5e53..118a14c887d 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1215,7 +1215,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
ntype->draw_buttons = node_shader_buts_uvalongstroke;
break;
case SH_NODE_OUTPUT_MATERIAL:
- case SH_NODE_OUTPUT_LAMP:
+ case SH_NODE_OUTPUT_LIGHT:
case SH_NODE_OUTPUT_WORLD:
ntype->draw_buttons = node_buts_output_shader;
break;
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index cc32e5ef499..1a6710035c2 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -424,7 +424,7 @@ void ED_node_shader_default(const bContext *C, ID *id)
Lamp *la = (Lamp *)id;
la->nodetree = ntree;
- output_type = SH_NODE_OUTPUT_LAMP;
+ output_type = SH_NODE_OUTPUT_LIGHT;
shader_type = SH_NODE_EMISSION;
copy_v3_v3(color, &la->r);
@@ -628,7 +628,7 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
nodeClearActiveID(ntree, ID_TE);
if (ELEM(node->type, SH_NODE_OUTPUT_MATERIAL,
- SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP, SH_NODE_OUTPUT_LINESTYLE))
+ SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LIGHT, SH_NODE_OUTPUT_LINESTYLE))
{
bNode *tnode;
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index ed4853f5ede..c829b808348 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1141,7 +1141,7 @@ static void tselem_draw_icon(
ICON_DRAW(ICON_RENDER_RESULT);
break;
case TSE_LINKED_LAMP:
- ICON_DRAW(ICON_LAMP_DATA);
+ ICON_DRAW(ICON_LIGHT_DATA);
break;
case TSE_LINKED_MAT:
ICON_DRAW(ICON_MATERIAL_DATA);
@@ -1200,7 +1200,7 @@ static void tselem_draw_icon(
Object *ob = (Object *)tselem->id;
switch (ob->type) {
case OB_LAMP:
- ICON_CLICK_DRAW(ICON_OUTLINER_OB_LAMP); break;
+ ICON_CLICK_DRAW(ICON_OUTLINER_OB_LIGHT); break;
case OB_MESH:
ICON_CLICK_DRAW(ICON_OUTLINER_OB_MESH); break;
case OB_CAMERA:
@@ -1251,17 +1251,17 @@ static void tselem_draw_icon(
Lamp *la = (Lamp *)tselem->id;
switch (la->type) {
case LA_LOCAL:
- tselem_draw_icon_uibut(&arg, ICON_LAMP_POINT); break;
+ tselem_draw_icon_uibut(&arg, ICON_LIGHT_POINT); break;
case LA_SUN:
- tselem_draw_icon_uibut(&arg, ICON_LAMP_SUN); break;
+ tselem_draw_icon_uibut(&arg, ICON_LIGHT_SUN); break;
case LA_SPOT:
- tselem_draw_icon_uibut(&arg, ICON_LAMP_SPOT); break;
+ tselem_draw_icon_uibut(&arg, ICON_LIGHT_SPOT); break;
case LA_HEMI:
- tselem_draw_icon_uibut(&arg, ICON_LAMP_HEMI); break;
+ tselem_draw_icon_uibut(&arg, ICON_LIGHT_HEMI); break;
case LA_AREA:
- tselem_draw_icon_uibut(&arg, ICON_LAMP_AREA); break;
+ tselem_draw_icon_uibut(&arg, ICON_LIGHT_AREA); break;
default:
- tselem_draw_icon_uibut(&arg, ICON_OUTLINER_DATA_LAMP); break;
+ tselem_draw_icon_uibut(&arg, ICON_OUTLINER_DATA_LIGHT); break;
}
break;
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 15d241a88cc..83189159086 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1050,11 +1050,11 @@ static void view3d_main_region_message_subscribe(
&RNA_Window,
/* These object have properties that impact drawing. */
- &RNA_AreaLamp,
+ &RNA_AreaLight,
&RNA_Camera,
- &RNA_Lamp,
+ &RNA_Light,
&RNA_Speaker,
- &RNA_SunLamp,
+ &RNA_SunLight,
/* General types the 3D view depends on. */
&RNA_Object,
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_empty.c b/source/blender/editors/space_view3d/view3d_manipulator_empty.c
index 75e4a9e3314..fc15ec593f5 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_empty.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_empty.c
@@ -186,7 +186,7 @@ static void WIDGETGROUP_empty_image_refresh(const bContext *C, wmManipulatorGrou
void VIEW3D_WGT_empty_image(wmManipulatorGroupType *wgt)
{
- wgt->name = "Area Lamp Widgets";
+ wgt->name = "Area Light Widgets";
wgt->idname = "VIEW3D_WGT_empty_image";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
index f98a2f336bc..0e1015a66f1 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
@@ -99,13 +99,13 @@ static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmManipulatorGroup
/* need to set property here for undo. TODO would prefer to do this in _init */
PointerRNA lamp_ptr;
const char *propname = "spot_size";
- RNA_pointer_create(&la->id, &RNA_Lamp, la, &lamp_ptr);
+ RNA_pointer_create(&la->id, &RNA_Light, la, &lamp_ptr);
WM_manipulator_target_property_def_rna(mpr, "offset", &lamp_ptr, propname, -1);
}
void VIEW3D_WGT_lamp_spot(wmManipulatorGroupType *wgt)
{
- wgt->name = "Spot Lamp Widgets";
+ wgt->name = "Spot Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_spot";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
@@ -213,7 +213,7 @@ static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmManipulatorGroup
void VIEW3D_WGT_lamp_area(wmManipulatorGroupType *wgt)
{
- wgt->name = "Area Lamp Widgets";
+ wgt->name = "Area Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_area";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
@@ -291,7 +291,7 @@ static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmManipulato
void VIEW3D_WGT_lamp_target(wmManipulatorGroupType *wgt)
{
- wgt->name = "Target Lamp Widgets";
+ wgt->name = "Target Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_target";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 06bbde0497c..fe8868235c4 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -69,7 +69,7 @@ extern StructRNA RNA_AnimVizMotionPaths;
extern StructRNA RNA_AnimVizOnionSkinning;
extern StructRNA RNA_AnyType;
extern StructRNA RNA_Area;
-extern StructRNA RNA_AreaLamp;
+extern StructRNA RNA_AreaLight;
extern StructRNA RNA_Armature;
extern StructRNA RNA_ArmatureModifier;
extern StructRNA RNA_ArmatureSensor;
@@ -281,7 +281,7 @@ extern StructRNA RNA_GaussianBlurSequence;
extern StructRNA RNA_GlowSequence;
extern StructRNA RNA_GreasePencil;
extern StructRNA RNA_Header;
-extern StructRNA RNA_HemiLamp;
+extern StructRNA RNA_HemiLight;
extern StructRNA RNA_Histogram;
extern StructRNA RNA_HookModifier;
extern StructRNA RNA_ID;
@@ -312,9 +312,9 @@ extern StructRNA RNA_KeyingSetInfo;
extern StructRNA RNA_KeyingSetPath;
extern StructRNA RNA_KeyingSetsAll;
extern StructRNA RNA_KinematicConstraint;
-extern StructRNA RNA_Lamp;
-extern StructRNA RNA_LampSkySettings;
-extern StructRNA RNA_LampTextureSlot;
+extern StructRNA RNA_Light;
+extern StructRNA RNA_LightSkySettings;
+extern StructRNA RNA_LightTextureSlot;
extern StructRNA RNA_LaplacianDeformModifier;
extern StructRNA RNA_LaplacianSmoothModifier;
extern StructRNA RNA_Lattice;
@@ -476,7 +476,7 @@ extern StructRNA RNA_ParticleSystemModifier;
extern StructRNA RNA_ParticleTarget;
extern StructRNA RNA_PivotConstraint;
extern StructRNA RNA_PointCache;
-extern StructRNA RNA_PointLamp;
+extern StructRNA RNA_PointLight;
extern StructRNA RNA_PointerProperty;
extern StructRNA RNA_Pose;
extern StructRNA RNA_PoseBone;
@@ -529,7 +529,7 @@ extern StructRNA RNA_ShaderNodeGeometry;
extern StructRNA RNA_ShaderNodeHueSaturation;
extern StructRNA RNA_ShaderNodeIESLight;
extern StructRNA RNA_ShaderNodeInvert;
-extern StructRNA RNA_ShaderNodeLampData;
+extern StructRNA RNA_ShaderNodeLightData;
extern StructRNA RNA_ShaderNodeMapping;
extern StructRNA RNA_ShaderNodeMaterial;
extern StructRNA RNA_ShaderNodeMath;
@@ -588,7 +588,7 @@ extern StructRNA RNA_Speaker;
extern StructRNA RNA_SpeedControlSequence;
extern StructRNA RNA_Spline;
extern StructRNA RNA_SplineIKConstraint;
-extern StructRNA RNA_SpotLamp;
+extern StructRNA RNA_SpotLight;
extern StructRNA RNA_Stereo3dDisplay;
extern StructRNA RNA_StretchToConstraint;
extern StructRNA RNA_StringProperty;
@@ -596,7 +596,7 @@ extern StructRNA RNA_Struct;
extern StructRNA RNA_StucciTexture;
extern StructRNA RNA_StudioLight;
extern StructRNA RNA_SubsurfModifier;
-extern StructRNA RNA_SunLamp;
+extern StructRNA RNA_SunLight;
extern StructRNA RNA_SurfaceCurve;
extern StructRNA RNA_SurfaceDeformModifier;
extern StructRNA RNA_SurfaceModifier;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index ce1edba75fd..bafb2bf5753 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -129,7 +129,7 @@ extern const EnumPropertyItem rna_enum_symmetrize_direction_items[];
extern const EnumPropertyItem rna_enum_texture_type_items[];
-extern const EnumPropertyItem rna_enum_lamp_type_items[];
+extern const EnumPropertyItem rna_enum_light_type_items[];
extern const EnumPropertyItem rna_enum_unpack_method_items[];
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 1dd4535610c..4b06d917ab7 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3407,7 +3407,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_group.c", NULL, RNA_def_collections},
{"rna_image.c", "rna_image_api.c", RNA_def_image},
{"rna_key.c", NULL, RNA_def_key},
- {"rna_lamp.c", NULL, RNA_def_lamp},
+ {"rna_lamp.c", NULL, RNA_def_light},
{"rna_lattice.c", "rna_lattice_api.c", RNA_def_lattice},
{"rna_layer.c", NULL, RNA_def_view_layer},
{"rna_linestyle.c", NULL, RNA_def_linestyle},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index a2648d7db02..0a294bfaab9 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -61,7 +61,7 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
{ID_GR, "COLLECTION", ICON_GROUP, "Collection", ""},
{ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""},
{ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
- {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""},
+ {ID_LA, "LIGHT", ICON_LIGHT_DATA, "Light", ""},
{ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""},
{ID_LS, "LINESTYLE", ICON_LINE_DATA, "Line Style", ""},
{ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
@@ -183,7 +183,7 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_Collection) return ID_GR;
if (base_type == &RNA_Image) return ID_IM;
if (base_type == &RNA_Key) return ID_KE;
- if (base_type == &RNA_Lamp) return ID_LA;
+ if (base_type == &RNA_Light) return ID_LA;
if (base_type == &RNA_Library) return ID_LI;
if (base_type == &RNA_FreestyleLineStyle) return ID_LS;
if (base_type == &RNA_Lattice) return ID_LT;
@@ -227,7 +227,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_GR: return &RNA_Collection;
case ID_IM: return &RNA_Image;
case ID_KE: return &RNA_Key;
- case ID_LA: return &RNA_Lamp;
+ case ID_LA: return &RNA_Light;
case ID_LI: return &RNA_Library;
case ID_LS: return &RNA_FreestyleLineStyle;
case ID_LT: return &RNA_Lattice;
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 638589c104a..7228f4a4683 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -620,7 +620,7 @@ StructRNA *RNA_struct_base(StructRNA *type)
/**
* Use to find the subtype directly below a base-type.
*
- * So if type were `RNA_SpotLamp`, `RNA_struct_base_of(type, &RNA_ID)` would return `&RNA_Lamp`.
+ * So if type were `RNA_SpotLIght`, `RNA_struct_base_of(type, &RNA_ID)` would return `&RNA_Light`.
*/
const StructRNA *RNA_struct_base_child_of(const StructRNA *type, const StructRNA *parent_type)
{
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 97c9d5a9866..12e28d457fb 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -423,10 +423,10 @@ static void rna_def_dopesheet(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_MATERIAL_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
- prop = RNA_def_property(srna, "show_lamps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_lights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAM);
- RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of lamp related animation data");
- RNA_def_property_ui_icon(prop, ICON_LAMP_DATA, 0);
+ RNA_def_property_ui_text(prop, "Display Light", "Include visualization of light related animation data");
+ RNA_def_property_ui_icon(prop, ICON_LIGHT_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
prop = RNA_def_property(srna, "show_linestyles", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 8b59d46aaf8..a57777f0630 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -155,7 +155,7 @@ void RNA_def_fcurve(struct BlenderRNA *brna);
void RNA_def_gpencil(struct BlenderRNA *brna);
void RNA_def_image(struct BlenderRNA *brna);
void RNA_def_key(struct BlenderRNA *brna);
-void RNA_def_lamp(struct BlenderRNA *brna);
+void RNA_def_light(struct BlenderRNA *brna);
void RNA_def_lattice(struct BlenderRNA *brna);
void RNA_def_linestyle(struct BlenderRNA *brna);
void RNA_def_main(struct BlenderRNA *brna);
@@ -283,7 +283,7 @@ void rna_TextureSlot_update(struct bContext *C, struct PointerRNA *ptr);
bool rna_Armature_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
bool rna_Camera_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
bool rna_Curve_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-bool rna_Lamp_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Light_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
bool rna_Lattice_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
bool rna_Mesh_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
@@ -354,7 +354,7 @@ void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop);
-void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop);
+void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop);
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index dff27e1c625..1fb76a93e27 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/makesrna/intern/rna_lamp.c
+/** \file blender/makesrna/intern/rna_light.c
* \ingroup RNA
*/
@@ -54,7 +54,7 @@
#include "WM_api.h"
#include "WM_types.h"
-static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
+static void rna_Light_buffer_size_set(PointerRNA *ptr, int value)
{
Lamp *la = (Lamp *)ptr->data;
@@ -63,27 +63,27 @@ static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
la->bufsize &= (~15); /* round to multiple of 16 */
}
-static StructRNA *rna_Lamp_refine(struct PointerRNA *ptr)
+static StructRNA *rna_Light_refine(struct PointerRNA *ptr)
{
Lamp *la = (Lamp *)ptr->data;
switch (la->type) {
case LA_LOCAL:
- return &RNA_PointLamp;
+ return &RNA_PointLight;
case LA_SUN:
- return &RNA_SunLamp;
+ return &RNA_SunLight;
case LA_SPOT:
- return &RNA_SpotLamp;
+ return &RNA_SpotLight;
case LA_HEMI:
- return &RNA_HemiLamp;
+ return &RNA_HemiLight;
case LA_AREA:
- return &RNA_AreaLamp;
+ return &RNA_AreaLight;
default:
- return &RNA_Lamp;
+ return &RNA_Light;
}
}
-static void rna_Lamp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Light_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Lamp *la = ptr->id.data;
@@ -91,7 +91,7 @@ static void rna_Lamp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
WM_main_add_notifier(NC_LAMP | ND_LIGHTING, la);
}
-static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Light_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Lamp *la = ptr->id.data;
@@ -99,19 +99,19 @@ static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin
WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, la);
}
-static void rna_Lamp_use_nodes_update(bContext *C, PointerRNA *ptr)
+static void rna_Light_use_nodes_update(bContext *C, PointerRNA *ptr)
{
Lamp *la = (Lamp *)ptr->data;
if (la->use_nodes && la->nodetree == NULL)
ED_node_shader_default(C, &la->id);
- rna_Lamp_update(CTX_data_main(C), CTX_data_scene(C), ptr);
+ rna_Light_update(CTX_data_main(C), CTX_data_scene(C), ptr);
}
#else
-/* Don't define icons here, so they don't show up in the Lamp UI (properties Editor) - DingTo */
-const EnumPropertyItem rna_enum_lamp_type_items[] = {
+/* Don't define icons here, so they don't show up in the Light UI (properties Editor) - DingTo */
+const EnumPropertyItem rna_enum_light_type_items[] = {
{LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source"},
{LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source"},
{LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source"},
@@ -120,21 +120,22 @@ const EnumPropertyItem rna_enum_lamp_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static void rna_def_lamp(BlenderRNA *brna)
+static void rna_def_light(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "Lamp", "ID");
- RNA_def_struct_refine_func(srna, "rna_Lamp_refine");
- RNA_def_struct_ui_text(srna, "Lamp", "Lamp data-block for lighting a scene");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_DATA);
+ srna = RNA_def_struct(brna, "Light", "ID");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_refine_func(srna, "rna_Light_refine");
+ RNA_def_struct_ui_text(srna, "Light", "Light data-block for lighting a scene");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_DATA);
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_lamp_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of Lamp");
+ RNA_def_property_enum_items(prop, rna_enum_light_type_items);
+ RNA_def_property_ui_text(prop, "Type", "Type of Light");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_LAMP);
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
@@ -142,43 +143,43 @@ static void rna_def_lamp(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Distance",
"Falloff distance - the light is at half the original intensity at this point");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 10, 1, 3);
- RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_ui_text(prop, "Energy", "Amount of light emitted");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Light color");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spec_fac");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
RNA_def_property_ui_text(prop, "Specular Factor", "Specular reflection multiplier");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
/* nodes */
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
- RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based lamps");
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based lights");
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the lamp");
- RNA_def_property_update(prop, 0, "rna_Lamp_use_nodes_update");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the light");
+ RNA_def_property_update(prop, 0, "rna_Light_use_nodes_update");
/* common */
rna_def_animdata_common(srna);
}
-static void rna_def_lamp_falloff(StructRNA *srna)
+static void rna_def_light_falloff(StructRNA *srna)
{
PropertyRNA *prop;
@@ -195,54 +196,54 @@ static void rna_def_lamp_falloff(StructRNA *srna)
prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fallofftype_items);
RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
- RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_text(prop, "Falloff Curve", "Custom light falloff curve");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attenuation");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attenuation");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "constant_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coeff_const");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Constant Coefficient",
"Constant distance attenuation coefficient");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "linear_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coeff_lin");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Linear Coefficient",
"Linear distance attenuation coefficient");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "quadratic_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coeff_quad");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Quadratic Coefficient",
"Quadratic distance attenuation coefficient");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
}
-static void rna_def_lamp_shadow(StructRNA *srna, int sun)
+static void rna_def_light_shadow(StructRNA *srna, int sun)
{
PropertyRNA *prop;
prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHADOW);
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bufsize");
@@ -250,66 +251,66 @@ static void rna_def_lamp_shadow(StructRNA *srna, int sun)
RNA_def_property_ui_text(prop, "Shadow Buffer Size",
"Resolution of the shadow buffer, higher values give crisper shadows "
"but use more memory");
- RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_int_funcs(prop, NULL, "rna_Light_buffer_size_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start",
"Shadow map clip start, below which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip End",
"Shadow map clip end, beyond which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bias");
RNA_def_property_range(prop, 0.001f, 9999.0f);
RNA_def_property_ui_range(prop, 0.001f, 5.0f, 1.0, 3);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Bias for reducing self shadowing");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_buffer_bleed_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bleedbias");
RNA_def_property_range(prop, 0.f, 1.f);
RNA_def_property_ui_text(prop, "Shadow Buffer Bleed Bias", "Bias for reducing light-bleed on variance shadow maps");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_buffer_exp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bleedexp");
RNA_def_property_range(prop, 1.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Exponent", "Bias for reducing light-bleed on exponential shadow maps");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "soft");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the light");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
/* Eevee */
prop = RNA_def_property(srna, "use_contact_shadow", PROP_BOOLEAN, PROP_NONE);
@@ -317,76 +318,76 @@ static void rna_def_lamp_shadow(StructRNA *srna, int sun)
RNA_def_property_ui_text(prop, "Contact Shadow", "Use screen space raytracing to have correct shadowing "
"near occluder, or for small features that does not appear "
"in shadow maps");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "contact_shadow_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "contact_dist");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Contact Shadow Distance", "World space distance in which to search for "
"screen space occluder");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "contact_shadow_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "contact_bias");
RNA_def_property_range(prop, 0.001f, 9999.0f);
RNA_def_property_ui_range(prop, 0.001f, 5.0f, 1.0, 3);
RNA_def_property_ui_text(prop, "Contact Shadow Bias", "Bias to avoid self shadowing");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "contact_shadow_soft_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "contact_spread");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Contact Shadow Soft", "Control how soft the contact shadows will be");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "contact_shadow_thickness", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "contact_thickness");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Contact Shadow Thickness", "Pixel thickness used to detect occlusion");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
if (sun) {
prop = RNA_def_property(srna, "shadow_cascade_max_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "cascade_max_dist");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Cascade Max Distance", "End distance of the cascaded shadow map (only in perspective view)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_cascade_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cascade_count");
RNA_def_property_range(prop, 1, 4);
RNA_def_property_ui_text(prop, "Cascade Count", "Number of texture used by the cascaded shadow map");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_cascade_exponent", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "cascade_exponent");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Exponential Distribution", "Higher value increase resolution towards the viewpoint");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
prop = RNA_def_property(srna, "shadow_cascade_fade", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "cascade_fade");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Cascade Fade", "How smooth is the transition between each cascade");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_update(prop, 0, "rna_Light_update");
}
}
-static void rna_def_point_lamp(BlenderRNA *brna)
+static void rna_def_point_light(BlenderRNA *brna)
{
StructRNA *srna;
- srna = RNA_def_struct(brna, "PointLamp", "Lamp");
+ srna = RNA_def_struct(brna, "PointLight", "Light");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Point Lamp", "Omnidirectional point lamp");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_POINT);
+ RNA_def_struct_ui_text(srna, "Point Light", "Omnidirectional point Light");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_POINT);
- rna_def_lamp_falloff(srna);
- rna_def_lamp_shadow(srna, 0);
+ rna_def_light_falloff(srna);
+ rna_def_light_shadow(srna, 0);
}
-static void rna_def_area_lamp(BlenderRNA *brna)
+static void rna_def_area_light(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -399,103 +400,103 @@ static void rna_def_area_lamp(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna = RNA_def_struct(brna, "AreaLamp", "Lamp");
+ srna = RNA_def_struct(brna, "AreaLight", "Light");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA);
+ RNA_def_struct_ui_text(srna, "Area Light", "Directional area Light");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_AREA);
- rna_def_lamp_shadow(srna, 0);
- rna_def_lamp_falloff(srna);
+ rna_def_light_shadow(srna, 0);
+ rna_def_light_falloff(srna);
prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "area_shape");
RNA_def_property_enum_items(prop, prop_areashape_items);
- RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_ui_text(prop, "Shape", "Shape of the area Light");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
- RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_ui_text(prop, "Size", "Size of the area of the area light, X direction size for rectangle shapes");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size Y",
- "Size of the area of the area Lamp in the Y direction for Rectangle shapes");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ "Size of the area of the area light in the Y direction for rectangle shapes");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
}
-static void rna_def_spot_lamp(BlenderRNA *brna)
+static void rna_def_spot_light(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "SpotLamp", "Lamp");
+ srna = RNA_def_struct(brna, "SpotLight", "Light");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_SPOT);
+ RNA_def_struct_ui_text(srna, "Spot Light", "Directional cone Light");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_SPOT);
- rna_def_lamp_falloff(srna);
- rna_def_lamp_shadow(srna, 0);
+ rna_def_light_falloff(srna);
+ rna_def_light_shadow(srna, 0);
prop = RNA_def_property(srna, "use_square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
RNA_def_property_ui_text(prop, "Square", "Cast a square spot light shape");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "spotsize");
RNA_def_property_range(prop, DEG2RADF(1.0f), DEG2RADF(180.0f));
RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "show_cone", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_CONE);
RNA_def_property_ui_text(prop, "Show Cone",
"Draw transparent cone in 3D view to visualize which objects are contained in it");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ RNA_def_property_update(prop, 0, "rna_Light_draw_update");
}
-static void rna_def_sun_lamp(BlenderRNA *brna)
+static void rna_def_sun_light(BlenderRNA *brna)
{
StructRNA *srna;
- srna = RNA_def_struct(brna, "SunLamp", "Lamp");
+ srna = RNA_def_struct(brna, "SunLight", "Light");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
+ RNA_def_struct_ui_text(srna, "Sun Light", "Constant direction parallel ray Light");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_SUN);
- rna_def_lamp_shadow(srna, 1);
+ rna_def_light_shadow(srna, 1);
}
-static void rna_def_hemi_lamp(BlenderRNA *brna)
+static void rna_def_hemi_light(BlenderRNA *brna)
{
StructRNA *srna;
- srna = RNA_def_struct(brna, "HemiLamp", "Lamp");
+ srna = RNA_def_struct(brna, "HemiLight", "Light");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp");
- RNA_def_struct_ui_icon(srna, ICON_LAMP_HEMI);
+ RNA_def_struct_ui_text(srna, "Hemi Light", "180 degree constant Light");
+ RNA_def_struct_ui_icon(srna, ICON_LIGHT_HEMI);
}
-void RNA_def_lamp(BlenderRNA *brna)
+void RNA_def_light(BlenderRNA *brna)
{
- rna_def_lamp(brna);
- rna_def_point_lamp(brna);
- rna_def_area_lamp(brna);
- rna_def_spot_lamp(brna);
- rna_def_sun_lamp(brna);
- rna_def_hemi_lamp(brna);
+ rna_def_light(brna);
+ rna_def_point_light(brna);
+ rna_def_area_light(brna);
+ rna_def_spot_light(brna);
+ rna_def_sun_light(brna);
+ rna_def_hemi_light(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index f3921545ac5..5e05d37dc8c 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -107,7 +107,7 @@ static void rna_Main_object_begin(CollectionPropertyIterator *iter, PointerRNA *
rna_iterator_listbase_begin(iter, &bmain->object, NULL);
}
-static void rna_Main_lamp_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_Main_light_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain = (Main *)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->lamp, NULL);
@@ -353,7 +353,7 @@ void RNA_def_main(BlenderRNA *brna)
{"materials", "Material", "rna_Main_mat_begin", "Materials", "Material data-blocks", RNA_def_main_materials},
{"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group data-blocks", RNA_def_main_node_groups},
{"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh data-blocks", RNA_def_main_meshes},
- {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp data-blocks", RNA_def_main_lamps},
+ {"lights", "Light", "rna_Main_light_begin", "Lights", "Light data-blocks", RNA_def_main_lights},
{"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library data-blocks", RNA_def_main_libraries},
{"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen data-blocks", RNA_def_main_screens},
{"window_managers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager data-blocks", RNA_def_main_window_managers},
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 5fca91064b6..febe74f63c9 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -319,7 +319,7 @@ Mesh *rna_Main_meshes_new_from_object(
return BKE_mesh_new_from_object(depsgraph, bmain, sce, ob, apply_modifiers, calc_tessface, calc_undeformed);
}
-static Lamp *rna_Main_lamps_new(Main *bmain, const char *name, int type)
+static Lamp *rna_Main_lights_new(Main *bmain, const char *name, int type)
{
char safe_name[MAX_ID_NAME - 2];
rna_idname_validate(name, safe_name);
@@ -603,7 +603,7 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(objects, object, ID_OB)
RNA_MAIN_ID_TAG_FUNCS_DEF(materials, mat, ID_MA)
RNA_MAIN_ID_TAG_FUNCS_DEF(node_groups, nodetree, ID_NT)
RNA_MAIN_ID_TAG_FUNCS_DEF(meshes, mesh, ID_ME)
-RNA_MAIN_ID_TAG_FUNCS_DEF(lamps, lamp, ID_LA)
+RNA_MAIN_ID_TAG_FUNCS_DEF(lights, lamp, ID_LA)
RNA_MAIN_ID_TAG_FUNCS_DEF(libraries, library, ID_LI)
RNA_MAIN_ID_TAG_FUNCS_DEF(screens, screen, ID_SCR)
RNA_MAIN_ID_TAG_FUNCS_DEF(window_managers, wm, ID_WM)
@@ -894,42 +894,43 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
-void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
+
+void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
FunctionRNA *func;
PropertyRNA *parm;
- RNA_def_property_srna(cprop, "BlendDataLamps");
- srna = RNA_def_struct(brna, "BlendDataLamps", NULL);
+ RNA_def_property_srna(cprop, "BlendDataLights");
+ srna = RNA_def_struct(brna, "BlendDataLights", NULL);
RNA_def_struct_sdna(srna, "Main");
- RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps");
+ RNA_def_struct_ui_text(srna, "Main Lights", "Collection of lights");
- func = RNA_def_function(srna, "new", "rna_Main_lamps_new");
- RNA_def_function_ui_description(func, "Add a new lamp to the main database");
- parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the data-block");
+ func = RNA_def_function(srna, "new", "rna_Main_lights_new");
+ RNA_def_function_ui_description(func, "Add a new light to the main database");
+ parm = RNA_def_string(func, "name", "Light", 0, "", "New name for the data-block");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_enum(func, "type", rna_enum_lamp_type_items, 0, "Type", "The type of texture to add");
+ parm = RNA_def_enum(func, "type", rna_enum_light_type_items, 0, "Type", "The type of texture to add");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
- parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp data-block");
+ parm = RNA_def_pointer(func, "light", "Light", "", "New light data-block");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_Main_ID_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile");
- parm = RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove");
+ RNA_def_function_ui_description(func, "Remove a light from the current blendfile");
+ parm = RNA_def_pointer(func, "light", "Light", "", "Light to remove");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
RNA_def_boolean(func, "do_unlink", true, "",
- "Unlink all usages of this lamp before deleting it "
- "(WARNING: will also delete objects instancing that lamp data)");
+ "Unlink all usages of this Light before deleting it "
+ "(WARNING: will also delete objects instancing that light data)");
RNA_def_boolean(func, "do_id_user", true, "",
- "Decrement user counter of all datablocks used by this lamp data");
+ "Decrement user counter of all datablocks used by this light data");
RNA_def_boolean(func, "do_ui_user", true, "",
- "Make sure interface does not reference this lamp data");
+ "Make sure interface does not reference this light data");
- func = RNA_def_function(srna, "tag", "rna_Main_lamps_tag");
+ func = RNA_def_function(srna, "tag", "rna_Main_lights_tag");
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 46022511f8e..50246c3f9ac 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1309,7 +1309,7 @@ static void rna_def_modifier_warp(BlenderRNA *brna)
prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
- RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
+ RNA_def_property_ui_text(prop, "Falloff Curve", "Custom falloff curve");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
@@ -1900,7 +1900,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
- RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
+ RNA_def_property_ui_text(prop, "Falloff Curve", "Custom falloff curve");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "center", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 04f4c41659d..2bdfbade53a 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -146,7 +146,7 @@ const EnumPropertyItem rna_enum_object_type_items[] = {
{OB_EMPTY, "EMPTY", 0, "Empty", ""},
{0, "", 0, NULL, NULL},
{OB_CAMERA, "CAMERA", 0, "Camera", ""},
- {OB_LAMP, "LAMP", 0, "Lamp", ""},
+ {OB_LAMP, "LIGHT", 0, "Light", ""},
{OB_SPEAKER, "SPEAKER", 0, "Speaker", ""},
{OB_LIGHTPROBE, "LIGHT_PROBE", 0, "Probe", ""},
{0, NULL, 0, NULL, NULL}
@@ -375,7 +375,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
case OB_SURF: return &RNA_Curve;
case OB_FONT: return &RNA_Curve;
case OB_MBALL: return &RNA_MetaBall;
- case OB_LAMP: return &RNA_Lamp;
+ case OB_LAMP: return &RNA_Light;
case OB_CAMERA: return &RNA_Camera;
case OB_LATTICE: return &RNA_Lattice;
case OB_ARMATURE: return &RNA_Armature;
@@ -1446,7 +1446,7 @@ bool rna_Camera_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
return ((Object *)value.id.data)->type == OB_CAMERA;
}
-bool rna_Lamp_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Light_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_LAMP;
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index b902fa73334..1a2b3854668 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -517,7 +517,7 @@ void RNA_api_object(StructRNA *srna)
/* Camera-related operations */
func = RNA_def_function(srna, "calc_matrix_camera", "rna_Object_calc_matrix_camera");
RNA_def_function_ui_description(func, "Generate the camera projection matrix of this object "
- "(mostly useful for Camera and Lamp types)");
+ "(mostly useful for Camera and Light types)");
parm = RNA_def_pointer(func, "depsgraph", "Depsgraph", "",
"Depsgraph to get evaluated data from");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 72245e8feb9..5b7377eed17 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5952,7 +5952,7 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_volumetric_lights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_VOLUMETRIC_LIGHTS);
RNA_def_property_boolean_default(prop, 1);
- RNA_def_property_ui_text(prop, "Volumetric Lighting", "Enable scene lamps interactions with volumetrics");
+ RNA_def_property_ui_text(prop, "Volumetric Lighting", "Enable scene light interactions with volumetrics");
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
prop = RNA_def_property(srna, "volumetric_light_clamp", PROP_FLOAT, PROP_NONE);
@@ -6116,13 +6116,13 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_default(prop, 512);
RNA_def_property_enum_items(prop, eevee_shadow_size_items);
- RNA_def_property_ui_text(prop, "Cube Shadows Resolution", "Size of point and area lamps shadow maps");
+ RNA_def_property_ui_text(prop, "Cube Shadows Resolution", "Size of point and area light shadow maps");
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
prop = RNA_def_property(srna, "shadow_cascade_size", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_default(prop, 1024);
RNA_def_property_enum_items(prop, eevee_shadow_size_items);
- RNA_def_property_ui_text(prop, "Directional Shadows Resolution", "Size of sun lamps shadow maps");
+ RNA_def_property_ui_text(prop, "Directional Shadows Resolution", "Size of sun light shadow maps");
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
prop = RNA_def_property(srna, "use_shadow_high_bitdepth", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 13978f3f5ee..4d85d845081 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1320,7 +1320,7 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(
static void rna_SpaceProperties_context_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
SpaceButs *sbuts = (SpaceButs *)(ptr->data);
- /* XXX BCONTEXT_DATA is ugly, but required for lamps... See T51318. */
+ /* XXX BCONTEXT_DATA is ugly, but required for lights... See T51318. */
if (ELEM(sbuts->mainb, BCONTEXT_WORLD, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE, BCONTEXT_DATA)) {
sbuts->preview = 1;
}
@@ -2339,9 +2339,9 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Empties", "Show empty objects");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
- prop = RNA_def_property(srna, "use_filter_object_lamp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_object_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_LAMP);
- RNA_def_property_ui_text(prop, "Show Lamps", "Show lamps objects");
+ RNA_def_property_ui_text(prop, "Show Lights", "Show light objects");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
prop = RNA_def_property(srna, "use_filter_object_camera", PROP_BOOLEAN, PROP_NONE);
@@ -2482,7 +2482,7 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_scene_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_SCENE_LIGHT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Scene Light", "Render lamps and light probes of the scene");
+ RNA_def_property_ui_text(prop, "Scene Light", "Render lights and light probes of the scene");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_specular_highlight", PROP_BOOLEAN, PROP_NONE);
@@ -4085,7 +4085,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{FILTER_ID_GD, "GREASE_PENCIL", ICON_GREASEPENCIL, "Grease Pencil", "Show/hide Grease pencil data-blocks"},
{FILTER_ID_GR, "GROUP", ICON_GROUP, "Groups", "Show/hide Group data-blocks"},
{FILTER_ID_IM, "IMAGE", ICON_IMAGE_DATA, "Images", "Show/hide Image data-blocks"},
- {FILTER_ID_LA, "LAMP", ICON_LAMP_DATA, "Lamps", "Show/hide Lamp data-blocks"},
+ {FILTER_ID_LA, "LIGHT", ICON_LIGHT_DATA, "Lights", "Show/hide Light data-blocks"},
{FILTER_ID_LS, "LINESTYLE", ICON_LINE_DATA,
"Freestyle Linestyles", "Show/hide Freestyle's Line Style data-blocks"},
{FILTER_ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattices", "Show/hide Lattice data-blocks"},
@@ -4127,7 +4127,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{FILTER_ID_IM | FILTER_ID_MC | FILTER_ID_MSK | FILTER_ID_SO,
"IMAGE", ICON_IMAGE_DATA, "Images & Sounds", "Show/hide images, movie clips, sounds and masks"},
{FILTER_ID_CA | FILTER_ID_LA | FILTER_ID_SPK | FILTER_ID_WO | FILTER_ID_WS,
- "ENVIRONMENT", ICON_WORLD_DATA, "Environment", "Show/hide worlds, lamps, cameras and speakers"},
+ "ENVIRONMENT", ICON_WORLD_DATA, "Environment", "Show/hide worlds, lights, cameras and speakers"},
{FILTER_ID_BR | FILTER_ID_GD | FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_CF,
"MISC", ICON_GREASEPENCIL, "Miscellaneous", "Show/hide other data types"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 0026344e460..07fd20c6fc5 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -1435,7 +1435,7 @@ static void rna_def_texture(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Texture", "ID");
RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Texture", "Texture data-block used by materials, lamps, worlds and brushes");
+ RNA_def_struct_ui_text(srna, "Texture", "Texture data-block used by materials, lights, worlds and brushes");
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
RNA_def_struct_refine_func(srna, "rna_Texture_refine");
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index be8bce61910..74117b43d91 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -844,7 +844,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "template_preview", "uiTemplatePreview");
- RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps or worlds");
+ RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lights or worlds");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm = RNA_def_pointer(func, "id", "ID", "", "ID data-block");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -856,7 +856,7 @@ void RNA_api_ui_layout(StructRNA *srna)
"(i.e. all previews of materials without explicit ID will have the same size...)");
func = RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
- RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps");
+ RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lights");
api_ui_item_rna_common(func);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display");
RNA_def_boolean(func, "levels", false, "", "Show black/white levels");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 9cde04c560e..9ac93efe347 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1805,9 +1805,10 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Empty", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop = RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "light", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "lamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Lamp", "");
+ RNA_def_property_ui_text(prop, "Light", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -3803,7 +3804,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
- RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display");
+ RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Light origin display");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* View2D Grid Displays */
@@ -4038,9 +4039,9 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object");
- prop = RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
- RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, "Duplicate Light", "Causes light data to be duplicated with the object");
prop = RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index ec4e88768de..cf974132961 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -62,8 +62,8 @@ DefNode( ShaderNode, SH_NODE_COMBRGB, 0, "COMBR
DefNode( ShaderNode, SH_NODE_HUE_SAT, 0, "HUE_SAT", HueSaturation, "Hue/Saturation", "" )
DefNode( ShaderNode, SH_NODE_OUTPUT_MATERIAL, def_sh_output, "OUTPUT_MATERIAL", OutputMaterial, "Material Output", "" )
-DefNode( ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular, "Specular", "")
-DefNode( ShaderNode, SH_NODE_OUTPUT_LAMP, def_sh_output, "OUTPUT_LAMP", OutputLamp, "Lamp Output", "" )
+DefNode( ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular, "Specular", "" )
+DefNode( ShaderNode, SH_NODE_OUTPUT_LIGHT, def_sh_output, "OUTPUT_LIGHT", OutputLight, "Light Output", "" )
DefNode( ShaderNode, SH_NODE_OUTPUT_WORLD, def_sh_output, "OUTPUT_WORLD", OutputWorld, "World Output", "" )
DefNode( ShaderNode, SH_NODE_OUTPUT_LINESTYLE, def_sh_output_linestyle,"OUTPUT_LINESTYLE", OutputLineStyle, "Line Style Output", "" )
DefNode( ShaderNode, SH_NODE_FRESNEL, 0, "FRESNEL", Fresnel, "Fresnel", "" )
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index 8db88f13ea6..32c9244735d 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -222,7 +222,7 @@ bNode *ntreeShaderOutputNode(bNodeTree *ntree, int target)
for (bNode *node = ntree->nodes.first; node; node = node->next) {
if (!ELEM(node->type, SH_NODE_OUTPUT_MATERIAL,
SH_NODE_OUTPUT_WORLD,
- SH_NODE_OUTPUT_LAMP))
+ SH_NODE_OUTPUT_LIGHT))
{
continue;
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_lamp.c b/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
index b08a4b4ff57..4eb81f4cb5e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
@@ -39,7 +39,7 @@ void register_node_type_sh_output_lamp(void)
{
static bNodeType ntype;
- sh_node_type_base(&ntype, SH_NODE_OUTPUT_LAMP, "Lamp Output", NODE_CLASS_OUTPUT, 0);
+ sh_node_type_base(&ntype, SH_NODE_OUTPUT_LAMP, "Light Output", NODE_CLASS_OUTPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_output_lamp_in, NULL);
node_type_init(&ntype, NULL);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1983c0e6b84..d7210c4ee29 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3558,7 +3558,7 @@ static const EnumPropertyItem preview_id_type_items[] = {
{FILTER_ID_GR, "GROUP", 0, "Groups", ""},
{FILTER_ID_OB, "OBJECT", 0, "Objects", ""},
{FILTER_ID_MA, "MATERIAL", 0, "Materials", ""},
- {FILTER_ID_LA, "LAMP", 0, "Lamps", ""},
+ {FILTER_ID_LA, "LIGHT", 0, "Lights", ""},
{FILTER_ID_WO, "WORLD", 0, "Worlds", ""},
{FILTER_ID_TE, "TEXTURE", 0, "Textures", ""},
{FILTER_ID_IM, "IMAGE", 0, "Images", ""},