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/blenloader
parentce104ca89643c4b0e6358fd22a2b056ecd603e62 (diff)
DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light - Main.lamp -> light
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c10
-rw-r--r--source/blender/blenloader/intern/versioning_260.c20
-rw-r--r--source/blender/blenloader/intern/versioning_270.c7
-rw-r--r--source/blender/blenloader/intern/versioning_280.c30
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c4
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c10
-rw-r--r--source/blender/blenloader/intern/writefile.c6
8 files changed, 43 insertions, 46 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 8eaff8e1b0f..9f9571d250c 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -253,7 +253,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
}
/**
- * Gets the names of all the linkable datablock types available in a file. (e.g. "Scene", "Mesh", "Lamp", etc.).
+ * Gets the names of all the linkable datablock types available in a file. (e.g. "Scene", "Mesh", "Light", etc.).
*
* \param bh: The blendhandle to access.
* \return A BLI_linklist of strings. The string links should be freed with malloc.
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e269993460d..e29d3be0e79 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3975,7 +3975,7 @@ static void direct_link_camera(FileData *fd, Camera *ca)
static void lib_link_lamp(FileData *fd, Main *main)
{
- for (Lamp *la = main->lamp.first; la; la = la->id.next) {
+ for (Light *la = main->light.first; la; la = la->id.next) {
if (la->id.tag & LIB_TAG_NEED_LINK) {
IDP_LibLinkProperty(la->id.properties, fd);
lib_link_animdata(fd, &la->id, la->adt);
@@ -3992,7 +3992,7 @@ static void lib_link_lamp(FileData *fd, Main *main)
}
}
-static void direct_link_lamp(FileData *fd, Lamp *la)
+static void direct_link_lamp(FileData *fd, Light *la)
{
la->adt = newdataadr(fd, la->adt);
direct_link_animdata(fd, la->adt);
@@ -9059,7 +9059,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const int ta
direct_link_image(fd, (Image *)id);
break;
case ID_LA:
- direct_link_lamp(fd, (Lamp *)id);
+ direct_link_lamp(fd, (Light *)id);
break;
case ID_VF:
direct_link_vfont(fd, (VFont *)id);
@@ -10126,7 +10126,7 @@ static void expand_material(FileData *fd, Main *mainvar, Material *ma)
}
}
-static void expand_lamp(FileData *fd, Main *mainvar, Lamp *la)
+static void expand_lamp(FileData *fd, Main *mainvar, Light *la)
{
expand_doit(fd, mainvar, la->ipo); // XXX deprecated - old animation system
@@ -10692,7 +10692,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar)
expand_lattice(fd, mainvar, (Lattice *)id);
break;
case ID_LA:
- expand_lamp(fd, mainvar, (Lamp *)id);
+ expand_lamp(fd, mainvar, (Light *)id);
break;
case ID_KE:
expand_key(fd, mainvar, (Key *)id);
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index c2edfa70470..86e4fd47479 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -822,7 +822,6 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
Scene *sce;
Material *mat;
Tex *tex;
- Lamp *lamp;
World *world;
bNodeTree *ntree;
@@ -841,9 +840,9 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
do_versions_nodetree_socket_use_flags_2_62(tex->nodetree);
}
- for (lamp = bmain->lamp.first; lamp; lamp = lamp->id.next) {
- if (lamp->nodetree)
- do_versions_nodetree_socket_use_flags_2_62(lamp->nodetree);
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
+ if (la->nodetree)
+ do_versions_nodetree_socket_use_flags_2_62(la->nodetree);
}
for (world = bmain->world.first; world; world = world->id.next) {
@@ -1177,7 +1176,6 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
Scene *sce;
Material *mat;
Tex *tex;
- Lamp *lamp;
World *world;
bNodeTree *ntree;
@@ -1193,9 +1191,9 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (tex->nodetree)
do_versions_nodetree_frame_2_64_6(tex->nodetree);
- for (lamp = bmain->lamp.first; lamp; lamp = lamp->id.next)
- if (lamp->nodetree)
- do_versions_nodetree_frame_2_64_6(lamp->nodetree);
+ for (Light *la = bmain->light.first; la; la = la->id.next)
+ if (la->nodetree)
+ do_versions_nodetree_frame_2_64_6(la->nodetree);
for (world = bmain->world.first; world; world = world->id.next)
if (world->nodetree)
@@ -2319,10 +2317,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
Scene *scene;
Object *ob;
- Lamp *lamp;
- for (lamp = bmain->lamp.first; lamp; lamp = lamp->id.next)
- lamp->spotsize = DEG2RADF(lamp->spotsize);
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
+ la->spotsize = DEG2RADF(la->spotsize);
+ }
for (ob = bmain->object.first; ob; ob = ob->id.next) {
ModifierData *md;
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 9b51e8b59f5..e5d3b9d473e 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1063,11 +1063,10 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
{
- Lamp *lamp;
#define LA_YF_PHOTON 5
- for (lamp = bmain->lamp.first; lamp; lamp = lamp->id.next) {
- if (lamp->type == LA_YF_PHOTON) {
- lamp->type = LA_LOCAL;
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
+ if (la->type == LA_YF_PHOTON) {
+ la->type = LA_LOCAL;
}
}
#undef LA_YF_PHOTON
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 0c0b4f6c364..405e21c3185 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -923,8 +923,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
if (!MAIN_VERSION_ATLEAST(bmain, 280, 1)) {
- if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "bleedexp")) {
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "bleedexp")) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
la->bleedexp = 2.5f;
}
}
@@ -950,8 +950,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
if (!MAIN_VERSION_ATLEAST(bmain, 280, 2)) {
- if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "cascade_max_dist")) {
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "cascade_max_dist")) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
la->cascade_max_dist = 1000.0f;
la->cascade_count = 4;
la->cascade_exponent = 0.8f;
@@ -959,8 +959,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "contact_dist")) {
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "contact_dist")) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
la->contact_dist = 0.2f;
la->contact_bias = 0.03f;
la->contact_spread = 0.2f;
@@ -1280,10 +1280,10 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
if (!MAIN_VERSION_ATLEAST(bmain, 280, 11)) {
- for (Lamp *lamp = bmain->lamp.first; lamp; lamp = lamp->id.next) {
- if (lamp->mode & (1 << 13)) { /* LA_SHAD_RAY */
- lamp->mode |= LA_SHADOW;
- lamp->mode &= ~(1 << 13);
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
+ if (la->mode & (1 << 13)) { /* LA_SHAD_RAY */
+ la->mode |= LA_SHADOW;
+ la->mode &= ~(1 << 13);
}
}
}
@@ -1312,8 +1312,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 280, 13)) {
/* Initialize specular factor. */
- if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "spec_fac")) {
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "spec_fac")) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
la->spec_fac = 1.0f;
}
}
@@ -2219,7 +2219,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
/* Removed Hemi lights. */
if (!ELEM(la->type, LA_LOCAL, LA_SUN, LA_SPOT, LA_AREA)) {
la->type = LA_SUN;
@@ -2244,8 +2244,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "att_dist")) {
- for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "att_dist")) {
+ for (Light *la = bmain->light.first; la; la = la->id.next) {
la->att_dist = la->clipend;
}
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 01a8e392459..83efde4640f 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -327,8 +327,8 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
}
/* Rename lamp objects. */
- rename_id_for_versioning(bmain, ID_OB, "Lamp", "Light");
- rename_id_for_versioning(bmain, ID_LA, "Lamp", "Light");
+ rename_id_for_versioning(bmain, ID_OB, "Light", "Light");
+ rename_id_for_versioning(bmain, ID_LA, "Light", "Light");
for (Mesh *mesh = bmain->mesh.first; mesh; mesh = mesh->id.next) {
/* Match default for new meshes. */
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 79c7067b14f..1b4e22b8cf0 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -1541,7 +1541,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
if (bmain->versionfile <= 241) {
Object *ob;
Scene *sce;
- Lamp *la;
+ Light *la;
bArmature *arm;
bNodeTree *ntree;
@@ -1581,7 +1581,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
for (ntree = bmain->nodetree.first; ntree; ntree = ntree->id.next)
ntree_version_241(ntree);
- for (la = bmain->lamp.first; la; la = la->id.next)
+ for (la = bmain->light.first; la; la = la->id.next)
if (la->buffers == 0)
la->buffers = 1;
@@ -1915,7 +1915,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
Scene *sce;
Object *ob;
Image *ima;
- Lamp *la;
+ Light *la;
Material *ma;
ParticleSettings *part;
Mesh *me;
@@ -2048,7 +2048,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
if (bmain->versionfile != 245 || bmain->subversionfile < 1) {
- for (la = bmain->lamp.first; la; la = la->id.next) {
+ for (la = bmain->light.first; la; la = la->id.next) {
la->falloff_type = LA_FALLOFF_INVLINEAR;
if (la->curfalloff == NULL) {
@@ -2403,7 +2403,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
idproperties_fix_group_lengths(bmain->tex);
idproperties_fix_group_lengths(bmain->image);
idproperties_fix_group_lengths(bmain->latt);
- idproperties_fix_group_lengths(bmain->lamp);
+ idproperties_fix_group_lengths(bmain->light);
idproperties_fix_group_lengths(bmain->camera);
idproperties_fix_group_lengths(bmain->ipo);
idproperties_fix_group_lengths(bmain->key);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 8be13c102e0..6240fa62e34 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2368,11 +2368,11 @@ static void write_world(WriteData *wd, World *wrld)
}
}
-static void write_lamp(WriteData *wd, Lamp *la)
+static void write_lamp(WriteData *wd, Light *la)
{
if (la->id.us > 0 || wd->use_memfile) {
/* write LibData */
- writestruct(wd, ID_LA, Lamp, 1, la);
+ writestruct(wd, ID_LA, Light, 1, la);
write_iddata(wd, &la->id);
if (la->adt) {
@@ -3934,7 +3934,7 @@ static bool write_file_handle(
write_camera(wd, (Camera *)id);
break;
case ID_LA:
- write_lamp(wd, (Lamp *)id);
+ write_lamp(wd, (Light *)id);
break;
case ID_LT:
write_lattice(wd, (Lattice *)id);