From 3051e2f4ae8fd3e72a43dd1e5d40893d0efec500 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Feb 2019 10:46:48 +1100 Subject: DNA: rename Lamp -> Light - BKE_lamp -> BKE_light - Main.lamp -> light --- source/blender/editors/render/render_preview.c | 18 +++++++++--------- source/blender/editors/render/render_shading.c | 2 +- source/blender/editors/render/render_update.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source/blender/editors/render') diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index fe3a6f96dcf..bacafbaee9b 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -156,7 +156,7 @@ typedef struct ShaderPreview { /* datablocks with nodes need full copy during preview render, glsl uses it too */ Material *matcopy; Tex *texcopy; - Lamp *lampcopy; + Light *lampcopy; World *worldcopy; /** Copy of the active objects #Object.color */ @@ -268,7 +268,7 @@ static const char *preview_collection_name(const char pr_type) case MA_TEXTURE: return "Texture"; case MA_LAMP: - return "Lamp"; + return "Light"; case MA_SKY: return "Sky"; case MA_HAIR: @@ -330,7 +330,7 @@ static ID *duplicate_ids(ID *id, Depsgraph *depsgraph) case ID_TE: return (ID *)BKE_texture_localize((Tex *)id_eval); case ID_LA: - return (ID *)BKE_lamp_localize((Lamp *)id_eval); + return (ID *)BKE_light_localize((Light *)id_eval); case ID_WO: return (ID *)BKE_world_localize((World *)id_eval); case ID_IM: @@ -479,14 +479,14 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty } } else if (id_type == ID_LA) { - Lamp *la = NULL, *origla = (Lamp *)id; + Light *la = NULL, *origla = (Light *)id; /* work on a copy */ if (origla) { BLI_assert(sp->id_copy != NULL); - la = sp->lampcopy = (Lamp *)sp->id_copy; + la = sp->lampcopy = (Light *)sp->id_copy; sp->id_copy = NULL; - BLI_addtail(&pr_main->lamp, la); + BLI_addtail(&pr_main->light, la); } set_preview_collection(sce, view_layer, MA_LAMP); @@ -705,7 +705,7 @@ static void shader_preview_updatejob(void *spv) ntreeLocalSync(sp->worldcopy->nodetree, wrld->nodetree); } else if (GS(sp->id->name) == ID_LA) { - Lamp *la = (Lamp *)sp->id; + Light *la = (Light *)sp->id; if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree) ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree); @@ -912,7 +912,7 @@ static void shader_preview_free(void *customdata) } if (sp->lampcopy) { sp->id_copy = (ID *)sp->lampcopy; - BLI_remlink(&pr_main->lamp, sp->lampcopy); + BLI_remlink(&pr_main->light, sp->lampcopy); } if (sp->id_copy) { /* node previews */ @@ -934,7 +934,7 @@ static void shader_preview_free(void *customdata) BKE_texture_free((Tex *)sp->id_copy); break; case ID_LA: - BKE_lamp_free((Lamp *)sp->id_copy); + BKE_light_free((Light *)sp->id_copy); break; case ID_WO: BKE_world_free((World *)sp->id_copy); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 8526f20f4e8..1afe0763699 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -1916,7 +1916,7 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) if (id == NULL) { Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; - Lamp *la = CTX_data_pointer_get_type(C, "light", &RNA_Light).data; + Light *la = CTX_data_pointer_get_type(C, "light", &RNA_Light).data; World *wo = CTX_data_pointer_get_type(C, "world", &RNA_World).data; ParticleSystem *psys = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data; FreestyleLineStyle *linestyle = CTX_data_pointer_get_type(C, "line_style", &RNA_FreestyleLineStyle).data; diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 9332a6a56e6..6dd2d345726 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -210,7 +210,7 @@ static void material_changed(Main *UNUSED(bmain), Material *ma) BKE_icon_changed(BKE_icon_id_ensure(&ma->id)); } -static void lamp_changed(Main *UNUSED(bmain), Lamp *la) +static void lamp_changed(Main *UNUSED(bmain), Light *la) { /* icons */ BKE_icon_changed(BKE_icon_id_ensure(&la->id)); @@ -293,7 +293,7 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id) world_changed(bmain, (World *)id); break; case ID_LA: - lamp_changed(bmain, (Lamp *)id); + lamp_changed(bmain, (Light *)id); break; case ID_IM: image_changed(bmain, (Image *)id); -- cgit v1.2.3