Merge branch 'blender-v5.1-release'

This commit is contained in:
Campbell Barton 2026-02-16 06:58:32 +11:00
commit d9a3da8367
13 changed files with 45 additions and 44 deletions

View file

@ -417,7 +417,7 @@ def basename(path):
def native_pathsep(path):
"""
Replace the path separator with the systems native ``os.sep``.
Replace the path separator with the system's native ``os.sep``.
:param path: The path to replace.
:type path: str

View file

@ -688,7 +688,7 @@ static PyObject *bpy_bmloop_edge_get(BPy_BMLoop *self, void * /*closure*/)
PyDoc_STRVAR(
/* Wrap. */
bpy_bmloop_face_doc,
"The face this loop makes (read-only).\n"
"The face this loop belongs to (read-only).\n"
"\n"
":type: :class:`bmesh.types.BMFace`\n");
static PyObject *bpy_bmloop_face_get(BPy_BMLoop *self, void * /*closure*/)
@ -2680,7 +2680,7 @@ PyDoc_STRVAR(
"\n"
" :param vert: a vert in this edge.\n"
" :type vert: :class:`bmesh.types.BMVert`\n"
" :return: The edges other vert.\n"
" :return: The edge's other vert.\n"
" :rtype: :class:`bmesh.types.BMVert` | None\n");
static PyObject *bpy_bmedge_other_vert(BPy_BMEdge *self, BPy_BMVert *value)
{
@ -2849,7 +2849,7 @@ PyDoc_STRVAR(
"\n"
" Return the area of the face.\n"
"\n"
" :return: Return the area of the face.\n"
" :return: The area of the face.\n"
" :rtype: float\n");
static PyObject *bpy_bmface_calc_area(BPy_BMFace *self)
{
@ -2864,7 +2864,7 @@ PyDoc_STRVAR(
"\n"
" Return the perimeter of the face.\n"
"\n"
" :return: Return the perimeter of the face.\n"
" :return: The perimeter of the face.\n"
" :rtype: float\n");
static PyObject *bpy_bmface_calc_perimeter(BPy_BMFace *self)
{
@ -3041,14 +3041,14 @@ PyDoc_STRVAR(
bpy_bmloop_copy_from_face_interp_doc,
".. method:: copy_from_face_interp(face, vert=True, multires=True)\n"
"\n"
" Interpolate the customdata from a face onto this loop (the loops vert should "
" Interpolate the customdata from a face onto this loop (the loop's vert should "
"overlap the face).\n"
"\n"
" :param face: The face to interpolate data from.\n"
" :type face: :class:`bmesh.types.BMFace`\n"
" :param vert: When enabled, interpolate the loops vertex data (optional).\n"
" :param vert: When enabled, interpolate the loop's vertex data (optional).\n"
" :type vert: bool\n"
" :param multires: When enabled, interpolate the loops multires data (optional).\n"
" :param multires: When enabled, interpolate the loop's multires data (optional).\n"
" :type multires: bool\n");
static PyObject *bpy_bmloop_copy_from_face_interp(BPy_BMLoop *self, PyObject *args)
{
@ -3689,7 +3689,7 @@ PyDoc_STRVAR(
bpy_bmelemseq_ensure_lookup_table_doc,
".. method:: ensure_lookup_table()\n"
"\n"
" Ensure internal data needed for int subscription is initialized with "
" Ensure internal data needed for int subscript access is initialized with "
"verts/edges/faces, eg ``bm.verts[index]``.\n"
"\n"
" This needs to be called again after adding/removing data in this sequence.\n");

View file

@ -174,7 +174,7 @@ static PyObject *bpy_bmlayercollection_active_get(BPy_BMLayerItem *self, void *
PyDoc_STRVAR(
/* Wrap. */
bpy_bmlayercollection_is_singleton_doc,
"True if there can exists only one layer of this type (read-only).\n"
"True if there can exist only one layer of this type (read-only).\n"
"\n"
":type: bool\n");
static PyObject *bpy_bmlayercollection_is_singleton_get(BPy_BMLayerItem *self, void * /*flag*/)
@ -187,7 +187,7 @@ static PyObject *bpy_bmlayercollection_is_singleton_get(BPy_BMLayerItem *self, v
PyDoc_STRVAR(
/* Wrap. */
bpy_bmlayercollection_name_doc,
"The layers unique name (read-only).\n"
"The layer's unique name (read-only).\n"
"\n"
":type: str\n");
static PyObject *bpy_bmlayeritem_name_get(BPy_BMLayerItem *self, void * /*flag*/)

View file

@ -64,7 +64,7 @@ struct BPy_BMLoopUV {
PyDoc_STRVAR(
/* Wrap. */
bpy_bmloopuv_uv_doc,
"Loops UV (as a 2D Vector).\n"
"Loop UV (as a 2D Vector).\n"
"\n"
":type: :class:`mathutils.Vector`\n");
static PyObject *bpy_bmloopuv_uv_get(BPy_BMLoopUV *self, void * /*closure*/)

View file

@ -148,7 +148,7 @@ PyDoc_STRVAR(
"\n"
" Discard an element from the selection history.\n"
"\n"
" Like remove but doesn't raise an error when the elements not in the selection list.\n"
" Like remove but doesn't raise an error when the element is not in the selection list.\n"
"\n"
" :param element: The element to discard.\n"
" :type element: :class:`BMVert` | :class:`BMEdge` | :class:`BMFace`\n");

View file

@ -717,7 +717,7 @@ PyDoc_STRVAR(
bpy_bm_utils_face_flip_doc,
".. method:: face_flip(face)\n"
"\n"
" Flip the faces direction.\n"
" Flip the face's direction.\n"
"\n"
" :param face: Face to flip.\n"
" :type face: :class:`bmesh.types.BMFace`\n");

View file

@ -133,13 +133,13 @@ PyDoc_STRVAR(
" :param fontid: The id of the typeface as returned by :func:`blf.load`, for default "
"font use 0.\n"
" :type fontid: int\n"
" :param r: red channel 0.0 - 1.0.\n"
" :param r: Red channel 0.0 - 1.0.\n"
" :type r: float\n"
" :param g: green channel 0.0 - 1.0.\n"
" :param g: Green channel 0.0 - 1.0.\n"
" :type g: float\n"
" :param b: blue channel 0.0 - 1.0.\n"
" :param b: Blue channel 0.0 - 1.0.\n"
" :type b: float\n"
" :param a: alpha channel 0.0 - 1.0.\n"
" :param a: Alpha channel 0.0 - 1.0.\n"
" :type a: float\n");
static PyObject *py_blf_color(PyObject * /*self*/, PyObject *args)
{
@ -170,7 +170,7 @@ PyDoc_STRVAR(
" :param fontid: The id of the typeface as returned by :func:`blf.load`, for default "
"font use 0.\n"
" :type fontid: int\n"
" :param text: the text to draw.\n"
" :param text: The text to draw.\n"
" :type text: str\n");
static PyObject *py_blf_draw(PyObject * /*self*/, PyObject *args)
{
@ -197,7 +197,7 @@ PyDoc_STRVAR(
" :param fontid: The id of the typeface as returned by :func:`blf.load`, for default "
"font use 0.\n"
" :type fontid: int\n"
" :param text: the text to draw.\n"
" :param text: The text to draw.\n"
" :type text: str\n");
static PyObject *py_blf_draw_buffer(PyObject * /*self*/, PyObject *args)
{
@ -224,9 +224,9 @@ PyDoc_STRVAR(
" :param fontid: The id of the typeface as returned by :func:`blf.load`, for default "
"font use 0.\n"
" :type fontid: int\n"
" :param text: the text to draw.\n"
" :param text: The text to measure.\n"
" :type text: str\n"
" :return: the width and height of the text.\n"
" :return: The width and height of the text.\n"
" :rtype: tuple[float, float]\n");
static PyObject *py_blf_dimensions(PyObject * /*self*/, PyObject *args)
{
@ -455,9 +455,9 @@ PyDoc_STRVAR(
"\n"
" Load a new font.\n"
"\n"
" :param filepath: the filepath of the font.\n"
" :param filepath: The filepath of the font.\n"
" :type filepath: str | bytes\n"
" :return: the new font's fontid or -1 if there was an error.\n"
" :return: The new font's fontid or -1 if there was an error.\n"
" :rtype: int\n");
static PyObject *py_blf_load(PyObject * /*self*/, PyObject *args)
{
@ -483,7 +483,7 @@ PyDoc_STRVAR(
"\n"
" Unload an existing font.\n"
"\n"
" :param filepath: the filepath of the font.\n"
" :param filepath: The filepath of the font.\n"
" :type filepath: str | bytes\n");
static PyObject *py_blf_unload(PyObject * /*self*/, PyObject *args)
{

View file

@ -264,7 +264,7 @@ static PyMethodDef Py_ImBuf_methods[] = {
PyDoc_STRVAR(
/* Wrap. */
py_imbuf_size_doc,
"size of the image in pixels.\n"
"Size of the image in pixels.\n"
"\n"
":type: tuple[int, int]\n");
static PyObject *py_imbuf_size_get(Py_ImBuf *self, void * /*closure*/)
@ -277,7 +277,7 @@ static PyObject *py_imbuf_size_get(Py_ImBuf *self, void * /*closure*/)
PyDoc_STRVAR(
/* Wrap. */
py_imbuf_ppm_doc,
"pixels per meter.\n"
"Pixels per meter.\n"
"\n"
":type: tuple[float, float]\n");
static PyObject *py_imbuf_ppm_get(Py_ImBuf *self, void * /*closure*/)
@ -310,7 +310,7 @@ static int py_imbuf_ppm_set(Py_ImBuf *self, PyObject *value, void * /*closure*/)
PyDoc_STRVAR(
/* Wrap. */
py_imbuf_filepath_doc,
"filepath associated with this image.\n"
"Filepath associated with this image.\n"
"\n"
":type: str\n");
static PyObject *py_imbuf_filepath_get(Py_ImBuf *self, void * /*closure*/)
@ -508,7 +508,7 @@ PyDoc_STRVAR(
"\n"
" :param size: The size of the image in pixels.\n"
" :type size: tuple[int, int]\n"
" :return: the newly created image.\n"
" :return: The newly created image.\n"
" :rtype: :class:`ImBuf`\n");
static PyObject *M_imbuf_new(PyObject * /*self*/, PyObject *args, PyObject *kw)
{
@ -570,9 +570,9 @@ PyDoc_STRVAR(
"\n"
" Load an image from a file.\n"
"\n"
" :param filepath: the filepath of the image.\n"
" :param filepath: The filepath of the image.\n"
" :type filepath: str | bytes\n"
" :return: the newly loaded image.\n"
" :return: The newly loaded image.\n"
" :rtype: :class:`ImBuf`\n");
static PyObject *M_imbuf_load(PyObject * /*self*/, PyObject *args, PyObject *kw)
{
@ -620,7 +620,7 @@ PyDoc_STRVAR(
"\n"
" :param buffer: A buffer containing the image data.\n"
" :type buffer: collections.abc.Buffer\n"
" :return: the newly loaded image.\n"
" :return: The newly loaded image.\n"
" :rtype: :class:`ImBuf`\n");
static PyObject *M_imbuf_load_from_buffer(PyObject * /*self*/, PyObject *args, PyObject *kw)
{
@ -679,9 +679,9 @@ PyDoc_STRVAR(
"\n"
" Write an image.\n"
"\n"
" :param image: the image to write.\n"
" :param image: The image to write.\n"
" :type image: :class:`ImBuf`\n"
" :param filepath: Optional filepath of the image (fallback to the images file path).\n"
" :param filepath: Optional filepath of the image (fallback to the image's file path).\n"
" :type filepath: str | bytes | None\n");
static PyObject *M_imbuf_write(PyObject * /*self*/, PyObject *args, PyObject *kw)
{

View file

@ -123,27 +123,27 @@ static PyStructSequence_Field app_info_fields[] = {
/* buildinfo */
{"build_date",
"The date this blender instance was built\n"
"The date this Blender instance was built\n"
"\n"
":type: bytes\n"},
{"build_time",
"The time this blender instance was built\n"
"The time this Blender instance was built\n"
"\n"
":type: bytes\n"},
{"build_commit_timestamp",
"The unix timestamp of commit this blender instance was built\n"
"The unix timestamp of the commit this Blender instance was built from\n"
"\n"
":type: int\n"},
{"build_commit_date",
"The date of commit this blender instance was built\n"
"The date of the commit this Blender instance was built from\n"
"\n"
":type: bytes\n"},
{"build_commit_time",
"The time of commit this blender instance was built\n"
"The time of the commit this Blender instance was built from\n"
"\n"
":type: bytes\n"},
{"build_hash",
"The commit hash this blender instance was built with\n"
"The commit hash this Blender instance was built with\n"
"\n"
":type: bytes\n"},
{"build_branch",

View file

@ -599,7 +599,8 @@ PyDoc_STRVAR(
" .. note::\n"
" You should really rarely need to use this function in regular addon code, as all "
"translation should be\n"
" handled by Blender internal code. The only exception are string containing formatting "
" handled by Blender internal code. "
"The only exceptions are strings containing formatting "
"(like \"File: %r\"),\n"
" but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
"\n"

View file

@ -243,7 +243,7 @@ PyDoc_STRVAR(
" :type unit_category: str\n"
" :param value: The value to convert to a string.\n"
" :type value: float\n"
" :param precision: Number of digits after the comma.\n"
" :param precision: Number of digits after the decimal point.\n"
" :type precision: int\n"
" :param split_unit: Whether to use several units if needed (1m1cm), or always only "
"one (1.01m).\n"

View file

@ -955,7 +955,7 @@ PyDoc_STRVAR(
" :type tri_p2: :class:`mathutils.Vector`\n"
" :param tri_p3: Third point of the triangle\n"
" :type tri_p3: :class:`mathutils.Vector`\n"
" :return: Point on the triangle's plane or None if its outside the triangle\n"
" :return: Point on the triangle's plane or None if it's outside the triangle\n"
" :rtype: :class:`mathutils.Vector` | None\n");
static PyObject *M_Geometry_intersect_point_tri(PyObject * /*self*/, PyObject *args)
{

View file

@ -551,7 +551,7 @@ void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
0.5f,
0.99f,
"Smooth Stroke Factor",
"Higher values gives a smoother stroke",
"Higher values give a smoother stroke",
0.5f,
0.99f);
prop = RNA_def_int(ot->srna,