Cleanup: correct spelling, typos & remove outdated comment

This commit is contained in:
Campbell Barton
2025-07-17 12:30:37 +10:00
parent 4d227dd593
commit c034c928fe
8 changed files with 35 additions and 30 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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");

View File

@@ -25,7 +25,7 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_input<decl::Geometry>("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<decl::Float>("Scale").default_value(1.0f).min(0.0f).field_on({0}).description(
"Scale of the profile at each point");
b.add_input<decl::Bool>("Fill Caps")

View File

@@ -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(

View File

@@ -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<GHOST_WindowHandle>(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;
}

View File

@@ -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);