Cleanup: rename lamp -> light
authorCampbell Barton <ideasman42@gmail.com>
Wed, 27 Feb 2019 01:02:02 +0000 (12:02 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 27 Feb 2019 01:26:49 +0000 (12:26 +1100)
69 files changed:
release/scripts/startup/bl_ui/space_node.py
source/blender/blenkernel/BKE_lamp.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/lamp.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/studiolight.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/blentranslation/BLT_translation.h
source/blender/collada/AnimationExporter.cpp
source/blender/collada/BCAnimationSampler.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h
source/blender/collada/LightExporter.cpp
source/blender/collada/collada_utils.cpp
source/blender/collada/collada_utils.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/draw/engines/eevee/eevee_data.c
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lights.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/eevee/eevee_private.h
source/blender/draw/engines/eevee/eevee_volumes.c
source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
source/blender/draw/engines/eevee/shaders/lamps_lib.glsl
source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
source/blender/draw/engines/workbench/shaders/workbench_world_light_lib.glsl
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_cache.c
source/blender/draw/intern/draw_cache.h
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_common.h
source/blender/draw/modes/object_mode.c
source/blender/draw/modes/shaders/common_globals_lib.glsl
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_transform.c
source/blender/editors/render/render_preview.c
source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_gizmo_lamp.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_utils.c
source/blender/gpu/GPU_shader.h
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/makesdna/DNA_lamp_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/nodes/NOD_shader.h
source/blender/nodes/shader/nodes/node_shader_output_lamp.c

index c9930a6..9ba496b 100644 (file)
@@ -59,7 +59,7 @@ class NODE_HT_header(Header):
 
                 NODE_MT_editor_menus.draw_collapsible(context, layout)
 
-                # No shader nodes for Eevee lamps
+                # No shader nodes for Eevee lights
                 if snode_id and not (context.engine == 'BLENDER_EEVEE' and ob.type == 'LIGHT'):
                     row = layout.row()
                     row.prop(snode_id, "use_nodes")
index 762f4ea..7625d5d 100644 (file)
@@ -22,7 +22,7 @@
 
 /** \file
  * \ingroup bke
- * \brief General operations, lookup, etc. for blender lamps.
+ * \brief General operations, lookup, etc. for blender lights.
  */
 #ifdef __cplusplus
 extern "C" {
index 446eb32..3cbc81e 100644 (file)
@@ -1131,7 +1131,7 @@ void BKE_animdata_main_cb(Main *bmain, ID_AnimData_Edit_Callback func, void *use
        /* textures */
        ANIMDATA_NODETREE_IDS_CB(bmain->tex.first, Tex);
 
-       /* lamps */
+       /* lights */
        ANIMDATA_NODETREE_IDS_CB(bmain->light.first, Light);
 
        /* materials */
@@ -1230,7 +1230,7 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha
        /* textures */
        RENAMEFIX_ANIM_NODETREE_IDS(bmain->tex.first, Tex);
 
-       /* lamps */
+       /* lights */
        RENAMEFIX_ANIM_NODETREE_IDS(bmain->light.first, Light);
 
        /* materials */
@@ -3612,7 +3612,7 @@ void BKE_animsys_evaluate_all_animation(Main *main, Depsgraph *depsgraph, Scene
        /* textures */
        EVAL_ANIM_NODETREE_IDS(main->tex.first, Tex, ADT_RECALC_ANIM);
 
-       /* lamps */
+       /* lights */
        EVAL_ANIM_NODETREE_IDS(main->light.first, Light, ADT_RECALC_ANIM);
 
        /* materials */
index 8e27b3f..ce80aac 100644 (file)
@@ -201,7 +201,7 @@ void BKE_camera_params_from_object(CameraParams *params, const Object *ob)
                params->clip_end = cam->clip_end;
        }
        else if (ob->type == OB_LAMP) {
-               /* lamp object */
+               /* light object */
                Light *la = ob->data;
                params->lens = 16.0f / tanf(la->spotsize * 0.5f);
                if (params->lens == 0.0f)
index b49debc..1813edb 100644 (file)
@@ -615,7 +615,7 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
 }
 
 /* Light Types */
-static const char *lamp_adrcodes_to_paths(int adrcode, int *array_index)
+static const char *light_adrcodes_to_paths(int adrcode, int *array_index)
 {
        /* set array index like this in-case nothing sets it correctly  */
        *array_index = 0;
@@ -842,8 +842,8 @@ static char *get_rna_access(ID *id, int blocktype, int adrcode, char actname[],
                        propname = camera_adrcodes_to_paths(adrcode, &dummy_index);
                        break;
 
-               case ID_LA: /* lamp */
-                       propname = lamp_adrcodes_to_paths(adrcode, &dummy_index);
+               case ID_LA: /* light */
+                       propname = light_adrcodes_to_paths(adrcode, &dummy_index);
                        break;
 
                case ID_SO: /* sound */
@@ -1989,7 +1989,7 @@ void do_versions_ipos_to_animato(Main *bmain)
                }
        }
 
-       /* lamps */
+       /* lights */
        for (id = bmain->light.first; id; id = id->next) {
                Light *la = (Light *)id;
 
index 5057daa..318f5e7 100644 (file)
@@ -165,7 +165,7 @@ void BKE_light_free(Light *la)
 
        curvemapping_free(la->curfalloff);
 
-       /* is no lib link block, but lamp extension */
+       /* is no lib link block, but light extension */
        if (la->nodetree) {
                ntreeFreeNestedTree(la->nodetree);
                MEM_freeN(la->nodetree);
index f99a51c..fdf0265 100644 (file)
@@ -135,7 +135,7 @@ void BKE_material_init(Material *ma)
 
        ma->roughness = 0.25f;
 
-       ma->pr_lamp = 3;         /* two lamps, is bits */
+       ma->pr_light = 3;         /* two lights, is bits */
        ma->pr_type = MA_SPHERE;
 
        ma->preview = NULL;
index b8ccd0d..83c9697 100644 (file)
@@ -3550,7 +3550,7 @@ static void registerShaderNodes(void)
        register_node_type_sh_uvalongstroke();
        register_node_type_sh_eevee_specular();
 
-       register_node_type_sh_output_lamp();
+       register_node_type_sh_output_light();
        register_node_type_sh_output_material();
        register_node_type_sh_output_world();
        register_node_type_sh_output_linestyle();
index 707daaf..d7ff640 100644 (file)
@@ -715,10 +715,10 @@ void smokeModifier_copy(const struct SmokeModifierData *smd, struct SmokeModifie
 static void smoke_calc_transparency(SmokeDomainSettings *sds, ViewLayer *view_layer);
 static float calc_voxel_transp(float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
 
-static int get_lamp(ViewLayer *view_layer, float *light)
+static int get_light(ViewLayer *view_layer, float *light)
 {
        Base *base_tmp = NULL;
-       int found_lamp = 0;
+       int found_light = 0;
 
        // try to find a lamp, preferably local
        for (base_tmp = FIRSTBASE(view_layer); base_tmp; base_tmp = base_tmp->next) {
@@ -729,14 +729,14 @@ static int get_lamp(ViewLayer *view_layer, float *light)
                                copy_v3_v3(light, base_tmp->object->obmat[3]);
                                return 1;
                        }
-                       else if (!found_lamp) {
+                       else if (!found_light) {
                                copy_v3_v3(light, base_tmp->object->obmat[3]);
-                               found_lamp = 1;
+                               found_light = 1;
                        }
                }
        }
 
-       return found_lamp;
+       return found_light;
 }
 
 /**********************************************************
@@ -3013,7 +3013,7 @@ static void smoke_calc_transparency(SmokeDomainSettings *sds, ViewLayer *view_la
        float *density = smoke_get_density(sds->fluid);
        float correct = -7.0f * sds->dx;
 
-       if (!get_lamp(view_layer, light)) return;
+       if (!get_light(view_layer, light)) return;
 
        /* convert light pos to sim cell space */
        mul_m4_v3(sds->imat, light);
index 221ebbb..16bfee7 100644 (file)
@@ -851,7 +851,7 @@ static float blinn_specular(
        gloss *= 1.0f - wrap;
        float shininess = exp2(10.0f * gloss + 1.0f);
 
-       /* Pi is already divided in the lamp power.
+       /* Pi is already divided in the light power.
         * normalization_factor = (shininess + 8.0) / (8.0 * M_PI) */
        float normalization_factor = shininess * 0.125f + 1.0f;
        float spec_light = powf(spec_angle, shininess) * max_ff(NL, 0.0f) * normalization_factor;
index 7370b17..74aadc0 100644 (file)
@@ -3973,7 +3973,7 @@ static void direct_link_camera(FileData *fd, Camera *ca)
 /** \name Read ID: Light
  * \{ */
 
-static void lib_link_lamp(FileData *fd, Main *main)
+static void lib_link_light(FileData *fd, Main *main)
 {
        for (Light *la = main->light.first; la; la = la->id.next) {
                if (la->id.tag & LIB_TAG_NEED_LINK) {
@@ -3992,7 +3992,7 @@ static void lib_link_lamp(FileData *fd, Main *main)
        }
 }
 
-static void direct_link_lamp(FileData *fd, Light *la)
+static void direct_link_light(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, (Light *)id);
+                       direct_link_light(fd, (Light *)id);
                        break;
                case ID_VF:
                        direct_link_vfont(fd, (VFont *)id);
@@ -9323,7 +9323,7 @@ static void lib_link_all(FileData *fd, Main *main)
        lib_link_ipo(fd, main);        /* XXX deprecated... still needs to be maintained for version patches still */
        lib_link_key(fd, main);
        lib_link_world(fd, main);
-       lib_link_lamp(fd, main);
+       lib_link_light(fd, main);
        lib_link_latt(fd, main);
        lib_link_text(fd, main);
        lib_link_camera(fd, main);
@@ -10126,7 +10126,7 @@ static void expand_material(FileData *fd, Main *mainvar, Material *ma)
        }
 }
 
-static void expand_lamp(FileData *fd, Main *mainvar, Light *la)
+static void expand_light(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, (Light *)id);
+                                                       expand_light(fd, mainvar, (Light *)id);
                                                        break;
                                                case ID_KE:
                                                        expand_key(fd, mainvar, (Key *)id);
index 6b75203..1a92a75 100644 (file)
@@ -1398,7 +1398,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_RENDER_OVERRIDE.
                 * This bit was used in the past for V3D_TRANSFORM_SNAP, which is now deprecated.
                 * Here we clear it for old files so they don't come in with V3D_RENDER_OVERRIDE set,
-                * which would cause cameras, lamps, etc to become invisible */
+                * which would cause cameras, lights, etc to become invisible */
                for (sc = bmain->screen.first; sc; sc = sc->id.next) {
                        ScrArea *sa;
                        for (sa = sc->areabase.first; sa; sa = sa->next) {
index 35b826c..4a49ddd 100644 (file)
@@ -326,7 +326,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
                        scene->eevee.motion_blur_shutter = 0.5f;
                }
 
-               /* Rename lamp objects. */
+               /* Rename light objects. */
                rename_id_for_versioning(bmain, ID_OB, "Light", "Light");
                rename_id_for_versioning(bmain, ID_LA, "Light", "Light");
 
index 1899775..d2aab2b 100644 (file)
@@ -1182,8 +1182,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
                /* Object *ob = bmain->object.first; */
 
                while (ma) {
-                       if (ma->pr_lamp == 0)
-                               ma->pr_lamp = 3;
+                       if (ma->pr_light == 0)
+                               ma->pr_light = 3;
                        ma = ma->id.next;
                }
 
index 6240fa6..42a39dd 100644 (file)
@@ -2368,7 +2368,7 @@ static void write_world(WriteData *wd, World *wrld)
        }
 }
 
-static void write_lamp(WriteData *wd, Light *la)
+static void write_light(WriteData *wd, Light *la)
 {
        if (la->id.us > 0 || wd->use_memfile) {
                /* write LibData */
@@ -2383,7 +2383,7 @@ static void write_lamp(WriteData *wd, Light *la)
                        write_curvemapping(wd, la->curfalloff);
                }
 
-               /* nodetree is integral part of lamps, no libdata */
+               /* Node-tree is integral part of lights, no libdata. */
                if (la->nodetree) {
                        writestruct(wd, DATA, bNodeTree, 1, la->nodetree);
                        write_nodetree_nolib(wd, la->nodetree);
@@ -3934,7 +3934,7 @@ static bool write_file_handle(
                                                write_camera(wd, (Camera *)id);
                                                break;
                                        case ID_LA:
-                                               write_lamp(wd, (Light *)id);
+                                               write_light(wd, (Light *)id);
                                                break;
                                        case ID_LT:
                                                write_lattice(wd, (Lattice *)id);
index 8dadf39..b1375fd 100644 (file)
@@ -175,7 +175,7 @@ typedef struct {
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IMAGE, "id_image"),                                                       \
        /*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/                                                       \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"),                                                 \
-       BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHT, "id_lamp"),                                                         \
+       BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHT, "id_light"),                                                       \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIBRARY, "id_library"),                                                   \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LATTICE, "id_lattice"),                                                   \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MASK, "id_mask"),                                                         \
index f3a7f8d..ebb2a9d 100644 (file)
@@ -721,7 +721,7 @@ const std::string AnimationExporter::get_collada_name(std::string channel_target
                { "specular_hardness", "specular_hardness" },
                { "alpha", "alpha" },
 
-               /* Lamps */
+               /* Lights */
                { "color", "color" },
                { "fall_off_angle", "falloff_angle" },
                { "spot_size", "falloff_angle" },
index 10a5bb8..afc3719 100644 (file)
@@ -404,7 +404,7 @@ void BCAnimationSampler::initialize_keyframes(BCFrameSet &frameset, Object *ob)
        frameset.clear();
        add_keyframes_from(bc_getSceneObjectAction(ob), frameset);
        add_keyframes_from(bc_getSceneCameraAction(ob), frameset);
-       add_keyframes_from(bc_getSceneLampAction(ob), frameset);
+       add_keyframes_from(bc_getSceneLightAction(ob), frameset);
 
        for (int a = 0; a < ob->totcol; a++) {
                Material *ma = give_current_material(ob, a + 1);
@@ -451,12 +451,12 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object *
                object_type = BC_ANIMATION_TYPE_CAMERA;
        }
        else if (ob->type == OB_LAMP) {
-               action = bc_getSceneLampAction(ob);
+               action = bc_getSceneLightAction(ob);
                object_type = BC_ANIMATION_TYPE_LIGHT;
        }
 
        if (action) {
-               /* Add lamp action or Camera action */
+               /* Add light action or Camera action */
                FCurve *fcu = (FCurve *)action->curves.first;
                for (; fcu; fcu = fcu->next) {
                        BCCurveKey key(object_type, fcu->rna_path, fcu->array_index);
index 4c6387e..a81fa6c 100644 (file)
@@ -377,20 +377,20 @@ Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera
        return ob;
 }
 
-Object *DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Scene *sce)
+Object *DocumentImporter::create_light_object(COLLADAFW::InstanceLight *lamp, Scene *sce)
 {
        const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId();
-       if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) {
+       if (uid_light_map.find(lamp_uid) == uid_light_map.end()) {
                fprintf(stderr, "Couldn't find light by UID.\n");
                return NULL;
        }
 
        Main *bmain = CTX_data_main(mContext);
        Object *ob = bc_add_object(bmain, sce, view_layer, OB_LAMP, NULL);
-       Light *la = uid_lamp_map[lamp_uid];
-       Light *old_lamp = (Light *)ob->data;
+       Light *la = uid_light_map[lamp_uid];
+       Light *old_light = (Light *)ob->data;
        ob->data = la;
-       BKE_id_free_us(bmain, old_lamp);
+       BKE_id_free_us(bmain, old_light);
        return ob;
 }
 
@@ -563,9 +563,9 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node, COLLA
                        ++camera_done;
                }
                while (lamp_done < lamp.getCount()) {
-                       ob = create_lamp_object(lamp[lamp_done], sce);
+                       ob = create_light_object(lamp[lamp_done], sce);
                        if (ob == NULL) {
-                               report_unknown_reference(*node, "instance_lamp");
+                               report_unknown_reference(*node, "instance_light");
                        }
                        else {
                                objects_done->push_back(ob);
@@ -1117,7 +1117,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
                }
        }
 
-       this->uid_lamp_map[light->getUniqueId()] = lamp;
+       this->uid_light_map[light->getUniqueId()] = lamp;
        this->FW_object_map[light->getUniqueId()] = light;
        return true;
 }
index fad06b0..1ba1a9c 100644 (file)
@@ -65,7 +65,7 @@ public:
 
        /** these should not be here */
        Object* create_camera_object(COLLADAFW::InstanceCamera*, Scene*);
-       Object* create_lamp_object(COLLADAFW::InstanceLight*, Scene*);
+       Object* create_light_object(COLLADAFW::InstanceLight*, Scene*);
        Object* create_instance_node(Object*, COLLADAFW::Node*, COLLADAFW::Node*, Scene*, bool);
        void create_constraints(ExtraTags *et, Object *ob);
        std::vector<Object *> *write_node(COLLADAFW::Node*, COLLADAFW::Node*, Scene*, Object*, bool);
@@ -156,7 +156,7 @@ private:
        std::map<COLLADAFW::UniqueId, Material*> uid_material_map;
        std::map<COLLADAFW::UniqueId, Material*> uid_effect_map;
        std::map<COLLADAFW::UniqueId, Camera*> uid_camera_map;
-       std::map<COLLADAFW::UniqueId, Light*> uid_lamp_map;
+       std::map<COLLADAFW::UniqueId, Light*> uid_light_map;
        std::map<Material*, TexIndexTextureArrayMap> material_texture_mapping_map;
        std::multimap<COLLADAFW::UniqueId, Object*> object_map;
        std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> node_map;
index 215775b..c1822a8 100644 (file)
@@ -29,7 +29,7 @@
 #include "collada_internal.h"
 
 template<class Functor>
-void forEachLampObjectInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
+void forEachLightObjectInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
 {
        LinkNode *node;
        for (node = export_set; node; node = node->next) {
@@ -48,7 +48,7 @@ void LightsExporter::exportLights(Scene *sce)
 {
        openLibrary();
 
-       forEachLampObjectInExportSet(sce, *this, this->export_settings->export_set);
+       forEachLightObjectInExportSet(sce, *this, this->export_settings->export_set);
 
        closeLibrary();
 }
@@ -105,7 +105,7 @@ void LightsExporter::operator()(Object *ob)
                exportBlenderProfile(cla, la);
                addLight(cla);
        }
-       // area lamp is not supported
+       // area light is not supported
        // it will be exported as a local lamp
        else {
                COLLADASW::PointLight cla(mSW, la_id, la_name);
index 66c8f94..406d4da 100644 (file)
@@ -1016,9 +1016,9 @@ bool bc_is_animated(BCMatrixSampleMap &values)
 
 bool bc_has_animations(Object *ob)
 {
-       /* Check for object,lamp and camera transform animations */
+       /* Check for object, light and camera transform animations */
        if ((bc_getSceneObjectAction(ob) && bc_getSceneObjectAction(ob)->curves.first) ||
-               (bc_getSceneLampAction(ob) && bc_getSceneLampAction(ob)->curves.first) ||
+               (bc_getSceneLightAction(ob) && bc_getSceneLightAction(ob)->curves.first) ||
                (bc_getSceneCameraAction(ob) && bc_getSceneCameraAction(ob)->curves.first))
                return true;
 
index 1e18ac5..9eeedb2 100644 (file)
@@ -91,7 +91,7 @@ inline bAction *bc_getSceneObjectAction(Object *ob)
 }
 
 /* Returns Light Action or NULL */
-inline bAction *bc_getSceneLampAction(Object *ob)
+inline bAction *bc_getSceneLightAction(Object *ob)
 {
        if (ob->type != OB_LAMP)
                return NULL;
index 6c9d008..25f1af9 100644 (file)
@@ -424,7 +424,7 @@ void DepsgraphNodeBuilder::build_id(ID *id)
                        build_shapekeys((Key *)id);
                        break;
                case ID_LA:
-                       build_lamp((Light *)id);
+                       build_light((Light *)id);
                        break;
                case ID_LP:
                        build_lightprobe((LightProbe *)id);
@@ -692,7 +692,7 @@ void DepsgraphNodeBuilder::build_object_data(
                        }
                        break;
                case OB_LAMP:
-                       build_object_data_lamp(object);
+                       build_object_data_light(object);
                        break;
                case OB_CAMERA:
                        build_object_data_camera(object);
@@ -720,10 +720,10 @@ void DepsgraphNodeBuilder::build_object_data_camera(Object *object)
        build_camera(camera);
 }
 
-void DepsgraphNodeBuilder::build_object_data_lamp(Object *object)
+void DepsgraphNodeBuilder::build_object_data_light(Object *object)
 {
        Light *lamp = (Light *)object->data;
-       build_lamp(lamp);
+       build_light(lamp);
 }
 
 void DepsgraphNodeBuilder::build_object_data_lightprobe(Object *object)
@@ -1417,7 +1417,7 @@ void DepsgraphNodeBuilder::build_camera(Camera *camera)
        op_node->set_as_exit();
 }
 
-void DepsgraphNodeBuilder::build_lamp(Light *lamp)
+void DepsgraphNodeBuilder::build_light(Light *lamp)
 {
        if (built_map_.checkIsBuiltAndTag(lamp)) {
                return;
@@ -1428,11 +1428,11 @@ void DepsgraphNodeBuilder::build_lamp(Light *lamp)
                &lamp->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL);
        /* NOTE: We mark this node as both entry and exit. This way we have a
         * node to link all dependencies for shading (which includes relation to the
-        * lamp object, and incldues relation from node tree) without adding a
+        * light object, and incldues relation from node tree) without adding a
         * dedicated component type. */
        op_node->set_as_entry();
        op_node->set_as_exit();
-       /* lamp's nodetree */
+       /* light's nodetree */
        build_nodetree(lamp->nodetree);
 }
 
index b80b544..88d5dee 100644 (file)
@@ -172,7 +172,7 @@ struct DepsgraphNodeBuilder {
        void build_object_data_geometry(Object *object, bool is_object_visible);
        void build_object_data_geometry_datablock(ID *obdata,
                                                  bool is_object_visible);
-       void build_object_data_lamp(Object *object);
+       void build_object_data_light(Object *object);
        void build_object_data_lightprobe(Object *object);
        void build_object_data_speaker(Object *object);
        void build_object_transform(Object *object);
@@ -204,7 +204,7 @@ struct DepsgraphNodeBuilder {
        void build_armature(bArmature *armature);
        void build_shapekeys(Key *key);
        void build_camera(Camera *camera);
-       void build_lamp(Light *lamp);
+       void build_light(Light *lamp);
        void build_nodetree(bNodeTree *ntree);
        void build_material(Material *ma);
        void build_texture(Tex *tex);
index 6a611e9..2a9f81b 100644 (file)
@@ -495,7 +495,7 @@ void DepsgraphRelationBuilder::build_id(ID *id)
                        build_shapekeys((Key *)id);
                        break;
                case ID_LA:
-                       build_lamp((Light *)id);
+                       build_light((Light *)id);
                        break;
                case ID_LP:
                        build_lightprobe((LightProbe *)id);
@@ -774,7 +774,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object)
                        }
                        break;
                case OB_LAMP:
-                       build_object_data_lamp(object);
+                       build_object_data_light(object);
                        break;
                case OB_CAMERA:
                        build_object_data_camera(object);
@@ -804,10 +804,10 @@ void DepsgraphRelationBuilder::build_object_data_camera(Object *object)
        add_relation(camera_parameters_key, object_parameters_key, "Camera -> Object");
 }
 
-void DepsgraphRelationBuilder::build_object_data_lamp(Object *object)
+void DepsgraphRelationBuilder::build_object_data_light(Object *object)
 {
        Light *lamp = (Light *)object->data;
-       build_lamp(lamp);
+       build_light(lamp);
        ComponentKey lamp_parameters_key(&lamp->id, NodeType::PARAMETERS);
        ComponentKey object_parameters_key(&object->id, NodeType::PARAMETERS);
        add_relation(lamp_parameters_key, object_parameters_key, "Light -> Object");
@@ -2348,13 +2348,13 @@ void DepsgraphRelationBuilder::build_camera(Camera *camera)
        }
 }
 
-/* Lamps */
-void DepsgraphRelationBuilder::build_lamp(Light *lamp)
+/* Lights */
+void DepsgraphRelationBuilder::build_light(Light *lamp)
 {
        if (built_map_.checkIsBuiltAndTag(lamp)) {
                return;
        }
-       /* lamp's nodetree */
+       /* light's nodetree */
        if (lamp->nodetree != NULL) {
                build_nodetree(lamp->nodetree);
                ComponentKey lamp_parameters_key(&lamp->id, NodeType::PARAMETERS);
index 1b11503..190fcb7 100644 (file)
@@ -217,7 +217,7 @@ struct DepsgraphRelationBuilder
        void build_object_data_camera(Object *object);
        void build_object_data_geometry(Object *object);
        void build_object_data_geometry_datablock(ID *obdata);
-       void build_object_data_lamp(Object *object);
+       void build_object_data_light(Object *object);
        void build_object_data_lightprobe(Object *object);
        void build_object_data_speaker(Object *object);
        void build_object_parent(Object *object);
@@ -265,7 +265,7 @@ struct DepsgraphRelationBuilder
        void build_shapekeys(Key *key);
        void build_armature(bArmature *armature);
        void build_camera(Camera *camera);
-       void build_lamp(Light *lamp);
+       void build_light(Light *lamp);
        void build_nodetree(bNodeTree *ntree);
        void build_material(Material *ma);
        void build_texture(Tex *tex);
index dae1e3e..78bfb54 100644 (file)
@@ -32,7 +32,7 @@ void EEVEE_view_layer_data_free(void *storage)
        EEVEE_ViewLayerData *sldata = (EEVEE_ViewLayerData *)storage;
 
        /* Lights */
-       MEM_SAFE_FREE(sldata->lamps);
+       MEM_SAFE_FREE(sldata->lights);
        DRW_UBO_FREE_SAFE(sldata->light_ubo);
        DRW_UBO_FREE_SAFE(sldata->shadow_ubo);
        DRW_UBO_FREE_SAFE(sldata->shadow_render_ubo);
@@ -153,30 +153,30 @@ EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_ensure(Object *ob)
 
 /* Light data. */
 
-static void eevee_lamp_data_init(DrawData *dd)
+static void eevee_light_data_init(DrawData *dd)
 {
-       EEVEE_LampEngineData *led = (EEVEE_LampEngineData *)dd;
+       EEVEE_LightEngineData *led = (EEVEE_LightEngineData *)dd;
        led->need_update = true;
        led->prev_cube_shadow_id = -1;
 }
 
-EEVEE_LampEngineData *EEVEE_lamp_data_get(Object *ob)
+EEVEE_LightEngineData *EEVEE_light_data_get(Object *ob)
 {
        if (ob->type != OB_LAMP) {
                return NULL;
        }
-       return (EEVEE_LampEngineData *)DRW_drawdata_get(
+       return (EEVEE_LightEngineData *)DRW_drawdata_get(
                &ob->id, &draw_engine_eevee_type);
 }
 
-EEVEE_LampEngineData *EEVEE_lamp_data_ensure(Object *ob)
+EEVEE_LightEngineData *EEVEE_light_data_ensure(Object *ob)
 {
        BLI_assert(ob->type == OB_LAMP);
-       return (EEVEE_LampEngineData *)DRW_drawdata_ensure(
+       return (EEVEE_LightEngineData *)DRW_drawdata_ensure(
                &ob->id,
                &draw_engine_eevee_type,
-               sizeof(EEVEE_LampEngineData),
-               eevee_lamp_data_init,
+               sizeof(EEVEE_LightEngineData),
+               eevee_light_data_init,
                NULL);
 }
 
index 1de0768..54c1415 100644 (file)
@@ -368,7 +368,7 @@ static void eevee_id_object_update(void *UNUSED(vedata), Object *object)
                ped->need_update = (ped->dd.recalc & (ID_RECALC_TRANSFORM | ID_RECALC_COPY_ON_WRITE)) != 0;
                ped->dd.recalc = 0;
        }
-       EEVEE_LampEngineData *led = EEVEE_lamp_data_get(object);
+       EEVEE_LightEngineData *led = EEVEE_light_data_get(object);
        if (led != NULL && led->dd.recalc != 0) {
                led->need_update = true;
                led->dd.recalc = 0;
index 34a653c..f4fe088 100644 (file)
@@ -113,8 +113,8 @@ void EEVEE_lights_init(EEVEE_ViewLayerData *sldata)
                        datatoc_shadow_vert_glsl, NULL, datatoc_shadow_frag_glsl, NULL);
        }
 
-       if (!sldata->lamps) {
-               sldata->lamps              = MEM_callocN(sizeof(EEVEE_LampsInfo), "EEVEE_LampsInfo");
+       if (!sldata->lights) {
+               sldata->lights             = MEM_callocN(sizeof(EEVEE_LightsInfo), "EEVEE_LightsInfo");
                sldata->light_ubo          = DRW_uniformbuffer_create(sizeof(EEVEE_Light) * MAX_LIGHT, NULL);
                sldata->shadow_ubo         = DRW_uniformbuffer_create(shadow_ubo_size, NULL);
                sldata->shadow_render_ubo  = DRW_uniformbuffer_create(sizeof(EEVEE_ShadowRender), NULL);
@@ -126,20 +126,20 @@ void EEVEE_lights_init(EEVEE_ViewLayerData *sldata)
                        sldata->shcasters_buffers[i].count = 0;
                }
 
-               sldata->lamps->shcaster_frontbuffer = &sldata->shcasters_buffers[0];
-               sldata->lamps->shcaster_backbuffer = &sldata->shcasters_buffers[1];
+               sldata->lights->shcaster_frontbuffer = &sldata->shcasters_buffers[0];
+               sldata->lights->shcaster_backbuffer = &sldata->shcasters_buffers[1];
        }
 
        /* Flip buffers */
-       SWAP(EEVEE_ShadowCasterBuffer *, sldata->lamps->shcaster_frontbuffer, sldata->lamps->shcaster_backbuffer);
+       SWAP(EEVEE_ShadowCasterBuffer *, sldata->lights->shcaster_frontbuffer, sldata->lights->shcaster_backbuffer);
 
        const int sh_method = scene_eval->eevee.shadow_method;
        int sh_cube_size = scene_eval->eevee.shadow_cube_size;
        int sh_cascade_size = scene_eval->eevee.shadow_cascade_size;
        const bool sh_high_bitdepth = (scene_eval->eevee.flag & SCE_EEVEE_SHADOW_HIGH_BITDEPTH) != 0;
-       sldata->lamps->soft_shadows = (scene_eval->eevee.flag & SCE_EEVEE_SHADOW_SOFT) != 0;
+       sldata->lights->soft_shadows = (scene_eval->eevee.flag & SCE_EEVEE_SHADOW_SOFT) != 0;
 
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        if ((linfo->shadow_cube_size != sh_cube_size) ||
            (linfo->shadow_method != sh_method) ||
            (linfo->shadow_high_bitdepth != sh_high_bitdepth))
@@ -242,7 +242,7 @@ static DRWPass *eevee_lights_cube_store_pass_get(EEVEE_PassList *psl, EEVEE_View
        bool high_blur = shadow_samples_len > 16;
        DRWPass **pass = (high_blur) ? &psl->shadow_cube_store_pass : &psl->shadow_cube_store_high_pass;
        if (*pass == NULL) {
-               EEVEE_LampsInfo *linfo = sldata->lamps;
+               EEVEE_LightsInfo *linfo = sldata->lights;
                *pass = DRW_pass_create("Shadow Cube Storage Pass", DRW_STATE_WRITE_COLOR);
                GPUShader *shader = eevee_lights_get_store_sh(shadow_method, high_blur, false);
                DRWShadingGroup *grp = DRW_shgroup_create(shader, *pass);
@@ -259,7 +259,7 @@ static DRWPass *eevee_lights_cascade_store_pass_get(EEVEE_PassList *psl, EEVEE_V
        bool high_blur = shadow_samples_len > 16;
        DRWPass **pass = (high_blur) ? &psl->shadow_cascade_store_pass : &psl->shadow_cascade_store_high_pass;
        if (*pass == NULL) {
-               EEVEE_LampsInfo *linfo = sldata->lamps;
+               EEVEE_LightsInfo *linfo = sldata->lights;
                *pass = DRW_pass_create("Shadow Cascade Storage Pass", DRW_STATE_WRITE_COLOR);
                GPUShader *shader = eevee_lights_get_store_sh(shadow_method, high_blur, true);
                DRWShadingGroup *grp = DRW_shgroup_create(shader, *pass);
@@ -274,7 +274,7 @@ static DRWPass *eevee_lights_cascade_store_pass_get(EEVEE_PassList *psl, EEVEE_V
 
 void EEVEE_lights_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 {
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        EEVEE_StorageList *stl = vedata->stl;
        EEVEE_PassList *psl = vedata->psl;
 
@@ -332,12 +332,12 @@ void EEVEE_lights_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
 void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
 {
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
 
        const DRWContextState *draw_ctx = DRW_context_state_get();
        const float threshold = draw_ctx->scene->eevee.light_threshold;
 
-       /* Step 1 find all lamps in the scene and setup them */
+       /* Step 1 find all lights in the scene and setup them */
        if (linfo->num_light >= MAX_LIGHT) {
                printf("Too many lights in the scene !!!\n");
        }
@@ -346,13 +346,13 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
                EEVEE_Light *evli = linfo->light_data + linfo->num_light;
                eevee_light_setup(ob, evli);
 
-               /* We do not support shadowmaps for dupli lamps. */
+               /* We do not support shadowmaps for dupli lights. */
                if ((ob->base_flag & BASE_FROM_DUPLI) != 0) {
                        linfo->num_light++;
                        return;
                }
 
-               EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob);
+               EEVEE_LightEngineData *led = EEVEE_light_data_ensure(ob);
 
                /* Save previous shadow id. */
                int prev_cube_sh_id = led->prev_cube_shadow_id;
@@ -396,7 +396,7 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
                                        }
                                        led->prev_cube_shadow_id = linfo->cpu_cube_len;
 
-                                       /* Saving lamp bounds for later. */
+                                       /* Saving light bounds for later. */
                                        BLI_assert(linfo->cpu_cube_len >= 0 && linfo->cpu_cube_len < MAX_LIGHT);
                                        copy_v3_v3(linfo->shadow_bounds[linfo->cpu_cube_len].center, ob->obmat[3]);
                                        linfo->shadow_bounds[linfo->cpu_cube_len].radius = light_attenuation_radius_get(la, threshold);
@@ -457,7 +457,7 @@ void EEVEE_lights_cache_shcaster_material_add(
        DRW_shgroup_call_object_add(grp, geom, ob);
 }
 
-/* Make that object update shadow casting lamps inside its influence bounding box. */
+/* Make that object update shadow casting lights inside its influence bounding box. */
 void EEVEE_lights_cache_shcaster_object_add(EEVEE_ViewLayerData *sldata, Object *ob)
 {
        if ((ob->base_flag & BASE_FROM_DUPLI) != 0) {
@@ -466,7 +466,7 @@ void EEVEE_lights_cache_shcaster_object_add(EEVEE_ViewLayerData *sldata, Object
        }
 
        EEVEE_ObjectEngineData *oedata = EEVEE_object_data_ensure(ob);
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        EEVEE_ShadowCasterBuffer *backbuffer = linfo->shcaster_backbuffer;
        EEVEE_ShadowCasterBuffer *frontbuffer = linfo->shcaster_frontbuffer;
        int past_id = oedata->shadow_caster_id;
@@ -521,7 +521,7 @@ void EEVEE_lights_cache_shcaster_object_add(EEVEE_ViewLayerData *sldata, Object
 
 void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 {
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        eGPUTextureFormat shadow_pool_format = GPU_R32F;
 
        sldata->common_data.la_num_light = linfo->num_light;
@@ -587,7 +587,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                GPU_ATTACHMENT_TEXTURE(sldata->shadow_cascade_pool)
        });
 
-       /* Update Lamps UBOs. */
+       /* Update Lights UBOs. */
        EEVEE_lights_update(sldata, vedata);
 }
 
@@ -659,7 +659,7 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli)
        return power;
 }
 
-/* Update buffer with lamp data */
+/* Update buffer with light data */
 static void eevee_light_setup(Object *ob, EEVEE_Light *evli)
 {
        Light *la = (Light *)ob->data;
@@ -696,9 +696,9 @@ static void eevee_light_setup(Object *ob, EEVEE_Light *evli)
        light_shape_parameters_set(evli, la, scale);
 
        /* Light Type */
-       evli->lamptype = (float)la->type;
+       evli->light_type = (float)la->type;
        if ((la->type == LA_AREA) && ELEM(la->area_shape, LA_AREA_DISK, LA_AREA_ELLIPSE)) {
-               evli->lamptype = LAMPTYPE_AREA_ELLIPSE;
+               evli->light_type = LAMPTYPE_AREA_ELLIPSE;
        }
 
        power = light_shape_power_get(la, evli);
@@ -809,7 +809,7 @@ static void shadow_cube_random_position_set(
        add_v3_v3(ws_sample_pos, jitter);
 }
 
-static void eevee_shadow_cube_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE_LampEngineData *led, int sample_ofs)
+static void eevee_shadow_cube_setup(Object *ob, EEVEE_LightsInfo *linfo, EEVEE_LightEngineData *led, int sample_ofs)
 {
        EEVEE_ShadowCubeData *sh_data = &led->data.scd;
        EEVEE_Light *evli = linfo->light_data + sh_data->light_id;
@@ -909,7 +909,7 @@ static void frustum_min_bounding_sphere(const float corners[8][3], float r_cente
 }
 
 static void eevee_shadow_cascade_setup(
-        Object *ob, EEVEE_LampsInfo *linfo, EEVEE_LampEngineData *led,
+        Object *ob, EEVEE_LightsInfo *linfo, EEVEE_LightEngineData *led,
         DRWMatrixState *saved_mats, float view_near, float view_far, int sample_ofs)
 {
        Light *la = (Light *)ob->data;
@@ -919,7 +919,7 @@ static void eevee_shadow_cascade_setup(
        float (*vp_projmat)[4] = saved_mats->mat[DRW_MAT_WIN];
        bool is_persp = DRW_viewport_is_persp_get();
 
-       /* Lamps Matrices */
+       /* Lights Matrices */
        int cascade_nbr = la->cascade_count;
 
        EEVEE_ShadowCascadeData *sh_data = &led->data.scad;
@@ -1139,7 +1139,7 @@ void EEVEE_lights_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 {
        EEVEE_StorageList *stl = vedata->stl;
        EEVEE_EffectsInfo *effects = stl->effects;
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        Object *ob;
        int i;
        char *flag;
@@ -1155,7 +1155,7 @@ void EEVEE_lights_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
        }
        else {
                /* Search for deleted shadow casters and if shcaster WAS in shadow radius. */
-               /* No need to run this if we already update all lamps. */
+               /* No need to run this if we already update all lights. */
                EEVEE_LightBits past_bits = {{0}};
                EEVEE_LightBits curr_bits = {{0}};
                shcaster = backbuffer->shadow_casters;
@@ -1163,7 +1163,7 @@ void EEVEE_lights_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                for (i = 0; i < backbuffer->count; ++i, ++flag, ++shcaster) {
                        /* If the shadowcaster has been deleted or updated. */
                        if (*flag != 0) {
-                               /* Add the lamps that were intersecting with its BBox. */
+                               /* Add the lights that were intersecting with its BBox. */
                                lightbits_or(&past_bits, &shcaster->bits);
                        }
                }
@@ -1192,7 +1192,7 @@ void EEVEE_lights_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
        /* Setup shadow cube in UBO and tag for update if necessary. */
        for (i = 0; (i < MAX_SHADOW_CUBE) && (ob = linfo->shadow_cube_ref[i]); i++) {
-               EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob);
+               EEVEE_LightEngineData *led = EEVEE_light_data_ensure(ob);
 
                eevee_shadow_cube_setup(ob, linfo, led, effects->taa_current_sample - 1);
                if (lightbits_get(&update_bits, i) != 0 || linfo->soft_shadows) {
@@ -1209,13 +1209,13 @@ void EEVEE_lights_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
        }
 }
 
-/* this refresh lamps shadow buffers */
+/* this refresh lights shadow buffers */
 void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 {
        EEVEE_PassList *psl = vedata->psl;
        EEVEE_StorageList *stl = vedata->stl;
        EEVEE_EffectsInfo *effects = stl->effects;
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        const DRWContextState *draw_ctx = DRW_context_state_get();
        const float light_threshold = draw_ctx->scene->eevee.light_threshold;
        Object *ob;
@@ -1240,7 +1240,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
        }
        bool cascade_visible[MAX_SHADOW_CASCADE];
        for (i = 0; (ob = linfo->shadow_cascade_ref[i]) && (i < MAX_SHADOW_CASCADE); i++) {
-               EEVEE_LampEngineData *led = EEVEE_lamp_data_get(ob);
+               EEVEE_LightEngineData *led = EEVEE_light_data_get(ob);
                EEVEE_ShadowCascadeData *sh_data = &led->data.scad;
                float plane[4];
                normalize_m4_m4(sh_data->viewmat, ob->obmat);
@@ -1258,7 +1258,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
        DRW_stats_group_start("Cube Shadow Maps");
        /* Render each shadow to one layer of the array */
        for (i = 0; (ob = linfo->shadow_cube_ref[i]) && (i < MAX_SHADOW_CUBE); i++) {
-               EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob);
+               EEVEE_LightEngineData *led = EEVEE_light_data_ensure(ob);
                Light *la = (Light *)ob->data;
 
                if (!led->need_update || !cube_visible[i]) {
@@ -1371,7 +1371,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                        continue;
                }
 
-               EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob);
+               EEVEE_LightEngineData *led = EEVEE_light_data_ensure(ob);
                Light *la = (Light *)ob->data;
 
                EEVEE_ShadowCascadeData *evscd = &led->data.scad;
index f08295b..eec61ff 100644 (file)
@@ -1117,7 +1117,7 @@ static void material_opaque(
        Scene *scene = draw_ctx->scene;
        EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl;
        EEVEE_PassList *psl = ((EEVEE_Data *)vedata)->psl;
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
        bool use_diffuse, use_glossy, use_refract;
 
        float *color_p = &ma->r;
@@ -1318,7 +1318,7 @@ static void material_transparent(
        Scene *scene = draw_ctx->scene;
        EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl;
        EEVEE_PassList *psl = ((EEVEE_Data *)vedata)->psl;
-       EEVEE_LampsInfo *linfo = sldata->lamps;
+       EEVEE_LightsInfo *linfo = sldata->lights;
 
        const bool use_ssrefract = (
                ((ma->blend_flag & MA_BL_SS_REFRACTION) != 0) &&
@@ -1682,7 +1682,7 @@ void EEVEE_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata,
                                        static float half = 0.5f;
                                        static float error_col[3] = {1.0f, 0.0f, 1.0f};
                                        static float compile_col[3] = {0.5f, 0.5f, 0.5f};
-                                       struct GPUMaterial *gpumat = EEVEE_material_hair_get(scene, ma, sldata->lamps->shadow_method);
+                                       struct GPUMaterial *gpumat = EEVEE_material_hair_get(scene, ma, sldata->lights->shadow_method);
 
                                        switch (GPU_material_status(gpumat)) {
                                                case GPU_MAT_SUCCESS:
@@ -1719,7 +1719,7 @@ void EEVEE_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata,
                                        shgrp = EEVEE_default_shading_group_get(sldata, vedata,
                                                                                ob, psys, md,
                                                                                true, false, use_ssr,
-                                                                               sldata->lamps->shadow_method);
+                                                                               sldata->lights->shadow_method);
                                        DRW_shgroup_uniform_vec3(shgrp, "basecol", color_p, 1);
                                        DRW_shgroup_uniform_float(shgrp, "metallic", metal_p, 1);
                                        DRW_shgroup_uniform_float(shgrp, "specular", spec_p, 1);
@@ -1746,7 +1746,7 @@ void EEVEE_materials_cache_finish(EEVEE_Data *vedata)
        const View3D *v3d = draw_ctx->v3d;
        if (LOOK_DEV_OVERLAY_ENABLED(v3d)) {
                EEVEE_ViewLayerData *sldata = EEVEE_view_layer_data_ensure();
-               EEVEE_LampsInfo *linfo = sldata->lamps;
+               EEVEE_LightsInfo *linfo = sldata->lights;
                struct GPUBatch *sphere = DRW_cache_sphere_get();
                static float mat1[4][4];
                static float color[3] = {0.8f, 0.8f, 0.8f};
index a5695fa..0d168bb 100644 (file)
@@ -352,10 +352,10 @@ typedef struct EEVEE_Light {
        float spotsize, spotblend, radius, shadowid;
        float rightvec[3], sizex;
        float upvec[3], sizey;
-       float forwardvec[3], lamptype;
+       float forwardvec[3], light_type;
 } EEVEE_Light;
 
-/* Special type for elliptic area lamps, matches lamps_lib.glsl */
+/* Special type for elliptic area lights, matches lamps_lib.glsl */
 #define LAMPTYPE_AREA_ELLIPSE 100.0f
 
 typedef struct EEVEE_Shadow {
@@ -405,7 +405,7 @@ typedef struct EEVEE_ShadowCasterBuffer {
 } EEVEE_ShadowCasterBuffer;
 
 /* ************ LIGHT DATA ************* */
-typedef struct EEVEE_LampsInfo {
+typedef struct EEVEE_LightsInfo {
        int num_light, cache_num_light;
        int num_cube_layer, cache_num_cube_layer;
        int num_cascade_layer, cache_num_cascade_layer;
@@ -436,15 +436,15 @@ typedef struct EEVEE_LampsInfo {
        /* Pointers only. */
        struct EEVEE_ShadowCasterBuffer *shcaster_frontbuffer;
        struct EEVEE_ShadowCasterBuffer *shcaster_backbuffer;
-} EEVEE_LampsInfo;
+} EEVEE_LightsInfo;
 
-/* EEVEE_LampsInfo->shadow_casters_flag */
+/* EEVEE_LightsInfo->shadow_casters_flag */
 enum {
        SHADOW_CASTER_PRUNED = (1 << 0),
        SHADOW_CASTER_UPDATED = (1 << 1),
 };
 
-/* EEVEE_LampsInfo->update_flag */
+/* EEVEE_LightsInfo->update_flag */
 enum {
        LIGHT_UPDATE_SHADOW_CUBE = (1 << 0),
 };
@@ -646,7 +646,7 @@ typedef struct EEVEE_CommonUniformBuffer {
        int sss_toggle; /* bool */
        /* Specular */
        int spec_toggle; /* bool */
-       /* Lamps */
+       /* Lights */
        int la_num_light; /* int */
        /* Probes */
        int prb_num_planar; /* int */
@@ -676,8 +676,8 @@ typedef struct EEVEE_ClipPlanesUniformBuffer {
 
 /* ************** SCENE LAYER DATA ************** */
 typedef struct EEVEE_ViewLayerData {
-       /* Lamps */
-       struct EEVEE_LampsInfo *lamps;
+       /* Lights */
+       struct EEVEE_LightsInfo *lights;
 
        struct GPUUniformBuffer *light_ubo;
        struct GPUUniformBuffer *shadow_ubo;
@@ -737,7 +737,7 @@ typedef struct EEVEE_ShadowCascadeData {
 /* Theses are the structs stored inside Objects.
  * It works with even if the object is in multiple layers
  * because we don't get the same "Object *" for each layer. */
-typedef struct EEVEE_LampEngineData {
+typedef struct EEVEE_LightEngineData {
        DrawData dd;
 
        bool need_update;
@@ -748,7 +748,7 @@ typedef struct EEVEE_LampEngineData {
                struct EEVEE_ShadowCubeData scd;
                struct EEVEE_ShadowCascadeData scad;
        } data;
-} EEVEE_LampEngineData;
+} EEVEE_LightEngineData;
 
 typedef struct EEVEE_LightProbeEngineData {
        DrawData dd;
@@ -827,8 +827,8 @@ EEVEE_ObjectEngineData *EEVEE_object_data_get(Object *ob);
 EEVEE_ObjectEngineData *EEVEE_object_data_ensure(Object *ob);
 EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_get(Object *ob);
 EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_ensure(Object *ob);
-EEVEE_LampEngineData *EEVEE_lamp_data_get(Object *ob);
-EEVEE_LampEngineData *EEVEE_lamp_data_ensure(Object *ob);
+EEVEE_LightEngineData *EEVEE_light_data_get(Object *ob);
+EEVEE_LightEngineData *EEVEE_light_data_ensure(Object *ob);
 EEVEE_WorldEngineData *EEVEE_world_data_get(World *wo);
 EEVEE_WorldEngineData *EEVEE_world_data_ensure(World *wo);
 
index 816899b..53c08c4 100644 (file)
 
 static struct {
        char *volumetric_common_lib;
-       char *volumetric_common_lamps_lib;
+       char *volumetric_common_lights_lib;
 
        struct GPUShader *volumetric_clear_sh;
        struct GPUShader *volumetric_scatter_sh;
-       struct GPUShader *volumetric_scatter_with_lamps_sh;
+       struct GPUShader *volumetric_scatter_with_lights_sh;
        struct GPUShader *volumetric_integration_sh;
        struct GPUShader *volumetric_resolve_sh;
 
@@ -84,7 +84,7 @@ static void eevee_create_shader_volumes(void)
                datatoc_bsdf_common_lib_glsl,
                datatoc_volumetric_lib_glsl);
 
-       e_data.volumetric_common_lamps_lib = BLI_string_joinN(
+       e_data.volumetric_common_lights_lib = BLI_string_joinN(
                datatoc_common_view_lib_glsl,
                datatoc_common_uniforms_lib_glsl,
                datatoc_bsdf_common_lib_glsl,
@@ -104,15 +104,15 @@ static void eevee_create_shader_volumes(void)
                datatoc_volumetric_vert_glsl,
                datatoc_volumetric_geom_glsl,
                datatoc_volumetric_scatter_frag_glsl,
-               e_data.volumetric_common_lamps_lib,
+               e_data.volumetric_common_lights_lib,
                SHADER_DEFINES
                "#define VOLUMETRICS\n"
                "#define VOLUME_SHADOW\n");
-       e_data.volumetric_scatter_with_lamps_sh = DRW_shader_create_with_lib(
+       e_data.volumetric_scatter_with_lights_sh = DRW_shader_create_with_lib(
                datatoc_volumetric_vert_glsl,
                datatoc_volumetric_geom_glsl,
                datatoc_volumetric_scatter_frag_glsl,
-               e_data.volumetric_common_lamps_lib,
+               e_data.volumetric_common_lights_lib,
                SHADER_DEFINES
                "#define VOLUMETRICS\n"
                "#define VOLUME_LIGHTING\n"
@@ -416,7 +416,7 @@ void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                psl->volumetric_objects_ps = DRW_pass_create("Volumetric Properties", DRW_STATE_WRITE_COLOR |
                                                                                      DRW_STATE_ADDITIVE);
 
-               struct GPUShader *scatter_sh = (common_data->vol_use_lights) ? e_data.volumetric_scatter_with_lamps_sh
+               struct GPUShader *scatter_sh = (common_data->vol_use_lights) ? e_data.volumetric_scatter_with_lights_sh
                                                                      : e_data.volumetric_scatter_sh;
                psl->volumetric_scatter_ps = DRW_pass_create("Volumetric Scattering", DRW_STATE_WRITE_COLOR);
                grp = DRW_shgroup_empty_tri_batch_create(scatter_sh, psl->volumetric_scatter_ps,
@@ -608,11 +608,11 @@ void EEVEE_volumes_free_smoke_textures(void)
 void EEVEE_volumes_free(void)
 {
        MEM_SAFE_FREE(e_data.volumetric_common_lib);
-       MEM_SAFE_FREE(e_data.volumetric_common_lamps_lib);
+       MEM_SAFE_FREE(e_data.volumetric_common_lights_lib);
 
        DRW_SHADER_FREE_SAFE(e_data.volumetric_clear_sh);
        DRW_SHADER_FREE_SAFE(e_data.volumetric_scatter_sh);
-       DRW_SHADER_FREE_SAFE(e_data.volumetric_scatter_with_lamps_sh);
+       DRW_SHADER_FREE_SAFE(e_data.volumetric_scatter_with_lights_sh);
        DRW_SHADER_FREE_SAFE(e_data.volumetric_integration_sh);
        DRW_SHADER_FREE_SAFE(e_data.volumetric_resolve_sh);
 }
index 64473d9..b7e03b2 100644 (file)
@@ -29,7 +29,7 @@ struct LightData {
        vec4 spotdata_radius_shadow;  /* x : spot size, y : spot blend, z : radius, w: shadow id */
        vec4 rightvec_sizex;          /* xyz: Normalized up vector, w: area size X or spot scale X */
        vec4 upvec_sizey;             /* xyz: Normalized right vector, w: area size Y or spot scale Y */
-       vec4 forwardvec_type;         /* xyz: Normalized forward vector, w: Lamp Type */
+       vec4 forwardvec_type;         /* xyz: Normalized forward vector, w: Light Type */
 };
 
 /* convenience aliases */
index 9c5a212..b8dff69 100644 (file)
@@ -27,7 +27,7 @@ layout(std140) uniform common_block {
        bool sssToggle;
        /* Specular */
        bool specToggle;
-       /* Lamps */
+       /* Lights */
        int laNumLight;
        /* Probes */
        int prbNumPlanar;
index 5a73950..e12d765 100644 (file)
@@ -19,7 +19,7 @@ layout(std140) uniform light_block {
 #define SUN            1.0
 #define SPOT           2.0
 #define AREA_RECT      4.0
-/* Used to define the area lamp shape, doesn't directly correspond to a Blender lamp type. */
+/* Used to define the area light shape, doesn't directly correspond to a Blender light type. */
 #define AREA_ELLIPSE 100.0
 
 #if defined(SHADOW_VSM)
index 6fb8ebc..3d5b8f6 100644 (file)
@@ -194,7 +194,7 @@ void CLOSURE_NAME(
        vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0);
 
        /* ---------------------------------------------------------------- */
-       /* -------------------- SCENE LAMPS LIGHTING ---------------------- */
+       /* -------------------- SCENE LIGHTS LIGHTING --------------------- */
        /* ---------------------------------------------------------------- */
 
 #ifdef CLOSURE_GLOSSY
@@ -241,13 +241,13 @@ void CLOSURE_NAME(
        }
 
 #ifdef CLOSURE_GLOSSY
-       vec3 brdf_lut_lamps = texture(utilTex, vec3(lut_uv, 1.0)).rgb;
-       out_spec *= F_area(f0, brdf_lut_lamps.xy) * brdf_lut_lamps.z;
+       vec3 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).rgb;
+       out_spec *= F_area(f0, brdf_lut_lights.xy) * brdf_lut_lights.z;
 #endif
 
 #ifdef CLOSURE_CLEARCOAT
-       vec3 brdf_lut_lamps_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).rgb;
-       out_spec_clear *= F_area(vec3(0.04), brdf_lut_lamps_clear.xy) * brdf_lut_lamps_clear.z;
+       vec3 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).rgb;
+       out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy) * brdf_lut_lights_clear.z;
        out_spec += out_spec_clear * C_intensity;
 #endif
 
index dbc2929..8792c64 100644 (file)
@@ -26,7 +26,7 @@ void prep_specular(
 /* Normalized Blinn shading */
 vec4 blinn_specular(vec4 shininess, vec4 spec_angle, vec4 NL)
 {
-       /* Pi is already divided in the lamp power.
+       /* Pi is already divided in the light power.
         * normalization_factor = (shininess + 8.0) / (8.0 * M_PI) */
        vec4 normalization_factor = shininess * 0.125 + 1.0;
        vec4 spec_light = pow(spec_angle, shininess) * NL * normalization_factor;
index 259605b..8d5518a 100644 (file)
@@ -69,7 +69,7 @@ struct GPUMaterial;
 struct GPUShader;
 struct GPUTexture;
 struct GPUUniformBuffer;
-struct LampEngineData;
+struct LightEngineData;
 struct Object;
 struct ParticleSystem;
 struct RenderEngineType;
index 72729cd..845cab6 100644 (file)
@@ -78,16 +78,16 @@ static struct DRWShapeCache {
        GPUBatch *drw_field_vortex;
        GPUBatch *drw_field_tube_limit;
        GPUBatch *drw_field_cone_limit;
-       GPUBatch *drw_lamp;
-       GPUBatch *drw_lamp_shadows;
-       GPUBatch *drw_lamp_sunrays;
-       GPUBatch *drw_lamp_area_square;
-       GPUBatch *drw_lamp_area_disk;
-       GPUBatch *drw_lamp_hemi;
-       GPUBatch *drw_lamp_spot;
-       GPUBatch *drw_lamp_spot_volume;
-       GPUBatch *drw_lamp_spot_square;
-       GPUBatch *drw_lamp_spot_square_volume;
+       GPUBatch *drw_light;
+       GPUBatch *drw_light_shadows;
+       GPUBatch *drw_light_sunrays;
+       GPUBatch *drw_light_area_square;
+       GPUBatch *drw_light_area_disk;
+       GPUBatch *drw_light_hemi;
+       GPUBatch *drw_light_spot;
+       GPUBatch *drw_light_spot_volume;
+       GPUBatch *drw_light_spot_square;
+       GPUBatch *drw_light_spot_square_volume;
        GPUBatch *drw_speaker;
        GPUBatch *drw_lightprobe_cube;
        GPUBatch *drw_lightprobe_planar;
@@ -1295,13 +1295,13 @@ GPUBatch *DRW_cache_field_cone_limit_get(void)
 /** \} */
 
 /* -------------------------------------------------------------------- */
-/** \name Lamps
+/** \name Lights
  * \{ */
 
-GPUBatch *DRW_cache_lamp_get(void)
+GPUBatch *DRW_cache_light_get(void)
 {
 #define NSEGMENTS 8
-       if (!SHC.drw_lamp) {
+       if (!SHC.drw_light) {
                float v[2];
 
                /* Position Only 3D format */
@@ -1324,16 +1324,16 @@ GPUBatch *DRW_cache_lamp_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, a + 1, v);
                }
 
-               SHC.drw_lamp = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp;
+       return SHC.drw_light;
 #undef NSEGMENTS
 }
 
-GPUBatch *DRW_cache_lamp_shadows_get(void)
+GPUBatch *DRW_cache_light_shadows_get(void)
 {
 #define NSEGMENTS 10
-       if (!SHC.drw_lamp_shadows) {
+       if (!SHC.drw_light_shadows) {
                float v[2];
 
                /* Position Only 3D format */
@@ -1356,15 +1356,15 @@ GPUBatch *DRW_cache_lamp_shadows_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, a + 1, v);
                }
 
-               SHC.drw_lamp_shadows = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_shadows = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_shadows;
+       return SHC.drw_light_shadows;
 #undef NSEGMENTS
 }
 
-GPUBatch *DRW_cache_lamp_sunrays_get(void)
+GPUBatch *DRW_cache_light_sunrays_get(void)
 {
-       if (!SHC.drw_lamp_sunrays) {
+       if (!SHC.drw_light_sunrays) {
                float v[2], v1[2], v2[2];
 
                /* Position Only 2D format */
@@ -1392,14 +1392,14 @@ GPUBatch *DRW_cache_lamp_sunrays_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, a * 4 + 3, v2);
                }
 
-               SHC.drw_lamp_sunrays = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_sunrays = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_sunrays;
+       return SHC.drw_light_sunrays;
 }
 
-GPUBatch *DRW_cache_lamp_area_square_get(void)
+GPUBatch *DRW_cache_light_area_square_get(void)
 {
-       if (!SHC.drw_lamp_area_square) {
+       if (!SHC.drw_light_area_square) {
                float v1[3] = {0.0f, 0.0f, 0.0f};
 
                /* Position Only 3D format */
@@ -1426,15 +1426,15 @@ GPUBatch *DRW_cache_lamp_area_square_get(void)
                v1[1] = 0.5f;
                GPU_vertbuf_attr_set(vbo, attr_id.pos, 7, v1);
 
-               SHC.drw_lamp_area_square = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_area_square = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_area_square;
+       return SHC.drw_light_area_square;
 }
 
-GPUBatch *DRW_cache_lamp_area_disk_get(void)
+GPUBatch *DRW_cache_light_area_disk_get(void)
 {
 #define NSEGMENTS 32
-       if (!SHC.drw_lamp_area_disk) {
+       if (!SHC.drw_light_area_disk) {
                /* Position Only 3D format */
                static GPUVertFormat format = { 0 };
                static struct { uint pos; } attr_id;
@@ -1456,16 +1456,16 @@ GPUBatch *DRW_cache_lamp_area_disk_get(void)
                copy_v3_fl3(v, 0.0f, 0.5f, 0.0f);
                GPU_vertbuf_attr_set(vbo, attr_id.pos, (2 * NSEGMENTS) - 1, v);
 
-               SHC.drw_lamp_area_disk = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_area_disk = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_area_disk;
+       return SHC.drw_light_area_disk;
 #undef NSEGMENTS
 }
 
-GPUBatch *DRW_cache_lamp_hemi_get(void)
+GPUBatch *DRW_cache_light_hemi_get(void)
 {
 #define CIRCLE_RESOL 32
-       if (!SHC.drw_lamp_hemi) {
+       if (!SHC.drw_light_hemi) {
                float v[3];
                int vidx = 0;
 
@@ -1519,17 +1519,17 @@ GPUBatch *DRW_cache_lamp_hemi_get(void)
                }
 
 
-               SHC.drw_lamp_hemi = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_hemi = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_hemi;
+       return SHC.drw_light_hemi;
 #undef CIRCLE_RESOL
 }
 
 
-GPUBatch *DRW_cache_lamp_spot_get(void)
+GPUBatch *DRW_cache_light_spot_get(void)
 {
 #define NSEGMENTS 32
-       if (!SHC.drw_lamp_spot) {
+       if (!SHC.drw_light_spot) {
                /* a single ring of vertices */
                float p[NSEGMENTS][2];
                float n[NSEGMENTS][3];
@@ -1588,16 +1588,16 @@ GPUBatch *DRW_cache_lamp_spot_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 3, neg[(i) % NSEGMENTS]);
                }
 
-               SHC.drw_lamp_spot = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_spot = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_spot;
+       return SHC.drw_light_spot;
 #undef NSEGMENTS
 }
 
-GPUBatch *DRW_cache_lamp_spot_volume_get(void)
+GPUBatch *DRW_cache_light_spot_volume_get(void)
 {
 #define NSEGMENTS 32
-       if (!SHC.drw_lamp_spot_volume) {
+       if (!SHC.drw_light_spot_volume) {
                /* a single ring of vertices */
                float p[NSEGMENTS][2];
                for (int i = 0; i < NSEGMENTS; ++i) {
@@ -1633,15 +1633,15 @@ GPUBatch *DRW_cache_lamp_spot_volume_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, v);
                }
 
-               SHC.drw_lamp_spot_volume = GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_spot_volume = GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_spot_volume;
+       return SHC.drw_light_spot_volume;
 #undef NSEGMENTS
 }
 
-GPUBatch *DRW_cache_lamp_spot_square_get(void)
+GPUBatch *DRW_cache_light_spot_square_get(void)
 {
-       if (!SHC.drw_lamp_spot_square) {
+       if (!SHC.drw_light_spot_square) {
                float p[5][3] = {
                        { 0.0f,  0.0f,  0.0f},
                        { 1.0f,  1.0f, -1.0f},
@@ -1670,14 +1670,14 @@ GPUBatch *DRW_cache_lamp_spot_square_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[((i + 1) % 4) + 1]);
                }
 
-               SHC.drw_lamp_spot_square = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_spot_square = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_spot_square;
+       return SHC.drw_light_spot_square;
 }
 
-GPUBatch *DRW_cache_lamp_spot_square_volume_get(void)
+GPUBatch *DRW_cache_light_spot_square_volume_get(void)
 {
-       if (!SHC.drw_lamp_spot_square_volume) {
+       if (!SHC.drw_light_spot_square_volume) {
                float p[5][3] = {
                        { 0.0f,  0.0f,  0.0f},
                        { 1.0f,  1.0f, -1.0f},
@@ -1704,9 +1704,9 @@ GPUBatch *DRW_cache_lamp_spot_square_volume_get(void)
                        GPU_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[(i % 4) + 1]);
                }
 
-               SHC.drw_lamp_spot_square_volume = GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, NULL, GPU_BATCH_OWNS_VBO);
+               SHC.drw_light_spot_square_volume = GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, NULL, GPU_BATCH_OWNS_VBO);
        }
-       return SHC.drw_lamp_spot_square_volume;
+       return SHC.drw_light_spot_square_volume;
 }
 
 /** \} */
index 21c5e08..1be2f4d 100644 (file)
@@ -80,17 +80,17 @@ struct GPUBatch *DRW_cache_field_cone_limit_get(void);
 /* Grease Pencil */
 struct GPUBatch *DRW_cache_gpencil_axes_get(void);
 
-/* Lamps */
-struct GPUBatch *DRW_cache_lamp_get(void);
-struct GPUBatch *DRW_cache_lamp_shadows_get(void);
-struct GPUBatch *DRW_cache_lamp_sunrays_get(void);
-struct GPUBatch *DRW_cache_lamp_area_square_get(void);
-struct GPUBatch *DRW_cache_lamp_area_disk_get(void);
-struct GPUBatch *DRW_cache_lamp_hemi_get(void);
-struct GPUBatch *DRW_cache_lamp_spot_get(void);
-struct GPUBatch *DRW_cache_lamp_spot_volume_get(void);
-struct GPUBatch *DRW_cache_lamp_spot_square_get(void);
-struct GPUBatch *DRW_cache_lamp_spot_square_volume_get(void);
+/* Lights */
+struct GPUBatch *DRW_cache_light_get(void);
+struct GPUBatch *DRW_cache_light_shadows_get(void);
+struct GPUBatch *DRW_cache_light_sunrays_get(void);
+struct GPUBatch *DRW_cache_light_area_square_get(void);
+struct GPUBatch *DRW_cache_light_area_disk_get(void);
+struct GPUBatch *DRW_cache_light_hemi_get(void);
+struct GPUBatch *DRW_cache_light_spot_get(void);
+struct GPUBatch *DRW_cache_light_spot_volume_get(void);
+struct GPUBatch *DRW_cache_light_spot_square_get(void);
+struct GPUBatch *DRW_cache_light_spot_square_volume_get(void);
 
 /* Camera */
 struct GPUBatch *DRW_cache_camera_get(void);
index fee9c4f..2647bbb 100644 (file)
@@ -59,7 +59,7 @@ void DRW_globals_update(void)
        UI_COLOR_RGBA_FROM_U8(0x88, 0xFF, 0xFF, 155, gb->colorLibrarySelect);
        UI_COLOR_RGBA_FROM_U8(0x55, 0xCC, 0xCC, 155, gb->colorLibrary);
        UI_GetThemeColor4fv(TH_TRANSFORM, gb->colorTransform);
-       UI_GetThemeColor4fv(TH_LAMP, gb->colorLamp);
+       UI_GetThemeColor4fv(TH_LIGHT, gb->colorLight);
        UI_GetThemeColor4fv(TH_SPEAKER, gb->colorSpeaker);
        UI_GetThemeColor4fv(TH_CAMERA, gb->colorCamera);
        UI_GetThemeColor4fv(TH_EMPTY, gb->colorEmpty);
@@ -136,11 +136,11 @@ void DRW_globals_update(void)
 
        UI_GetThemeColorShadeAlpha4fv(TH_TRANSFORM, 0, -80, gb->colorDeselect);
        UI_GetThemeColorShadeAlpha4fv(TH_WIRE, 0, -30, gb->colorOutline);
-       UI_GetThemeColorShadeAlpha4fv(TH_LAMP, 0, 255, gb->colorLampNoAlpha);
+       UI_GetThemeColorShadeAlpha4fv(TH_LIGHT, 0, 255, gb->colorLightNoAlpha);
 
-       gb->sizeLampCenter = (U.obcenter_dia + 1.5f) * U.pixelsize;
-       gb->sizeLampCircle = U.pixelsize * 9.0f;
-       gb->sizeLampCircleShadow = gb->sizeLampCircle + U.pixelsize * 3.0f;
+       gb->sizeLightCenter = (U.obcenter_dia + 1.5f) * U.pixelsize;
+       gb->sizeLightCircle = U.pixelsize * 9.0f;
+       gb->sizeLightCircleShadow = gb->sizeLightCircle + U.pixelsize * 3.0f;
 
        /* M_SQRT2 to be at least the same size of the old square */
        gb->sizeVertex = U.pixelsize * (max_ff(1.0f, UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f));
@@ -971,7 +971,7 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color
                        theme_id = (active) ? TH_ACTIVE : TH_SELECT;
                }
                else {
-                       if (ob->type == OB_LAMP) theme_id = TH_LAMP;
+                       if (ob->type == OB_LAMP) theme_id = TH_LIGHT;
                        else if (ob->type == OB_SPEAKER) theme_id = TH_SPEAKER;
                        else if (ob->type == OB_CAMERA) theme_id = TH_CAMERA;
                        else if (ob->type == OB_EMPTY) theme_id = TH_EMPTY;
@@ -1001,7 +1001,7 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color
                                case TH_SPEAKER:      *r_color = G_draw.block.colorSpeaker; break;
                                case TH_CAMERA:       *r_color = G_draw.block.colorCamera; break;
                                case TH_EMPTY:        *r_color = G_draw.block.colorEmpty; break;
-                               case TH_LAMP:         *r_color = G_draw.block.colorLamp; break;
+                               case TH_LIGHT:         *r_color = G_draw.block.colorLight; break;
                                default:              *r_color = G_draw.block.colorWire; break;
                        }
                }
@@ -1024,7 +1024,7 @@ float *DRW_color_background_blend_get(int theme_id)
                case TH_SPEAKER:      ret = colors[6]; break;
                case TH_CAMERA:       ret = colors[7]; break;
                case TH_EMPTY:        ret = colors[8]; break;
-               case TH_LAMP:         ret = colors[9]; break;
+               case TH_LIGHT:         ret = colors[9]; break;
                default:              ret = colors[10]; break;
        }
 
index a570312..cfef867 100644 (file)
@@ -50,7 +50,7 @@ typedef struct GlobalsUboStorage {
        float colorLibrarySelect[4];
        float colorLibrary[4];
        float colorTransform[4];
-       float colorLamp[4];
+       float colorLight[4];
        float colorSpeaker[4];
        float colorCamera[4];
        float colorEmpty[4];
@@ -76,7 +76,7 @@ typedef struct GlobalsUboStorage {
 
        float colorDeselect[4];
        float colorOutline[4];
-       float colorLampNoAlpha[4];
+       float colorLightNoAlpha[4];
 
        float colorBackground[4];
        float colorEditMeshMiddle[4];
@@ -110,7 +110,7 @@ typedef struct GlobalsUboStorage {
        /* NOTE! Put all color before UBO_LAST_COLOR */
 
        /* Pack individual float at the end of the buffer to avoid alignment errors */
-       float sizeLampCenter, sizeLampCircle, sizeLampCircleShadow;
+       float sizeLightCenter, sizeLightCircle, sizeLightCircleShadow;
        float sizeVertex, sizeEdge, sizeEdgeFix, sizeFaceDot;
        float gridDistance, gridResolution, gridSubdivisions, gridScale;
 
index 4b87442..02d400c 100644 (file)
@@ -204,28 +204,28 @@ typedef struct OBJECT_ShadingGroupList {
        /* MetaBalls */
        DRWShadingGroup *mball_handle;
 
-       /* Lamps */
-       DRWShadingGroup *lamp_center;
-       DRWShadingGroup *lamp_groundpoint;
-       DRWShadingGroup *lamp_groundline;
-       DRWShadingGroup *lamp_circle;
-       DRWShadingGroup *lamp_circle_shadow;
-       DRWShadingGroup *lamp_sunrays;
-       DRWShadingGroup *lamp_distance;
-       DRWShadingGroup *lamp_buflimit;
-       DRWShadingGroup *lamp_buflimit_points;
-       DRWShadingGroup *lamp_area_sphere;
-       DRWShadingGroup *lamp_area_square;
-       DRWShadingGroup *lamp_area_disk;
-       DRWShadingGroup *lamp_hemi;
-       DRWShadingGroup *lamp_spot_cone;
-       DRWShadingGroup *lamp_spot_blend;
-       DRWShadingGroup *lamp_spot_pyramid;
-       DRWShadingGroup *lamp_spot_blend_rect;
-       DRWShadingGroup *lamp_spot_volume;
-       DRWShadingGroup *lamp_spot_volume_rect;
-       DRWShadingGroup *lamp_spot_volume_outside;
-       DRWShadingGroup *lamp_spot_volume_rect_outside;
+       /* Lights */
+       DRWShadingGroup *light_center;
+       DRWShadingGroup *light_groundpoint;
+       DRWShadingGroup *light_groundline;
+       DRWShadingGroup *light_circle;
+       DRWShadingGroup *light_circle_shadow;
+       DRWShadingGroup *light_sunrays;
+       DRWShadingGroup *light_distance;
+       DRWShadingGroup *light_buflimit;
+       DRWShadingGroup *light_buflimit_points;
+       DRWShadingGroup *light_area_sphere;
+       DRWShadingGroup *light_area_square;
+       DRWShadingGroup *light_area_disk;
+       DRWShadingGroup *light_hemi;
+       DRWShadingGroup *light_spot_cone;
+       DRWShadingGroup *light_spot_blend;
+       DRWShadingGroup *light_spot_pyramid;
+       DRWShadingGroup *light_spot_blend_rect;
+       DRWShadingGroup *light_spot_volume;
+       DRWShadingGroup *light_spot_volume_rect;
+       DRWShadingGroup *light_spot_volume_outside;
+       DRWShadingGroup *light_spot_volume_rect_outside;
 
        /* Helpers */
        DRWShadingGroup *relationship_lines;
@@ -1156,7 +1156,7 @@ static void OBJECT_cache_init(void *vedata)
        for (int i = 0; i < 2; ++i) {
                OBJECT_ShadingGroupList *sgl = (i == 1) ? &stl->g_data->sgl_ghost : &stl->g_data->sgl;
 
-               /* Non Meshes Pass (Camera, empties, lamps ...) */
+               /* Non Meshes Pass (Camera, empties, lights ...) */
                struct GPUBatch *geom;
                struct GPUShader *sh;
 
@@ -1304,57 +1304,57 @@ static void OBJECT_cache_init(void *vedata)
                /* Metaballs Handles */
                sgl->mball_handle = shgroup_instance_mball_handles(sgl->non_meshes, draw_ctx->sh_cfg);
 
-               /* Lamps */
+               /* Lights */
                /* TODO
-                * for now we create multiple times the same VBO with only lamp center coordinates
+                * for now we create multiple times the same VBO with only light center coordinates
                 * but ideally we would only create it once */
 
                /* start with buflimit because we don't want stipples */
                geom = DRW_cache_single_line_get();
-               sgl->lamp_buflimit = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_buflimit = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               sgl->lamp_center = shgroup_dynpoints_uniform_color(sgl->non_meshes, gb->colorLampNoAlpha, &gb->sizeLampCenter, draw_ctx->sh_cfg);
+               sgl->light_center = shgroup_dynpoints_uniform_color(sgl->non_meshes, gb->colorLightNoAlpha, &gb->sizeLightCenter, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_get();
-               sgl->lamp_circle = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLampCircle, draw_ctx->sh_cfg);
-               geom = DRW_cache_lamp_shadows_get();
-               sgl->lamp_circle_shadow = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLampCircleShadow, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_get();
+               sgl->light_circle = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLightCircle, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_shadows_get();
+               sgl->light_circle_shadow = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLightCircleShadow, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_sunrays_get();
-               sgl->lamp_sunrays = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLampCircle, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_sunrays_get();
+               sgl->light_sunrays = shgroup_instance_screenspace(sgl->non_meshes, geom, &gb->sizeLightCircle, draw_ctx->sh_cfg);
 
-               sgl->lamp_groundline = shgroup_groundlines_uniform_color(sgl->non_meshes, gb->colorLamp, draw_ctx->sh_cfg);
-               sgl->lamp_groundpoint = shgroup_groundpoints_uniform_color(sgl->non_meshes, gb->colorLamp, draw_ctx->sh_cfg);
+               sgl->light_groundline = shgroup_groundlines_uniform_color(sgl->non_meshes, gb->colorLight, draw_ctx->sh_cfg);
+               sgl->light_groundpoint = shgroup_groundpoints_uniform_color(sgl->non_meshes, gb->colorLight, draw_ctx->sh_cfg);
 
                geom = DRW_cache_screenspace_circle_get();
-               sgl->lamp_area_sphere = shgroup_instance_screen_aligned(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_area_sphere = shgroup_instance_screen_aligned(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_area_square_get();
-               sgl->lamp_area_square = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_area_square_get();
+               sgl->light_area_square = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_area_disk_get();
-               sgl->lamp_area_disk = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_area_disk_get();
+               sgl->light_area_disk = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_hemi_get();
-               sgl->lamp_hemi = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_hemi_get();
+               sgl->light_hemi = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
                geom = DRW_cache_single_line_get();
-               sgl->lamp_distance = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_distance = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
                geom = DRW_cache_single_line_endpoints_get();
-               sgl->lamp_buflimit_points = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_buflimit_points = shgroup_distance_lines_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_spot_get();
-               sgl->lamp_spot_cone = shgroup_spot_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_spot_get();
+               sgl->light_spot_cone = shgroup_spot_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
                geom = DRW_cache_circle_get();
-               sgl->lamp_spot_blend = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_spot_blend = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_spot_square_get();
-               sgl->lamp_spot_pyramid = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_spot_square_get();
+               sgl->light_spot_pyramid = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
                geom = DRW_cache_square_get();
-               sgl->lamp_spot_blend_rect = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
+               sgl->light_spot_blend_rect = shgroup_instance(sgl->non_meshes, geom, draw_ctx->sh_cfg);
 
                /* -------- STIPPLES ------- */
 
@@ -1380,21 +1380,21 @@ static void OBJECT_cache_init(void *vedata)
                state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND | DRW_STATE_CULL_FRONT;
                sgl->spot_shapes = psl->spot_shapes[i] = DRW_pass_create("Spot Shape Pass", state);
 
-               geom = DRW_cache_lamp_spot_volume_get();
-               sgl->lamp_spot_volume = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_spot_volume_get();
+               sgl->light_spot_volume = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_spot_square_volume_get();
-               sgl->lamp_spot_volume_rect = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
+               geom = DRW_cache_light_spot_square_volume_get();
+               sgl->light_spot_volume_rect = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
 
-               geom = DRW_cache_lamp_spot_volume_get();
-               sgl->lamp_spot_volume_outside = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
-               DRW_shgroup_state_disable(sgl->lamp_spot_volume_outside, DRW_STATE_CULL_FRONT);
-               DRW_shgroup_state_enable(sgl->lamp_spot_volume_outside, DRW_STATE_CULL_BACK);
+               geom = DRW_cache_light_spot_volume_get();
+               sgl->light_spot_volume_outside = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
+               DRW_shgroup_state_disable(sgl->light_spot_volume_outside, DRW_STATE_CULL_FRONT);
+               DRW_shgroup_state_enable(sgl->light_spot_volume_outside, DRW_STATE_CULL_BACK);
 
-               geom = DRW_cache_lamp_spot_square_volume_get();
-               sgl->lamp_spot_volume_rect_outside = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
-               DRW_shgroup_state_disable(sgl->lamp_spot_volume_rect_outside, DRW_STATE_CULL_FRONT);
-               DRW_shgroup_state_enable(sgl->lamp_spot_volume_rect_outside, DRW_STATE_CULL_BACK);
+               geom = DRW_cache_light_spot_square_volume_get();
+               sgl->light_spot_volume_rect_outside = shgroup_instance_alpha(sgl->spot_shapes, geom, draw_ctx->sh_cfg);
+               DRW_shgroup_state_disable(sgl->light_spot_volume_rect_outside, DRW_STATE_CULL_FRONT);
+               DRW_shgroup_state_enable(sgl->light_spot_volume_rect_outside, DRW_STATE_CULL_BACK);
        }
 
        {
@@ -1499,52 +1499,52 @@ static void DRW_shgroup_mball_handles(OBJECT_ShadingGroupList *sgl, Object *ob,
        }
 }
 
-static void DRW_shgroup_lamp(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer *view_layer)
+static void DRW_shgroup_light(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer *view_layer)
 {
        Light *la = ob->data;
        float *color;
        int theme_id = DRW_object_wire_theme_get(ob, view_layer, &color);
        static float zero = 0.0f;
 
-       typedef struct LampEngineData {
+       typedef struct LightEngineData {
                DrawData dd;
                float shape_mat[4][4];
                float spot_blend_mat[4][4];
-       } LampEngineData;
+       } LightEngineData;
 
-       LampEngineData *lamp_engine_data =
-               (LampEngineData *)DRW_drawdata_ensure(
+       LightEngineData *light_engine_data =
+               (LightEngineData *)DRW_drawdata_ensure(
                        &ob->id,
                        &draw_engine_object_type,
-                       sizeof(LampEngineData),
+                       sizeof(LightEngineData),
                        NULL,
                        NULL);
 
-       float (*shapemat)[4] = lamp_engine_data->shape_mat;
-       float (*spotblendmat)[4] = lamp_engine_data->spot_blend_mat;
+       float (*shapemat)[4] = light_engine_data->shape_mat;
+       float (*spotblendmat)[4] = light_engine_data->spot_blend_mat;
 
        if ((ob->base_flag & (BASE_FROM_SET | BASE_FROM_DUPLI)) == 0) {
                /* Don't draw the center if it's selected or active */
-               if (theme_id == TH_LAMP) {
-                       DRW_shgroup_call_dynamic_add(sgl->lamp_center, ob->obmat[3]);
+               if (theme_id == TH_LIGHT) {
+                       DRW_shgroup_call_dynamic_add(sgl->light_center, ob->obmat[3]);
                }
        }
 
        /* First circle */
-       DRW_shgroup_call_dynamic_add(sgl->lamp_circle, ob->obmat[3], color);
+       DRW_shgroup_call_dynamic_add(sgl->light_circle, ob->obmat[3], color);
 
        /* draw dashed outer circle for shadow */
-       DRW_shgroup_call_dynamic_add(sgl->lamp_circle_shadow, ob->obmat[3], color);
+       DRW_shgroup_call_dynamic_add(sgl->light_circle_shadow, ob->obmat[3], color);
 
        /* Distance */
        if (ELEM(la->type, LA_SUN, LA_AREA)) {
-               DRW_shgroup_call_dynamic_add(sgl->lamp_distance, color, &zero, &la->dist, ob->obmat);
+               DRW_shgroup_call_dynamic_add(sgl->light_distance, color, &zero, &la->dist, ob->obmat);
        }
 
        copy_m4_m4(shapemat, ob->obmat);
 
        if (la->type == LA_SUN) {
-               DRW_shgroup_call_dynamic_add(sgl->lamp_sunrays, ob->obmat[3], color);
+               DRW_shgroup_call_dynamic_add(sgl->light_sunrays, ob->obmat[3], color);
        }
        else if (la->type == LA_SPOT) {
                float size[3], sizemat[4][4];
@@ -1565,39 +1565,39 @@ static void DRW_shgroup_lamp(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer
                mul_m4_m4m4(spotblendmat, shapemat, sizemat);
 
                if (la->mode & LA_SQUARE) {
-                       DRW_shgroup_call_dynamic_add(sgl->lamp_spot_pyramid, color, &one, shapemat);
+                       DRW_shgroup_call_dynamic_add(sgl->light_spot_pyramid, color, &one, shapemat);
 
                        /* hide line if it is zero size or overlaps with outer border,
                         * previously it adjusted to always to show it but that seems
                         * confusing because it doesn't show the actual blend size */
                        if (blend != 0.0f && blend != 1.0f) {
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_blend_rect, color, &one, spotblendmat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_blend_rect, color, &one, spotblendmat);
                        }
 
                        if (la->mode & LA_SHOW_CONE) {
 
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_volume_rect, cone_inside, &one, shapemat);
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_volume_rect_outside, cone_outside, &one, shapemat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_volume_rect, cone_inside, &one, shapemat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_volume_rect_outside, cone_outside, &one, shapemat);
                        }
                }
                else {
-                       DRW_shgroup_call_dynamic_add(sgl->lamp_spot_cone, color, shapemat);
+                       DRW_shgroup_call_dynamic_add(sgl->light_spot_cone, color, shapemat);
 
                        /* hide line if it is zero size or overlaps with outer border,
                         * previously it adjusted to always to show it but that seems
                         * confusing because it doesn't show the actual blend size */
                        if (blend != 0.0f && blend != 1.0f) {
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_blend, color, &one, spotblendmat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_blend, color, &one, spotblendmat);
                        }
 
                        if (la->mode & LA_SHOW_CONE) {
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_volume, cone_inside, &one, shapemat);
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_spot_volume_outside, cone_outside, &one, shapemat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_volume, cone_inside, &one, shapemat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_spot_volume_outside, cone_outside, &one, shapemat);
                        }
                }
 
-               DRW_shgroup_call_dynamic_add(sgl->lamp_buflimit, color, &la->clipsta, &la->clipend, ob->obmat);
-               DRW_shgroup_call_dynamic_add(sgl->lamp_buflimit_points, color, &la->clipsta, &la->clipend, ob->obmat);
+               DRW_shgroup_call_dynamic_add(sgl->light_buflimit, color, &la->clipsta, &la->clipend, ob->obmat);
+               DRW_shgroup_call_dynamic_add(sgl->light_buflimit_points, color, &la->clipsta, &la->clipend, ob->obmat);
        }
        else if (la->type == LA_AREA) {
                float size[3] = {1.0f, 1.0f, 1.0f}, sizemat[4][4];
@@ -1609,10 +1609,10 @@ static void DRW_shgroup_lamp(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer
                }
 
                if (ELEM(la->area_shape, LA_AREA_DISK, LA_AREA_ELLIPSE)) {
-                       DRW_shgroup_call_dynamic_add(sgl->lamp_area_disk, color, &la->area_size, shapemat);
+                       DRW_shgroup_call_dynamic_add(sgl->light_area_disk, color, &la->area_size, shapemat);
                }
                else {
-                       DRW_shgroup_call_dynamic_add(sgl->lamp_area_square, color, &la->area_size, shapemat);
+                       DRW_shgroup_call_dynamic_add(sgl->light_area_square, color, &la->area_size, shapemat);
                }
        }
 
@@ -1622,12 +1622,12 @@ static void DRW_shgroup_lamp(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer
                shapemat[0][1] = shapemat[0][2] = 0.0f;
                shapemat[1][0] = shapemat[1][2] = 0.0f;
                shapemat[2][0] = shapemat[2][1] = 0.0f;
-               DRW_shgroup_call_dynamic_add(sgl->lamp_area_sphere, color, &la->area_size, shapemat);
+               DRW_shgroup_call_dynamic_add(sgl->light_area_sphere, color, &la->area_size, shapemat);
        }
 
        /* Line and point going to the ground */
-       DRW_shgroup_call_dynamic_add(sgl->lamp_groundline, ob->obmat[3]);
-       DRW_shgroup_call_dynamic_add(sgl->lamp_groundpoint, ob->obmat[3]);
+       DRW_shgroup_call_dynamic_add(sgl->light_groundline, ob->obmat[3]);
+       DRW_shgroup_call_dynamic_add(sgl->light_groundpoint, ob->obmat[3]);
 }
 
 static GPUBatch *batch_camera_path_get(
@@ -2539,16 +2539,16 @@ static void DRW_shgroup_lightprobe(
                                normalize_m4_m4(clipmat, ob->obmat);
                                mul_m4_m4m4(clipmat, clipmat, cubefacemat[i]);
 
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_buflimit, color, &prb->clipsta, &prb->clipend, clipmat);
-                               DRW_shgroup_call_dynamic_add(sgl->lamp_buflimit_points, color, &prb->clipsta, &prb->clipend, clipmat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_buflimit, color, &prb->clipsta, &prb->clipend, clipmat);
+                               DRW_shgroup_call_dynamic_add(sgl->light_buflimit_points, color, &prb->clipsta, &prb->clipend, clipmat);
                        }
                }
        }
 
        /* Line and point going to the ground */
        if (prb->type == LIGHTPROBE_TYPE_CUBE) {
-               DRW_shgroup_call_dynamic_add(sgl->lamp_groundline, ob->obmat[3]);
-               DRW_shgroup_call_dynamic_add(sgl->lamp_groundpoint, ob->obmat[3]);
+               DRW_shgroup_call_dynamic_add(sgl->light_groundline, ob->obmat[3]);
+               DRW_shgroup_call_dynamic_add(sgl->light_groundpoint, ob->obmat[3]);
        }
 }
 
@@ -3045,7 +3045,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
                        if (hide_object_extra) {
                                break;
                        }
-                       DRW_shgroup_lamp(sgl, ob, view_layer);
+                       DRW_shgroup_light(sgl, ob, view_layer);
                        break;
                case OB_CAMERA:
                        if (hide_object_extra) {
index 1cb8a44..88540b1 100644 (file)
@@ -10,7 +10,7 @@ layout(std140) uniform globalsBlock {
        vec4 colorLibrarySelect;
        vec4 colorLibrary;
        vec4 colorTransform;
-       vec4 colorLamp;
+       vec4 colorLight;
        vec4 colorSpeaker;
        vec4 colorCamera;
        vec4 colorEmpty;
@@ -35,7 +35,7 @@ layout(std140) uniform globalsBlock {
        vec4 colorFaceDot;
        vec4 colorDeselect;
        vec4 colorOutline;
-       vec4 colorLampNoAlpha;
+       vec4 colorLightNoAlpha;
 
        vec4 colorBackground;
        vec4 colorEditMeshMiddle;
@@ -66,9 +66,9 @@ layout(std140) uniform globalsBlock {
        vec4 colorGridAxisY;
        vec4 colorGridAxisZ;
 
-       float sizeLampCenter;
-       float sizeLampCircle;
-       float sizeLampCircleShadow;
+       float sizeLightCenter;
+       float sizeLightCircle;
+       float sizeLightCircleShadow;
        float sizeVertex;
        float sizeEdge;
        float sizeEdgeFix;
index b4a6254..22e1c75 100644 (file)
@@ -1504,7 +1504,7 @@ static void *acf_dslight_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings s
        }
 }
 
-/* lamp expander type define */
+/* light expander type define */
 static bAnimChannelType ACF_DSLIGHT =
 {
        "Light Expander",               /* type name */
index bd279e9..c29a2f4 100644 (file)
@@ -2449,7 +2449,7 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b
 
                /* sub-data filtering... */
                switch (ob->type) {
-                       case OB_LAMP:  /* lamp - textures + nodetree */
+                       case OB_LAMP:  /* light - textures + nodetree */
                        {
                                Light *la = ob->data;
                                bNodeTree *ntree = la->nodetree;
index a25f9c0..85b2ccf 100644 (file)
@@ -156,7 +156,7 @@ typedef enum ThemeColorID {
        TH_KEYBORDER,
        TH_KEYBORDER_SELECT,
 
-       TH_LAMP,
+       TH_LIGHT,
        TH_SPEAKER,
        TH_CAMERA,
        TH_EMPTY,
index b8fb513..eaa3da8 100644 (file)
@@ -282,7 +282,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
                                        cp = ts->syntaxr; break;
                                case TH_WIRE_EDIT:
                                        cp = ts->wire_edit; break;
-                               case TH_LAMP:
+                               case TH_LIGHT:
                                        cp = ts->lamp; break;
                                case TH_SPEAKER:
                                        cp = ts->speaker; break;
index 88713b3..f06343a 100644 (file)
@@ -866,7 +866,7 @@ static bool select_grouped_siblings(bContext *C, Object *ob)
        CTX_DATA_END;
        return changed;
 }
-static bool select_grouped_lamptype(bContext *C, Object *ob)
+static bool select_grouped_lighttype(bContext *C, Object *ob)
 {
        Light *la = ob->data;
 
@@ -1038,7 +1038,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
                                BKE_report(op->reports, RPT_ERROR, "Active object must be a light");
                                break;
                        }
-                       changed |= select_grouped_lamptype(C, ob);
+                       changed |= select_grouped_lighttype(C, ob);
                        break;
                default:
                        break;
index ee9df67..ebc6f35 100644 (file)
@@ -1287,14 +1287,14 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
 /* -------------------------------------------------------------------- */
 /** \name Transform Axis Target
  *
- * Note this is an experemental operator to point lamps/cameras at objects.
+ * Note this is an experemental operator to point lights/cameras at objects.
  * We may re-work how this behaves based on user feedback.
  * - campbell.
  * \{ */
 
 /* When using multiple objects, apply their relative rotational offset to the active object. */
 #define USE_RELATIVE_ROTATION
-/* Disable overlays, ignoring user setting (lamp wire gets in the way). */
+/* Disable overlays, ignoring user setting (light wire gets in the way). */
 #define USE_RENDER_OVERRIDE
 /* Calculate a depth if the cursor isn't already over a depth (not essential but feels buggy without). */
 #define USE_FAKE_DEPTH_INIT
@@ -1366,7 +1366,7 @@ static bool object_is_target_compat(const Object *ob)
                        return true;
                }
        }
-       /* We might want to enable this later, for now just lamps */
+       /* We might want to enable this later, for now just lights. */
 #if 0
        else if (ob->type == OB_CAMERA) {
                return true;
index bacafba..53c9f42 100644 (file)
@@ -492,7 +492,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
                        set_preview_collection(sce, view_layer, MA_LAMP);
 
                        if (sce->world) {
-                               /* Only use lighting from the lamp. */
+                               /* Only use lighting from the light. */
                                sce->world->use_nodes = false;
                                sce->world->horr = 0.0f;
                                sce->world->horg = 0.0f;
index b3c008e..38f9f1d 100644 (file)
@@ -147,7 +147,7 @@ int ED_wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
                }
 
                /* curdef should never be NULL unless this is
-                * a  lamp and BKE_object_defgroup_add_name fails */
+                * a  light and BKE_object_defgroup_add_name fails */
                return mirrdef;
        }
 
index 2bdae3f..3742a1a 100644 (file)
@@ -476,8 +476,8 @@ static int outliner_id_remap_exec(bContext *C, wmOperator *op)
        /* recreate dependency graph to include new objects */
        DEG_relations_tag_update(bmain);
 
-       /* free gpu materials, some materials depend on existing objects,
-        * such as lamps so freeing correctly refreshes */
+       /* Free gpu materials, some materials depend on existing objects,
+        * such as lights so freeing correctly refreshes. */
        GPU_materials_free(bmain);
 
        WM_event_add_notifier(C, NC_WINDOW, NULL);
index 2daa49b..131701e 100644 (file)
@@ -430,7 +430,7 @@ static eOLDrawState tree_element_active_material(
        return OL_DRAWSEL_NONE;
 }
 
-static eOLDrawState tree_element_active_lamp(
+static eOLDrawState tree_element_active_light(
         bContext *UNUSED(C), Scene *UNUSED(scene), ViewLayer *view_layer, SpaceOutliner *soops,
         TreeElement *te, const eOLSetState set)
 {
@@ -928,7 +928,7 @@ eOLDrawState tree_element_active(bContext *C, Scene *scene, ViewLayer *view_laye
                case ID_WO:
                        return tree_element_active_world(C, scene, view_layer, soops, te, set);
                case ID_LA:
-                       return tree_element_active_lamp(C, scene, view_layer, soops, te, set);
+                       return tree_element_active_light(C, scene, view_layer, soops, te, set);
                case ID_TXT:
                        return tree_element_active_text(C, scene, view_layer, soops, te, set);
                case ID_CA:
index f38613f..3d79a15 100644 (file)
@@ -171,7 +171,7 @@ static void outliner_main_region_listener(
                        ED_region_tag_redraw(ar);
                        break;
                case NC_LAMP:
-                       /* For updating lamp icons, when changing lamp type */
+                       /* For updating light icons, when changing light type */
                        if (wmn->data == ND_LIGHTING_DRAW)
                                ED_region_tag_redraw(ar);
                        break;
index 10fadd9..6475de5 100644 (file)
@@ -686,9 +686,9 @@ static void view3d_widgets(void)
        wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(
                &(const struct wmGizmoMapType_Params){SPACE_VIEW3D, RGN_TYPE_WINDOW});
 
-       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_lamp_spot);
-       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_lamp_area);
-       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_lamp_target);
+       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_light_spot);
+       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_light_area);
+       WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_light_target);
        WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_force_field);
        WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_camera);
        WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_camera_view);
index 2f9db19..9a0a804 100644 (file)
@@ -145,7 +145,7 @@ void ED_view3d_update_viewmat(
                rv3d->viewcamtexcofac[2] = rv3d->viewcamtexcofac[3] = 0.0f;
        }
 
-       /* calculate pixelsize factor once, is used for lamps and obcenters */
+       /* calculate pixelsize factor once, is used for lights and obcenters */
        {
                /* note:  '1.0f / len_v3(v1)'  replaced  'len_v3(rv3d->viewmat[0])'
                 * because of float point precision problems at large values [#23908] */
index 208470f..bd05240 100644 (file)
@@ -48,7 +48,7 @@
 /** \name Spot Light Gizmos
  * \{ */
 
-static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_light_spot_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
 {
        View3D *v3d = CTX_wm_view3d(C);
        if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
@@ -69,7 +69,7 @@ static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmGizmoGroupType *UNUS
        return false;
 }
 
-static void WIDGETGROUP_lamp_spot_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_spot_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = MEM_mallocN(sizeof(wmGizmoWrapper), __func__);
 
@@ -84,7 +84,7 @@ static void WIDGETGROUP_lamp_spot_setup(const bContext *UNUSED(C), wmGizmoGroup
        UI_GetThemeColor3fv(TH_GIZMO_SECONDARY, gz->color);
 }
 
-static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_spot_refresh(const bContext *C, wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = gzgroup->customdata;
        wmGizmo *gz = wwrapper->gizmo;
@@ -105,18 +105,18 @@ static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmGizmoGroup *gzgro
        WM_gizmo_target_property_def_rna(gz, "offset", &lamp_ptr, propname, -1);
 }
 
-void VIEW3D_GGT_lamp_spot(wmGizmoGroupType *gzgt)
+void VIEW3D_GGT_light_spot(wmGizmoGroupType *gzgt)
 {
        gzgt->name = "Spot Light Widgets";
-       gzgt->idname = "VIEW3D_GGT_lamp_spot";
+       gzgt->idname = "VIEW3D_GGT_light_spot";
 
        gzgt->flag |= (WM_GIZMOGROUPTYPE_PERSISTENT |
                      WM_GIZMOGROUPTYPE_3D |
                      WM_GIZMOGROUPTYPE_DEPTH_3D);
 
-       gzgt->poll = WIDGETGROUP_lamp_spot_poll;
-       gzgt->setup = WIDGETGROUP_lamp_spot_setup;
-       gzgt->refresh = WIDGETGROUP_lamp_spot_refresh;
+       gzgt->poll = WIDGETGROUP_light_spot_poll;
+       gzgt->setup = WIDGETGROUP_light_spot_setup;
+       gzgt->refresh = WIDGETGROUP_light_spot_refresh;
 }
 
 /** \} */
@@ -126,7 +126,7 @@ void VIEW3D_GGT_lamp_spot(wmGizmoGroupType *gzgt)
  * \{ */
 
 /* scale callbacks */
-static void gizmo_area_lamp_prop_matrix_get(
+static void gizmo_area_light_prop_matrix_get(
         const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop,
         void *value_p)
 {
@@ -138,7 +138,7 @@ static void gizmo_area_lamp_prop_matrix_get(
        matrix[1][1] = ELEM(la->area_shape, LA_AREA_RECT, LA_AREA_ELLIPSE) ? la->area_sizey : la->area_size;
 }
 
-static void gizmo_area_lamp_prop_matrix_set(
+static void gizmo_area_light_prop_matrix_set(
         const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop,
         const void *value_p)
 {
@@ -158,7 +158,7 @@ static void gizmo_area_lamp_prop_matrix_set(
        WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, la);
 }
 
-static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_light_area_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
 {
        View3D *v3d = CTX_wm_view3d(C);
        if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
@@ -177,7 +177,7 @@ static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmGizmoGroupType *UNUS
        return false;
 }
 
-static void WIDGETGROUP_lamp_area_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_area_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = MEM_mallocN(sizeof(wmGizmoWrapper), __func__);
        wwrapper->gizmo = WM_gizmo_new("GIZMO_GT_cage_2d", gzgroup, NULL);
@@ -193,7 +193,7 @@ static void WIDGETGROUP_lamp_area_setup(const bContext *UNUSED(C), wmGizmoGroup
        UI_GetThemeColor3fv(TH_GIZMO_HI, gz->color_hi);
 }
 
-static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_area_refresh(const bContext *C, wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = gzgroup->customdata;
        ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -213,25 +213,25 @@ static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmGizmoGroup *gzgro
        WM_gizmo_target_property_def_func(
                gz, "matrix",
                &(const struct wmGizmoPropertyFnParams) {
-                   .value_get_fn = gizmo_area_lamp_prop_matrix_get,
-                   .value_set_fn = gizmo_area_lamp_prop_matrix_set,
+                   .value_get_fn = gizmo_area_light_prop_matrix_get,
+                   .value_set_fn = gizmo_area_light_prop_matrix_set,
                    .range_get_fn = NULL,
                    .user_data = la,
                });
 }
 
-void VIEW3D_GGT_lamp_area(wmGizmoGroupType *gzgt)
+void VIEW3D_GGT_light_area(wmGizmoGroupType *gzgt)
 {
        gzgt->name = "Area Light Widgets";
-       gzgt->idname = "VIEW3D_GGT_lamp_area";
+       gzgt->idname = "VIEW3D_GGT_light_area";
 
        gzgt->flag |= (WM_GIZMOGROUPTYPE_PERSISTENT |
                      WM_GIZMOGROUPTYPE_3D |
                      WM_GIZMOGROUPTYPE_DEPTH_3D);
 
-       gzgt->poll = WIDGETGROUP_lamp_area_poll;
-       gzgt->setup = WIDGETGROUP_lamp_area_setup;
-       gzgt->refresh = WIDGETGROUP_lamp_area_refresh;
+       gzgt->poll = WIDGETGROUP_light_area_poll;
+       gzgt->setup = WIDGETGROUP_light_area_setup;
+       gzgt->refresh = WIDGETGROUP_light_area_refresh;
 }
 
 /** \} */
@@ -241,7 +241,7 @@ void VIEW3D_GGT_lamp_area(wmGizmoGroupType *gzgt)
 /** \name Light Target Gizmo
  * \{ */
 
-static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_light_target_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
 {
        View3D *v3d = CTX_wm_view3d(C);
        if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
@@ -265,7 +265,7 @@ static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmGizmoGroupType *UN
        return false;
 }
 
-static void WIDGETGROUP_lamp_target_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_target_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = MEM_mallocN(sizeof(wmGizmoWrapper), __func__);
        wwrapper->gizmo = WM_gizmo_new("GIZMO_GT_move_3d", gzgroup, NULL);
@@ -286,7 +286,7 @@ static void WIDGETGROUP_lamp_target_setup(const bContext *UNUSED(C), wmGizmoGrou
        WM_gizmo_operator_set(gz, 0, ot, NULL);
 }
 
-static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_light_target_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
 {
        wmGizmoWrapper *wwrapper = gzgroup->customdata;
        ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -299,7 +299,7 @@ static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmGizmoGroup
        if (ob->type == OB_LAMP) {
                Light *la = ob->data;
                if (la->type == LA_SPOT) {
-                       /* Draw just past the lamp size angle gizmo. */
+                       /* Draw just past the light size angle gizmo. */
                        madd_v3_v3fl(gz->matrix_basis[3], gz->matrix_basis[2], -la->spotsize);
                }
        }
@@ -307,17 +307,17 @@ static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmGizmoGroup
        WM_gizmo_set_flag(gz, WM_GIZMO_DRAW_OFFSET_SCALE, true);
 }
 
-void VIEW3D_GGT_lamp_target(wmGizmoGroupType *gzgt)
+void VIEW3D_GGT_light_target(wmGizmoGroupType *gzgt)
 {
        gzgt->name = "Target Light Widgets";
-       gzgt->idname = "VIEW3D_GGT_lamp_target";
+       gzgt->idname = "VIEW3D_GGT_light_target";
 
        gzgt->flag |= (WM_GIZMOGROUPTYPE_PERSISTENT |
                      WM_GIZMOGROUPTYPE_3D);
 
-       gzgt->poll = WIDGETGROUP_lamp_target_poll;
-       gzgt->setup = WIDGETGROUP_lamp_target_setup;
-       gzgt->draw_prepare = WIDGETGROUP_lamp_target_draw_prepare;
+       gzgt->poll = WIDGETGROUP_light_target_poll;
+       gzgt->setup = WIDGETGROUP_light_target_setup;
+       gzgt->draw_prepare = WIDGETGROUP_light_target_draw_prepare;
 }
 
 /** \} */
index 1d38b00..d929ac8 100644 (file)
@@ -245,9 +245,9 @@ struct ARegion *view3d_has_tools_region(struct ScrArea *sa);
 extern const char *view3d_context_dir[]; /* doc access */
 
 /* view3d_widgets.c */
-void VIEW3D_GGT_lamp_spot(struct wmGizmoGroupType *gzgt);
-void VIEW3D_GGT_lamp_area(struct wmGizmoGroupType *gzgt);
-void VIEW3D_GGT_lamp_target(struct wmGizmoGroupType *gzgt);
+void VIEW3D_GGT_light_spot(struct wmGizmoGroupType *gzgt);
+void VIEW3D_GGT_light_area(struct wmGizmoGroupType *gzgt);
+void VIEW3D_GGT_light_target(struct wmGizmoGroupType *gzgt);
 void VIEW3D_GGT_camera(struct wmGizmoGroupType *gzgt);
 void VIEW3D_GGT_camera_view(struct wmGizmoGroupType *gzgt);
 void VIEW3D_GGT_force_field(struct wmGizmoGroupType *gzgt);
index 8a34328..ab2d09e 100644 (file)
@@ -1337,7 +1337,7 @@ void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], c
  * \param ofs: The view offset to be set, normally from RegionView3D.ofs.
  * \param quat: The view rotation to be set, quaternion normally from RegionView3D.viewquat.
  * \param dist: The view distance from ofs to be set, normally from RegionView3D.dist.
- * \param lens: The view lens angle set for cameras and lamps, normally from View3D.lens.
+ * \param lens: The view lens angle set for cameras and lights, normally from View3D.lens.
  */
 void ED_view3d_from_object(const Object *ob, float ofs[3], float quat[4], float *dist, float *lens)
 {
index bdaf3d5..03cb21e 100644 (file)
@@ -314,7 +314,7 @@ typedef enum eGPUBuiltinShader {
        /* lines */
        GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR,
        GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR,
-       /* lamp drawing */
+       /* light drawing */
        GPU_SHADER_3D_GROUNDPOINT,
        GPU_SHADER_3D_GROUNDLINE,
        GPU_SHADER_3D_SCREENSPACE_VARIYING_COLOR,
index e7924f5..ac5cd93 100644 (file)
@@ -59,7 +59,7 @@ typedef struct GPUColorBandBuilder {
 } GPUColorBandBuilder;
 
 struct GPUMaterial {
-       Scene *scene; /* DEPRECATED was only useful for lamps */
+       Scene *scene; /* DEPRECATED was only useful for lights. */
        Material *ma;
 
        eGPUMaterialStatus status;
index 3060025..155f971 100644 (file)
@@ -549,7 +549,7 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
  * - parse name from right to left
  * - last character is channel ID, 1 char like 'A' 'R' 'G' 'B' 'X' 'Y' 'Z' 'W' 'U' 'V'
  * - separated with a dot; the Pass name (like "Depth", "Color", "Diffuse" or "Combined")
- * - separated with a dot: the Layer name (like "Lamp1" or "Walls" or "Characters")
+ * - separated with a dot: the Layer name (like "Light1" or "Walls" or "Characters")
  */
 
 static ListBase exrhandles = {NULL, NULL};
index c220b37..2478ee2 100644 (file)
@@ -90,7 +90,7 @@ typedef struct Light {
        struct bNodeTree *nodetree;
 } Light;
 
-/* **************** LAMP ********************* */
+/* **************** LIGHT ********************* */
 
 /* flag */
 #define LA_DS_EXPAND    (1 << 0)
@@ -121,8 +121,8 @@ typedef struct Light {
 /* #define LA_NO_DIFF          (1 << 11) */ /* not used anywhere */
 /* #define LA_NO_SPEC          (1 << 12) */ /* not used anywhere */
 /* #define LA_SHAD_RAY         (1 << 13) */ /* not used anywhere - cleaned */
-/* yafray: lamp shadowbuffer flag, softlight */
-/* Since it is used with LOCAL lamp, can't use LA_SHAD */
+/* yafray: light  shadowbuffer flag, softlight */
+/* Since it is used with LOCAL light, can't use LA_SHAD */
 /* #define LA_YF_SOFT          (1 << 14) */ /* not used anymore */
 /* #define LA_LAYER_SHADOW     (1 << 15) */ /* not used anymore */
 /* #define LA_SHAD_TEX         (1 << 16) */ /* not used anymore */
index 2349028..117ad1c 100644 (file)
@@ -150,7 +150,7 @@ typedef struct Material {
 
        /* Ror buttons and render. */
        char pr_type, use_nodes;
-       short pr_lamp, pr_texture;
+       short pr_light, pr_texture;
 
        /* Index for render passes. */
        short index;
@@ -195,7 +195,7 @@ typedef struct Material {
 /* **************** MATERIAL ********************* */
 
 /* maximum number of materials per material array.
- * (on object, mesh, lamp, etc.). limited by
+ * (on object, mesh, light, etc.). limited by
  * short mat_nr in verts, faces.
  * -1 because for active material we store the index + 1 */
 #define MAXMAT                 (32767-1)
index 5fbcf10..b34d79a 100644 (file)
@@ -78,7 +78,7 @@ typedef struct MTex {
        float lifefac, sizefac, ivelfac, fieldfac;
        float twistfac;
 
-       /* lamp */
+       /* light */
        float shadowfac;
 
        /* world */
@@ -405,7 +405,7 @@ typedef struct ColorMapping {
 #define TEX_RGB                1
 #define TEX_NOR                2
 
-/* pr_texture in material, world, lamp, */
+/* pr_texture in material, world, light. */
 #define TEX_PR_TEXTURE 0
 #define TEX_PR_OTHER   1
 #define TEX_PR_BOTH            2
index f6cfbff..e88f7a4 100644 (file)
@@ -112,7 +112,7 @@ void register_node_type_sh_uvalongstroke(void);
 void register_node_type_sh_eevee_metallic(void);
 void register_node_type_sh_eevee_specular(void);
 
-void register_node_type_sh_output_lamp(void);
+void register_node_type_sh_output_light(void);
 void register_node_type_sh_output_material(void);
 void register_node_type_sh_output_eevee_material(void);
 void register_node_type_sh_output_world(void);
index efd390c..e9afefe 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_output_lamp_in[] = {
+static bNodeSocketTemplate sh_node_output_light_in[] = {
        {       SOCK_SHADER, 1, N_("Surface"),          0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       },
 };
 
 /* node type definition */
-void register_node_type_sh_output_lamp(void)
+void register_node_type_sh_output_light(void)
 {
        static bNodeType ntype;
 
        sh_node_type_base(&ntype, SH_NODE_OUTPUT_LIGHT, "Light Output", NODE_CLASS_OUTPUT, 0);
-       node_type_socket_templates(&ntype, sh_node_output_lamp_in, NULL);
+       node_type_socket_templates(&ntype, sh_node_output_light_in, NULL);
        node_type_init(&ntype, NULL);
        node_type_storage(&ntype, "", NULL, NULL);