[Bf-blender-cvs] [3051e2f4ae8] master: DNA: rename Lamp -> Light
Campbell Barton
noreply at git.blender.org
Wed Feb 27 01:04:13 CET 2019
Commit: 3051e2f4ae8fd3e72a43dd1e5d40893d0efec500
Author: Campbell Barton
Date: Wed Feb 27 10:46:48 2019 +1100
Branches: master
https://developer.blender.org/rB3051e2f4ae8fd3e72a43dd1e5d40893d0efec500
DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light
- Main.lamp -> light
===================================================================
M source/blender/blenkernel/BKE_lamp.h
M source/blender/blenkernel/BKE_main.h
M source/blender/blenkernel/BKE_node.h
M source/blender/blenkernel/BKE_texture.h
M source/blender/blenkernel/intern/anim_sys.c
M source/blender/blenkernel/intern/camera.c
M source/blender/blenkernel/intern/icons.c
M source/blender/blenkernel/intern/ipo.c
M source/blender/blenkernel/intern/lamp.c
M source/blender/blenkernel/intern/library.c
M source/blender/blenkernel/intern/library_query.c
M source/blender/blenkernel/intern/library_remap.c
M source/blender/blenkernel/intern/main.c
M source/blender/blenkernel/intern/node.c
M source/blender/blenkernel/intern/object.c
M source/blender/blenkernel/intern/smoke.c
M source/blender/blenloader/intern/readblenentry.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_260.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/blenloader/intern/versioning_legacy.c
M source/blender/blenloader/intern/writefile.c
M source/blender/collada/AnimationImporter.cpp
M source/blender/collada/BCAnimationCurve.cpp
M source/blender/collada/DocumentImporter.cpp
M source/blender/collada/DocumentImporter.h
M source/blender/collada/LightExporter.cpp
M source/blender/collada/LightExporter.h
M source/blender/collada/collada_utils.h
M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M source/blender/depsgraph/intern/builder/deg_builder_nodes.h
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M source/blender/depsgraph/intern/builder/deg_builder_relations.h
M source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
M source/blender/draw/engines/eevee/eevee_data.c
M source/blender/draw/engines/eevee/eevee_lights.c
M source/blender/draw/engines/eevee/eevee_private.h
M source/blender/draw/modes/object_mode.c
M source/blender/editors/animation/anim_channels_defines.c
M source/blender/editors/animation/anim_filter.c
M source/blender/editors/include/ED_anim_api.h
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/object/object_add.c
M source/blender/editors/object/object_relations.c
M source/blender/editors/object/object_select.c
M source/blender/editors/object/object_transform.c
M source/blender/editors/render/render_preview.c
M source/blender/editors/render/render_shading.c
M source/blender/editors/render/render_update.c
M source/blender/editors/space_node/node_draw.c
M source/blender/editors/space_node/node_edit.c
M source/blender/editors/space_node/space_node.c
M source/blender/editors/space_outliner/outliner_draw.c
M source/blender/editors/space_outliner/outliner_tree.c
M source/blender/editors/space_view3d/view3d_gizmo_lamp.c
M source/blender/makesdna/DNA_ID.h
M source/blender/makesdna/DNA_ipo_types.h
M source/blender/makesdna/DNA_lamp_types.h
M source/blender/makesdna/intern/dna_rename_defs.h
M source/blender/makesrna/intern/rna_gpencil_modifier.c
M source/blender/makesrna/intern/rna_lamp.c
M source/blender/makesrna/intern/rna_main.c
M source/blender/makesrna/intern/rna_main_api.c
M source/blender/nodes/shader/node_shader_tree.c
M source/blender/windowmanager/WM_types.h
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h
index 1acceeacd89..762f4eae46b 100644
--- a/source/blender/blenkernel/BKE_lamp.h
+++ b/source/blender/blenkernel/BKE_lamp.h
@@ -30,17 +30,17 @@ extern "C" {
#include "BLI_compiler_attrs.h"
-struct Lamp;
+struct Light;
struct Main;
struct Scene;
-void BKE_lamp_init(struct Lamp *la);
-struct Lamp *BKE_lamp_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT;
-void BKE_lamp_copy_data(struct Main *bmain, struct Lamp *la_dst, const struct Lamp *la_src, const int flag);
-struct Lamp *BKE_lamp_copy(struct Main *bmain, const struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
-struct Lamp *BKE_lamp_localize(struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
-void BKE_lamp_make_local(struct Main *bmain, struct Lamp *la, const bool lib_local);
-void BKE_lamp_free(struct Lamp *la);
+void BKE_light_init(struct Light *la);
+struct Light *BKE_light_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT;
+void BKE_light_copy_data(struct Main *bmain, struct Light *la_dst, const struct Light *la_src, const int flag);
+struct Light *BKE_light_copy(struct Main *bmain, const struct Light *la) ATTR_WARN_UNUSED_RESULT;
+struct Light *BKE_light_localize(struct Light *la) ATTR_WARN_UNUSED_RESULT;
+void BKE_light_make_local(struct Main *bmain, struct Light *la, const bool lib_local);
+void BKE_light_free(struct Light *la);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index c31bc6c7f15..49755f6ec5e 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -94,7 +94,7 @@ typedef struct Main {
ListBase tex;
ListBase image;
ListBase latt;
- ListBase lamp;
+ ListBase light;
ListBase camera;
ListBase ipo; // XXX deprecated
ListBase key;
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 743efae9d16..7e924ded048 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -662,7 +662,7 @@ struct NodeTreeIterStore {
Scene *scene;
Material *mat;
Tex *tex;
- Lamp *lamp;
+ Light *light;
World *world;
FreestyleLineStyle *linestyle;
};
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 23b9d8afce3..bcd56c4f63d 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -31,7 +31,7 @@ struct Brush;
struct ColorBand;
struct FreestyleLineStyle;
struct ImagePool;
-struct Lamp;
+struct Light;
struct MTex;
struct Main;
struct Material;
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 1b09868bf7d..872129e351d 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1132,7 +1132,7 @@ void BKE_animdata_main_cb(Main *bmain, ID_AnimData_Edit_Callback func, void *use
ANIMDATA_NODETREE_IDS_CB(bmain->tex.first, Tex);
/* lamps */
- ANIMDATA_NODETREE_IDS_CB(bmain->lamp.first, Lamp);
+ ANIMDATA_NODETREE_IDS_CB(bmain->light.first, Light);
/* materials */
ANIMDATA_NODETREE_IDS_CB(bmain->mat.first, Material);
@@ -1231,7 +1231,7 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha
RENAMEFIX_ANIM_NODETREE_IDS(bmain->tex.first, Tex);
/* lamps */
- RENAMEFIX_ANIM_NODETREE_IDS(bmain->lamp.first, Lamp);
+ RENAMEFIX_ANIM_NODETREE_IDS(bmain->light.first, Light);
/* materials */
RENAMEFIX_ANIM_NODETREE_IDS(bmain->mat.first, Material);
@@ -3613,7 +3613,7 @@ void BKE_animsys_evaluate_all_animation(Main *main, Depsgraph *depsgraph, Scene
EVAL_ANIM_NODETREE_IDS(main->tex.first, Tex, ADT_RECALC_ANIM);
/* lamps */
- EVAL_ANIM_NODETREE_IDS(main->lamp.first, Lamp, ADT_RECALC_ANIM);
+ EVAL_ANIM_NODETREE_IDS(main->light.first, Light, ADT_RECALC_ANIM);
/* materials */
EVAL_ANIM_NODETREE_IDS(main->mat.first, Material, ADT_RECALC_ANIM);
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 92281424f99..8e27b3f288d 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -202,7 +202,7 @@ void BKE_camera_params_from_object(CameraParams *params, const Object *ob)
}
else if (ob->type == OB_LAMP) {
/* lamp object */
- Lamp *la = ob->data;
+ Light *la = ob->data;
params->lens = 16.0f / tanf(la->spotsize * 0.5f);
if (params->lens == 0.0f)
params->lens = 35.0f;
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 1fce0a128a1..24d548c18c6 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -323,7 +323,7 @@ PreviewImage **BKE_previewimg_id_get_p(const ID *id)
ID_PRV_CASE(ID_MA, Material);
ID_PRV_CASE(ID_TE, Tex);
ID_PRV_CASE(ID_WO, World);
- ID_PRV_CASE(ID_LA, Lamp);
+ ID_PRV_CASE(ID_LA, Light);
ID_PRV_CASE(ID_IM, Image);
ID_PRV_CASE(ID_BR, Brush);
ID_PRV_CASE(ID_OB, Object);
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 1b5ff6128b8..b49debc36cc 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -614,7 +614,7 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
return NULL;
}
-/* Lamp Types */
+/* Light Types */
static const char *lamp_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
@@ -1990,8 +1990,8 @@ void do_versions_ipos_to_animato(Main *bmain)
}
/* lamps */
- for (id = bmain->lamp.first; id; id = id->next) {
- Lamp *la = (Lamp *)id;
+ for (id = bmain->light.first; id; id = id->next) {
+ Light *la = (Light *)id;
if (G.debug & G_DEBUG) printf("\tconverting light %s\n", id->name + 2);
@@ -2000,7 +2000,7 @@ void do_versions_ipos_to_animato(Main *bmain)
/* Add AnimData block */
AnimData *adt = BKE_animdata_add_id(id);
- /* Convert Lamp data... */
+ /* Convert Light data... */
ipo_to_animdata(bmain, id, la->ipo, NULL, NULL, NULL);
if (adt->action)
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index fe04ad62f93..5057daaa35d 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -44,7 +44,7 @@
#include "BKE_main.h"
#include "BKE_node.h"
-void BKE_lamp_init(Lamp *la)
+void BKE_light_init(Light *la)
{
BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(la, id));
@@ -84,26 +84,26 @@ void BKE_lamp_init(Lamp *la)
curvemapping_initialize(la->curfalloff);
}
-Lamp *BKE_lamp_add(Main *bmain, const char *name)
+Light *BKE_light_add(Main *bmain, const char *name)
{
- Lamp *la;
+ Light *la;
la = BKE_libblock_alloc(bmain, ID_LA, name, 0);
- BKE_lamp_init(la);
+ BKE_light_init(la);
return la;
}
/**
- * Only copy internal data of Lamp ID from source to already allocated/initialized destination.
+ * Only copy internal data of Light ID from source to already allocated/initialized destination.
* You probably never want to use that directly, use BKE_id_copy or BKE_id_copy_ex for typical needs.
*
* WARNING! This function will not handle ID user count!
*
* \param flag: Copying options (see BKE_library.h's LIB_ID_COPY_... flags for more).
*/
-void BKE_lamp_copy_data(Main *bmain, Lamp *la_dst, const Lamp *la_src, const int flag)
+void BKE_light_copy_data(Main *bmain, Light *la_dst, const Light *la_src, const int flag)
{
la_dst->curfalloff = curvemapping_copy(la_src->curfalloff);
@@ -121,18 +121,18 @@ void BKE_lamp_copy_data(Main *bmain, Lamp *la_dst, const Lamp *la_src, const int
}
}
-Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la)
+Light *BKE_light_copy(Main *bmain, const Light *la)
{
- Lamp *la_copy;
+ Light *la_copy;
BKE_id_copy(bmain, &la->id, (ID **)&la_copy);
return la_copy;
}
-Lamp *BKE_lamp_localize(Lamp *la)
+Light *BKE_light_localize(Light *la)
{
/* TODO(bastien): Replace with something like:
*
- * Lamp *la_copy;
+ * Light *la_copy;
* BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy,
* LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT,
* false);
@@ -140,7 +140,7 @@ Lamp *BKE_lamp_localize(Lamp *la)
*
* NOTE: Only possible once nested node trees are fully converted to that too. */
- Lamp *lan = BKE_libblock_copy_for_localize(&la->id);
+ Light *lan = BKE_libblock_copy_for_localize(&la->id);
lan->curfalloff = curvemapping_copy(la->curfalloff);
@@ -154,12 +154,12 @@ Lamp *BKE_lamp_localize(Lamp *la)
return lan;
}
-void BKE_lamp_make_local(Main *bmain, Lamp *la, const bool lib_local)
+void BKE_light_make_local(Main *bmain, Light *la, const bool lib_local)
{
BKE_id_make_local_generic(bmain, &la->id, true, lib_local);
}
-void BKE_lamp_free(Lamp *la)
+void BKE_light_free(Light *la)
{
BKE_animdata_free((ID *)la, false);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 503ac9da0bd..5ff1418cf6a 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -409,7 +409,7 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local)
if (!test) BKE_lattice_make_local(bmain, (Lattice *)id, lib_local);
return true;
case ID_LA:
- if (!test) BKE_lamp_make_local(bmain, (Lamp *)id, lib_local);
+ if (!test) BKE_light_make_local(bmain, (Light *)id, lib_local);
return true;
case ID_CA:
if (!test) BKE_camera_make_local(bmain, (Camera *)id, lib_local);
@@ -591,7 +591,7 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag)
BKE_lattice_copy_data(bmain, (Lattice *)*r_newid, (Lattice *)id, flag);
break;
case ID_LA:
- BKE_lamp_copy_data(bmain, (Lamp *)*r_newid, (Lamp *)id, flag);
+ BKE_light_copy_data(bmain, (Light *)*r_newid, (Light *)id, flag);
break;
case ID_SPK:
BKE_speaker_copy_data(bmain, (Speaker *)*r_newid, (Speaker *)id, flag);
@@ -716,7 +716,7 @@ void BKE_id_swap
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list