Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjon denning <gfxcoder@gmail.com>2022-05-05 18:08:01 +0300
committerjon denning <gfxcoder@gmail.com>2022-05-05 18:08:01 +0300
commit26cda38985f98b8ddf57cf7f65b9f08793873765 (patch)
tree9c1ecd45325c531da298ceaee6cd6ab85021619a
parent26bc584e01278927ada72b040e3b4e5ab89927fe (diff)
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
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c23
1 files changed, 19 insertions, 4 deletions
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);