Cleanup: spelling & poor wording in code & comments

This commit is contained in:
Campbell Barton 2022-04-06 19:08:10 +10:00
parent 2d2baeaf04
commit 8dd3387eb7
5 changed files with 7 additions and 8 deletions

View File

@ -9,7 +9,7 @@ StructMetaPropGroup = bpy_types.bpy_struct_meta_idprop
# StructRNA = bpy_types.Struct
# Private dummy object use for comparison only.
_sentinal = object()
_sentinel = object()
# Note that methods extended in C are defined in: 'bpy_rna_types_capi.c'
@ -51,8 +51,8 @@ class Context(StructRNA):
# Retrieve the value for `attr`.
# Match the value error exception with that of "path_resolve"
# to simplify exception handling for the caller.
value = getattr(self, attr, _sentinal)
if value is _sentinal:
value = getattr(self, attr, _sentinel)
if value is _sentinel:
raise ValueError("Path could not be resolved: %r" % attr)
if value is None:

View File

@ -562,7 +562,7 @@ static void mesh_edges_spherecast(void *userdata,
*/
/* -------------------------------------------------------------------- */
/** \name Commom Utils
/** \name Common Utils
* \{ */
static void bvhtree_from_mesh_setup_data(BVHTree *tree,

View File

@ -4399,7 +4399,7 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
knifetool_exit(op);
ED_workspace_status_text(C, NULL);
/* Exit early to prevent undo push for empty cuts. */
/* Cancel to prevent undo push for empty cuts. */
if (kcd->totkvert == 0) {
return OPERATOR_CANCELLED;
}

View File

@ -61,7 +61,7 @@ class MeshFromGeometry : NonMovable, NonCopyable {
*/
void create_uv_verts(Mesh *mesh);
/**
* Add materials and the nodetree to the Mesh Object.
* Add materials and the node-tree to the Mesh Object.
*/
void create_materials(Main *bmain,
const Map<std::string, std::unique_ptr<MTLMaterial>> &materials,

View File

@ -69,8 +69,7 @@ bool BPy_errors_to_report_ex(ReportList *reports,
return 0;
}
/* Trim trailing newlines so the report doesn't contain a trailing new-line.
* This would add a blank-line in the info space. */
/* Strip trailing newlines so the report doesn't show a blank-line in the info space. */
Py_ssize_t err_str_len;
const char *err_str = PyUnicode_AsUTF8AndSize(err_str_py, &err_str_len);
while (err_str_len > 0 && err_str[err_str_len - 1] == '\n') {