Logo Search packages:      
Sourcecode: blender version File versions  Download package

Mesh::MEdge Class Reference

List of all members.


Detailed Description

The MEdge object
================
      This object holds mesh edge data.
@ivar v1: The first vertex of the edge.
@type v1: MVert
@ivar v2: The second vertex of the edge.
@type v2: MVert
@ivar length: The length of the edge, same as (ed.v1.co-ed.v2.co).length where "ed" is an MEdge.
@type length: float
@ivar crease: The crease value of the edge. It is in the range [0,255].
@type crease: int
@ivar flag: The bitfield describing edge properties. See L{EdgeFlags}.
      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'
@type flag: int
@ivar index: The edge's index within the mesh.  Read-only.
@type index: int
@ivar sel: The edge's B{edit mode} selection state (selected=1).  B{Note}:
changing the select state of an edge changes the select state of the edge's
vertices.
@type sel: int
@ivar key: The 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))
@type key: tuple

Definition at line 345 of file Mesh.py.


Public Member Functions

def __iter__

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index