diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 04:02:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 04:26:49 +0300 |
commit | 1079742db92576d79ec89a28d95336aff847a82a (patch) | |
tree | 2e440e498c20d3205c2a64eedf4f84bf57abcb84 /source/blender/editors | |
parent | 918941483f7ec5fc6320d345c755e953b963c710 (diff) |
Cleanup: rename lamp -> light
Diffstat (limited to 'source/blender/editors')
16 files changed, 53 insertions, 53 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index b4a6254abd2..22e1c75c00e 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -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 */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index bd279e9b49e..c29a2f403c9 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -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; diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index a25f9c01584..85b2ccf2077 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -156,7 +156,7 @@ typedef enum ThemeColorID { TH_KEYBORDER, TH_KEYBORDER_SELECT, - TH_LAMP, + TH_LIGHT, TH_SPEAKER, TH_CAMERA, TH_EMPTY, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index b8fb5138109..eaa3da8c305 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -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; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 88713b36094..f06343abcae 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -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; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index ee9df67a830..ebc6f35e43e 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -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; diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index bacafbaee9b..53c9f428196 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -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; diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c index b3c008e052c..38f9f1dfa9f 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c @@ -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; } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 2bdae3fecb2..3742a1ad912 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -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); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 2daa49b1381..131701e8bcb 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -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: diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index f38613ffade..3d79a15a5a0 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -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; diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 10fadd9aaec..6475de521d9 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -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); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 2f9db19747f..9a0a804ce3f 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -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] */ diff --git a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c index 208470f76f4..bd05240c93f 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c @@ -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; } /** \} */ diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 1d38b006e14..d929ac89c4b 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -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); diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 8a343281bf1..ab2d09e0862 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -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) { |