From c034c928fedae9bdd40ee21548c447144aae653e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Jul 2025 12:30:37 +1000 Subject: [PATCH] Cleanup: correct spelling, typos & remove outdated comment --- .../blenloader/intern/blend_validate.cc | 2 +- .../blenloader/intern/versioning_500.cc | 2 +- .../editors/space_file/fsmenu_system.cc | 29 ++++++++++--------- source/blender/makesrna/intern/rna_space.cc | 2 +- .../geometry/nodes/node_geo_curve_to_mesh.cc | 2 +- .../python/bmesh/bmesh_py_types_customdata.cc | 2 +- .../windowmanager/intern/wm_cursors.cc | 24 ++++++++------- .../blender/windowmanager/intern/wm_draw.cc | 2 +- 8 files changed, 35 insertions(+), 30 deletions(-) diff --git a/source/blender/blenloader/intern/blend_validate.cc b/source/blender/blenloader/intern/blend_validate.cc index ba1afa454d8..150b82fd78b 100644 --- a/source/blender/blenloader/intern/blend_validate.cc +++ b/source/blender/blenloader/intern/blend_validate.cc @@ -201,7 +201,7 @@ bool BLO_main_validate_shapekeys(Main *bmain, ReportList *reports) BKE_reportf(reports, RPT_ERROR, - "Shapekey %s has an invalid 'from' pointer (%p), it will be deleted", + "ShapeKey %s has an invalid 'from' pointer (%p), it will be deleted", shapekey->id.name, shapekey->from); /* NOTE: also need to remap UI data ID pointers here, since `bmain` is not the current diff --git a/source/blender/blenloader/intern/versioning_500.cc b/source/blender/blenloader/intern/versioning_500.cc index 1636ee929bc..e8f4cdc70a1 100644 --- a/source/blender/blenloader/intern/versioning_500.cc +++ b/source/blender/blenloader/intern/versioning_500.cc @@ -1119,7 +1119,7 @@ static void do_version_remove_lzo_and_lzma_compression(FileData *fd, Object *obj fd->reports, RPT_WARNING, RPT_("%s Cache in object %s can not be read because it uses an " - "outdated compression method. You need to delete the caches and rebake."), + "outdated compression method. You need to delete the caches and re-bake."), cache_type.c_str(), pid->owner_id->name + 2); } diff --git a/source/blender/editors/space_file/fsmenu_system.cc b/source/blender/editors/space_file/fsmenu_system.cc index 14286cb3e47..3828b77bce1 100644 --- a/source/blender/editors/space_file/fsmenu_system.cc +++ b/source/blender/editors/space_file/fsmenu_system.cc @@ -213,20 +213,21 @@ static void fsmenu_add_windows_quick_access(FSMenu *fsmenu, conv_utf_16_to_8(path, utf_path, FILE_MAXDIR); /* Despite the above IsFolder check, Windows considers libraries and archives to be folders. - * However, as Blender does not support opening them, they must be filtered out. #138863. - */ - const char *ext_folderlike[] = {".library-ms", - ".zip", - ".rar", - ".7z", - ".tar", - ".gz", - ".bz2", - ".zst", - ".xz", - ".cab", - ".iso", - nullptr}; + * However, as Blender does not support opening them, they must be filtered out. #138863. */ + const char *ext_folderlike[] = { + ".library-ms", + ".zip", + ".rar", + ".7z", + ".tar", + ".gz", + ".bz2", + ".zst", + ".xz", + ".cab", + ".iso", + nullptr, + }; if (!BLI_path_extension_check_array(utf_path, ext_folderlike)) { /* Add folder to the fsmenu. */ fsmenu_insert_entry(fsmenu, category, utf_path, NULL, ICON_FILE_FOLDER, flag); diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc index a64122fe802..5ddaff24285 100644 --- a/source/blender/makesrna/intern/rna_space.cc +++ b/source/blender/makesrna/intern/rna_space.cc @@ -6450,7 +6450,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) prop, "Display Channel", "Preview all channels less than or equal to this value. 0 shows every channel, and negative " - "values climb that many metastrip levels if applicable, showing every channel there."); + "values climb that many meta-strip levels if applicable, showing every channel there."); RNA_def_property_range(prop, -5, blender::seq::MAX_CHANNELS); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache"); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc index e15220d7104..b5460722f8e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc @@ -25,7 +25,7 @@ static void node_declare(NodeDeclarationBuilder &b) b.add_input("Profile Curve") .only_realized_data() .supported_type(GeometryComponent::Type::Curve) - .description("Curves that are sweeped along the main curve"); + .description("Curves that are swept along the main curve"); b.add_input("Scale").default_value(1.0f).min(0.0f).field_on({0}).description( "Scale of the profile at each point"); b.add_input("Fill Caps") diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.cc b/source/blender/python/bmesh/bmesh_py_types_customdata.cc index c528ae34d71..58c0b975fd6 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.cc @@ -125,7 +125,7 @@ PyDoc_STRVAR( PyDoc_STRVAR( /* Wrap. */ bpy_bmlayeraccess_collection__shape_doc, - "Vertex shapekey absolute location (as a 3D Vector).\n" + "Vertex shape-key absolute location (as a 3D Vector).\n" "\n" ":type: :class:`BMLayerCollection` of :class:`mathutils.Vector`"); PyDoc_STRVAR( diff --git a/source/blender/windowmanager/intern/wm_cursors.cc b/source/blender/windowmanager/intern/wm_cursors.cc index 898dcb1c6af..e66b1675ced 100644 --- a/source/blender/windowmanager/intern/wm_cursors.cc +++ b/source/blender/windowmanager/intern/wm_cursors.cc @@ -158,10 +158,10 @@ static int wm_cursor_size(const wmWindow *win) return std::lround(21.0f * UI_SCALE_FAC); } -#if (OS_MAC) - /* MacOS always scales up this type of cursor for high-dpi displays. */ - return 21; -#endif + if (OS_MAC) { + /* MacOS always scales up this type of cursor for high-dpi displays. */ + return 21; + } /* The DPI as a scale without the UI scale preference. */ const float system_scale = WM_window_dpi_get_scale(win); @@ -335,8 +335,13 @@ void WM_cursor_set(wmWindow *win, int curs) /* Option to not use any OS-supplied cursors is needed for testing. */ const bool use_only_custom_cursors = false; - if (win == nullptr || G.background) { - return; /* Can't set custom cursor before Window init. */ + if (G.background) { + return; + } + + if (win == nullptr) { + /* Can't set custom cursor before window initialization. */ + return; } if (curs == WM_CURSOR_DEFAULT && win->modalcursor) { @@ -511,7 +516,7 @@ void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2]) static void wm_cursor_warp_relative(wmWindow *win, int x, int y) { - /* NOTE: don't use wmEvent coords because of continuous grab #36409. */ + /* NOTE: don't use #wmEvent coords because of continuous grab, see: #36409. */ int cx, cy; if (wm_cursor_position_get(win, &cx, &cy)) { WM_cursor_warp(win, cx + x, cy + y); @@ -523,7 +528,7 @@ bool wm_cursor_arrow_move(wmWindow *win, const wmEvent *event) /* TODO: give it a modal keymap? Hard coded for now. */ if (win && event->val == KM_PRESS) { - /* Must move at least this much to avoid rounding in WM_cursor_warp. */ + /* Must move at least this much to avoid rounding in #WM_cursor_warp. */ float fac = GHOST_GetNativePixelSize(static_cast(win->ghostwin)); if (event->type == EVT_UPARROWKEY) { @@ -791,7 +796,6 @@ void WM_cursor_time(wmWindow *win, int nr) * which *can't* be negated. */ const uint32_t nr_abs = nr >= 0 ? uint32_t(nr) : -uint32_t(nr); - /* Use `U.ui_scale` instead of `UI_SCALE_FAC` here to ignore HiDPI/Retina scaling. */ if (WM_capabilities_flag() & WM_CAPABILITY_CURSOR_RGBA) { wm_cursor_text(win, std::to_string(nr_abs), blf_mono_font); } @@ -799,7 +803,7 @@ void WM_cursor_time(wmWindow *win, int nr) wm_cursor_time_small(win, nr_abs); } - /* Unset current cursor value so it's properly reset to wmWindow.lastcursor. */ + /* Unset current cursor value so it's properly reset to #wmWindow::lastcursor. */ win->cursor = 0; } diff --git a/source/blender/windowmanager/intern/wm_draw.cc b/source/blender/windowmanager/intern/wm_draw.cc index 5c38b567d58..c312b3e82eb 100644 --- a/source/blender/windowmanager/intern/wm_draw.cc +++ b/source/blender/windowmanager/intern/wm_draw.cc @@ -249,7 +249,7 @@ static void wm_software_cursor_draw_bitmap(const float system_scale, float gl_matrix[4][4]; eGPUTextureUsage usage = GPU_TEXTURE_USAGE_GENERAL; GPUTexture *texture = GPU_texture_create_2d( - "softeare_cursor", bitmap->data_size[0], bitmap->data_size[1], 1, GPU_RGBA8, usage, nullptr); + "software_cursor", bitmap->data_size[0], bitmap->data_size[1], 1, GPU_RGBA8, usage, nullptr); GPU_texture_update(texture, GPU_DATA_UBYTE, bitmap->data); GPU_texture_filter_mode(texture, false);