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:
authorKen Hughes <khughes@pacific.edu>2005-10-11 08:09:08 +0400
committerKen Hughes <khughes@pacific.edu>2005-10-11 08:09:08 +0400
commit5380db502e6513e6d813bea62867da393a909a10 (patch)
treec2ec6475ebdff095787792dc68b2a835e9daaf27 /source/blender/python/api2_2x/doc/Mesh.py
parentb970eadedfd9b70ba08a0c99e5f3fac3c31ec1e7 (diff)
- added Mesh.MVert(); can now create 'thick' vertices which don't wrap mesh
- implemented slice operations (get/set) for vertex list; allows script writers to manipulate lists of vertices (using 'thick' vertices) - fixed problem in mesh.faces.extend() which allowed the creation of "Eeekadoodle" faces - added mesh.update() method; (possibly) temporary fix to allow updating DAG
Diffstat (limited to 'source/blender/python/api2_2x/doc/Mesh.py')
-rw-r--r--source/blender/python/api2_2x/doc/Mesh.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/Mesh.py b/source/blender/python/api2_2x/doc/Mesh.py
index 69d557fe6d0..0c0ab3b547a 100644
--- a/source/blender/python/api2_2x/doc/Mesh.py
+++ b/source/blender/python/api2_2x/doc/Mesh.py
@@ -105,11 +105,49 @@ class MVert:
each face can be independently mapped to any part of its texture.
"""
+ def __init__(coord):
+ """
+ Create a new MVert object.
+
+ Example::
+ v = Blender.Mesh.MVert(1,0,0)
+ v = Blender.Mesh.MVert(Blender.Mathutils.Vector([1,0,0]))
+ @type coord: three floats or a Vector object
+ @param coord: the coordinate values for the new vertex
+ @rtype: MVert
+ @return: a new MVert object
+ """
+
class MVertSeq:
"""
The MVertSeq object
===================
This object provides sequence and iterator access to the mesh's vertices.
+ Access and assignment of single items and slices are also supported.
+ When a single item in the vertex list is accessed, the operator[] returns
+ a MVert object which "wraps" the actual vertex in the mesh; changing any
+ of the vertex's attributes will immediately change the data in the mesh.
+ When a slice of the vertex list is accessed, however, the operator[]
+ returns a list of MVert objects which are copies of the mesh's vertex
+ data. Changes to these objects have no effect on the mesh; they must be
+ assigned back to the mesh's vertex list.
+
+ Slice assignments cannot change the vertex list size. The size of the
+ list being assigned must be the same as the specified slice; otherwise an
+ exception is thrown.
+
+ Example::
+ import Blender
+ from Blender import Mesh
+
+ me = Mesh.Get("Plane") # get the mesh data called "Plane"
+ vert = me.verts[0] # vert accesses actual mesh data
+ vert.co[0] += 2 # change the vertex's X location
+ pvert = me.verts[-2:] # pvert is COPY of mesh's last two verts
+ pvert[0].co[0] += 2 # change the vertex's X location
+ pvert[1].co[0] += 2 # change the vertex's X location
+ me.verts[-1] = pvert[1] # put change to second vertex into mesh
+
"""
def extend(coords):
@@ -410,3 +448,11 @@ class Mesh:
@param object: The Blender Object linked to the mesh.
"""
+ def update():
+ """
+ Update display lists after changes to mesh. B{Note}: with changes taking
+ place for using a directed acyclic graph (DAG) for scene and object
+ updating, this method may be only temporary and may be removed in future
+ releases.
+ """
+