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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-04-01 02:09:43 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-04-01 02:09:43 +0400
commit4c36a26af5d1093badc88401bfebf8454fdf0f34 (patch)
tree2e82fc5ff893651982d20ffdd15d4c69bfcbe7b8 /doc/python_api
parent3b711a6ed009b35bb69cd0ca878eeb8d55fa0e77 (diff)
parent8f949dd58decac45fd49f9a93152f2cddc98d901 (diff)
Merged changes in the trunk up to revision 45308.
Conflicts resolved: source/blender/editors/interface/resources.c source/blender/editors/mesh/editmesh_select.c source/blender/editors/space_view3d/drawobject.c
Diffstat (limited to 'doc/python_api')
-rw-r--r--doc/python_api/rst/include__bmesh.rst29
-rw-r--r--doc/python_api/sphinx_doc_gen.py3
2 files changed, 31 insertions, 1 deletions
diff --git a/doc/python_api/rst/include__bmesh.rst b/doc/python_api/rst/include__bmesh.rst
index a8d299a5894..24f113e7b50 100644
--- a/doc/python_api/rst/include__bmesh.rst
+++ b/doc/python_api/rst/include__bmesh.rst
@@ -75,6 +75,16 @@ its good practice to call :class:`bmesh.types.BMesh.free` which will remove all
further access.
+EditMode Tessellation
+^^^^^^^^^^^^^^^^^^^^^
+
+When writing scripts that operate on editmode data you will normally want to re-calculate the tessellation after
+running the script, this needs to be called explicitly.
+
+The BMesh its self does not store the triangulated faces, they are stored in the :class:`bpy.types.Mesh`,
+to refresh tessellation faces call :class:`bpy.types.Mesh.calc_tessface`.
+
+
CustomData Access
-----------------
@@ -104,6 +114,25 @@ Here are some examples ...
print("Vert Shape: %f, %f, %f" % (shape.x, shape.y, shape.z))
+.. code-block:: python
+
+ # in this example the active vertex group index is used,
+ # this is stored in the object, not the BMesh
+ group_index = obj.vertex_groups.active_index
+
+ # only ever one deform weight layer
+ dvert_lay = bm.verts.layers.deform.active
+
+ for vert in bm.verts:
+ dvert = vert[dvert_lay]
+
+ if group_index in dvert:
+ print("Weight %f" % dvert[group_index])
+ else:
+ print("Setting Weight")
+ dvert[group_index] = 0.5
+
+
Keeping a Correct State
-----------------------
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 7cc605fc6e7..b3706de6ca0 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -343,7 +343,8 @@ MODULE_GROUPING = {
"BMLayerCollection",
"BMLayerItem",
("Custom-Data Layer Types", '-'),
- "BMLoopUV"
+ "BMLoopUV",
+ "BMDeformVert"
)
}