Docs: Clarify docs for BMesh methods

The previous docs for `normal_update` methods of `BMVert`, `BMEdge`,
`BMFace`, and `BMesh` were not clear on some behaviors.  These
behaviors are listed in D14370.  This commit updates the docs to be
clearer.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D14370
This commit is contained in:
jon denning 2022-05-05 11:08:01 -04:00
parent 26bc584e01
commit 26cda38985
1 changed files with 19 additions and 4 deletions

View File

@ -1262,7 +1262,12 @@ static PyObject *bpy_bmesh_select_flush(BPy_BMesh *self, PyObject *value)
PyDoc_STRVAR(bpy_bmesh_normal_update_doc,
".. method:: normal_update()\n"
"\n"
" Update mesh normals.\n");
" Update normals of mesh faces and verts.\n"
"\n"
" .. note::\n"
"\n"
" The normal of any vertex where :attr:`is_wire` is True will be a zero vector.\n");
static PyObject *bpy_bmesh_normal_update(BPy_BMesh *self)
{
BPY_BM_CHECK_OBJ(self);
@ -1611,7 +1616,12 @@ static PyObject *bpy_bmvert_calc_shell_factor(BPy_BMVert *self)
PyDoc_STRVAR(bpy_bmvert_normal_update_doc,
".. method:: normal_update()\n"
"\n"
" Update vertex normal.\n");
" Update vertex normal.\n"
" This does not update the normals of adjoining faces.\n"
"\n"
" .. note::\n"
"\n"
" The vertex normal will be a zero vector if vertex :attr:`is_wire` is True.\n");
static PyObject *bpy_bmvert_normal_update(BPy_BMVert *self)
{
BPY_BM_CHECK_OBJ(self);
@ -1776,7 +1786,11 @@ static PyObject *bpy_bmedge_other_vert(BPy_BMEdge *self, BPy_BMVert *value)
PyDoc_STRVAR(bpy_bmedge_normal_update_doc,
".. method:: normal_update()\n"
"\n"
" Update edges vertex normals.\n");
" Update normals of all connected faces and the edge verts.\n"
"\n"
" .. note::\n"
"\n"
" The normal of edge vertex will be a zero vector if vertex :attr:`is_wire` is True.\n");
static PyObject *bpy_bmedge_normal_update(BPy_BMEdge *self)
{
BPY_BM_CHECK_OBJ(self);
@ -2012,7 +2026,8 @@ static PyObject *bpy_bmface_calc_center_bounds(BPy_BMFace *self)
PyDoc_STRVAR(bpy_bmface_normal_update_doc,
".. method:: normal_update()\n"
"\n"
" Update face's normal.\n");
" Update face normal based on the positions of the face verts.\n"
" This does not update the normals of face verts.\n");
static PyObject *bpy_bmface_normal_update(BPy_BMFace *self)
{
BPY_BM_CHECK_OBJ(self);