[Bf-blender-cvs] [26cda38985f] master: Docs: Clarify docs for BMesh methods
jon denning
noreply at git.blender.org
Thu May 5 17:15:46 CEST 2022
Commit: 26cda38985f98b8ddf57cf7f65b9f08793873765
Author: jon denning
Date: Thu May 5 11:08:01 2022 -0400
Branches: master
https://developer.blender.org/rB26cda38985f98b8ddf57cf7f65b9f08793873765
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
===================================================================
M source/blender/python/bmesh/bmesh_py_types.c
===================================================================
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index baa2b0deb71..64cd59ea635 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -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);
More information about the Bf-blender-cvs
mailing list