| Home | Trees | Index | Help |
|
|---|
| Module Mesh :: Class MEdge |
|
| Method Summary | |
|---|---|
| MVert |
Iterator for MEdge. |
| Instance Variable Summary | |
|---|---|
| int | crease: The crease value of the edge. |
| int | flag: The bitfield describing edge properties. |
| int | index: The edge's index within the mesh. |
| tuple | key: The edge's vert indices in an ordered tuple, which can be used as a
dictionary key. |
| float | length: The length of the edge, same as (ed.v1.co-ed.v2.co).length where
"ed" is an MEdge. |
| int | sel: The edge's edit mode selection state (selected=1). |
| MVert | v1: The first vertex of the edge. |
| MVert | v2: The second vertex of the edge. |
| Method Details |
|---|
__iter__()Iterator for MEdge. It iterates over the MVerts of the edge, returning v1 then v2.
|
| Instance Variable Details |
|---|
creaseThe crease value of the edge. It is in the range [0,255].
|
flagThe bitfield describing edge properties. SeeEdgeFlags. Example:
# This script counts fgon and non fgon edges
from Blender import Scene, Mesh
scn= Scene.GetCurrent() # Current scene, important to be scene aware
ob= scn.objects.active # last selected object
me= ob.getData(mesh=1) # thin wrapper doesn't copy mesh data like nmesh
total_fgon_eds= total_nor_eds= 0
# Look through the edges and find any fgon edges, then print the findings to the console
for ed in me.edges: # all meshes have edge data now
if ed.flag & Mesh.EdgeFlags.FGON:
total_fgon_eds+=1
else:
total_nor_eds+=1
print 'Blender has', total_fgon_eds, 'fgon edges and', total_nor_eds, 'non fgon edges'
|
indexThe edge's index within the mesh. Read-only.
|
keyThe edge's vert indices in an ordered tuple, which can be used as a dictionary key. Read-only. This is the same as (min(ed.v1.index, ed.v2.index), max(ed.v1.index, ed.v2.index))
|
lengthThe length of the edge, same as (ed.v1.co-ed.v2.co).length where "ed" is an MEdge.
|
selThe edge's edit mode selection state (selected=1). Note: changing the select state of an edge changes the select state of the edge's vertices.
|
v1The first vertex of the edge.
|
v2The second vertex of the edge.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu May 10 20:32:00 2007 | http://epydoc.sf.net |