pymel.core.general.MeshFace

Inheritance diagram of MeshFace

class MeshFace(*args, **kwargs)
connectedEdges()
Return type:MeshEdge list
connectedFaces()
Return type:MeshFace list
connectedVertices()
Return type:MeshVertex list
geomChanged()

Reset the geom pointer in the MItMeshPolygon . This is now being handled automatically inside the iterator, and users should no longer need to call this method directly to sync up the iterator to changes made by MFnMesh Derived from api method maya.OpenMaya.MItMeshPolygon.geomChanged

Undo is not currently supported for this method

getArea(space='preTransform')

This method gets the area of the face

Parameters :
space : Space.Space

World Space or Object Space

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

float

Derived from api method maya.OpenMaya.MSpace.getArea

getColor(colorSetName=None)

This method gets the average color of the all the vertices in this face

Parameters :
colorSetName : unicode

Name of the color set.

Return type:

Color

Derived from api method maya.OpenMaya.MItMeshPolygon.getColor

getColorIndex(vertexIndex, colorSetName=None)

This method returns the colorIndex for a vertex of the current face.

Parameters :
vertexIndex : int

Face-relative index of vertex.

colorSetName : unicode

Name of the color set.

Return type:

int

Derived from api method maya.OpenMaya.MItMeshPolygon.getColorIndex

getColorIndices(colorSetName=None)

This method returns the colorIndices for each vertex on the face.

Parameters :
colorSetName : unicode

Name of the color set.

Return type:

int list

Derived from api method maya.OpenMaya.MItMeshPolygon.getColorIndices

getColors(colorSetName=None)

This method gets the color of the each vertex in the current face.

Parameters :
colorSetName : unicode

Name of the color set.

Return type:

Color list

Derived from api method maya.OpenMaya.MItMeshPolygon.getColors

getEdges()

This method gets the indices of the edges contained in the current face.

Return type:int list

Derived from api method maya.OpenMaya.MItMeshPolygon.getEdges

getNormal(space='preTransform')

Return the face normal of the current polygon.

Parameters :
space : Space.Space

The transformation space

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Vector

Derived from api method maya.OpenMaya.MSpace.getNormal

getNormals(space='preTransform')

Returns the normals for all vertices in the current face

Parameters :
space : Space.Space

The transformation space

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Vector list

Derived from api method maya.OpenMaya.MSpace.getNormals

getPoint(index, space='preTransform')

Return the position of the vertex at index in the current polygon.

Parameters :
index : int

The face-relative index of the vertex in the current polygon

space : Space.Space

The coordinate system for this operation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Point

Derived from api method maya.OpenMaya.MSpace.point

getPointAtUV(uvPoint, space='preTransform', uvSet=None, tolerance=0.0)

Return the position of the point at the given UV value in the current polygon.

Parameters :
uvPoint : (float, float)

The UV value to try to locate

space : Space.Space

The coordinate system for this operation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

uvSet : unicode

UV set to work with

tolerance : float

tolerance value to compare float data type

Return type:

Point

Derived from api method maya.OpenMaya.MSpace.getPointAtUV

getPoints(space='preTransform')

Retrieves the positions of the vertices on the current face/polygon that the iterator is pointing to. Vertex positions will be inserted into the given array and will be indexed using face-relative vertex IDs (ie. ordered from 0 to (vertexCount of the face) - 1), which should not be confused with the vertexIDs of each vertex in relation to the entire mesh object.

Parameters :
space : Space.Space

The coordinate system for this operation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Point list

Derived from api method maya.OpenMaya.MSpace.getPoints

getUV(vertex, uvSet=None)

Return the texture coordinate for the given vertex.

Parameters :
vertex : int

The face-relative vertex index to get UV for

uvSet : unicode

UV set to work with

Return type:

(float, float)

Derived from api method maya.OpenMaya.MItMeshPolygon.getUV

getUVArea(uvSet=None)

This method gets the UV area of the face

Parameters :
uvSet : unicode

UV set to work with

Return type:

float

Derived from api method maya.OpenMaya.MItMeshPolygon.getUVArea

getUVAtPoint(pt, space='preTransform', uvSet=None)

Find the point closest to the given point in the current polygon, and return the UV value at that point.

Parameters :
pt : Point

The point to try to get UV for

space : Space.Space

The coordinate system for this operation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

uvSet : unicode

UV set to work with

Return type:

(float, float)

Derived from api method maya.OpenMaya.MSpace.getUVAtPoint

getUVIndex(vertex, uvSet=None)

Returns the index of the texture coordinate for the given vertex. This index refers to an element of the texture coordinate array for the polygonal object returned by MFnMesh::getUVs .

Parameters :
vertex : int

The face-relative vertex index of the current polygon

uvSet : unicode

UV set to work with

Return type:

int

Derived from api method maya.OpenMaya.MItMeshPolygon.getUVIndex

getUVSetNames()

This method is used to find the UV set names mapped to the current face.

Return type:list list

Derived from api method maya.OpenMaya.MItMeshPolygon.getUVSetNames

getUVs(uvSet=None)

Return the all the texture coordinates for the vertices of this face (in local vertex order).

Parameters :
uvSet : unicode

UV set to work with

Return type:

(float list, float list)

Derived from api method maya.OpenMaya.MItMeshPolygon.getUVs

getVertices()

This method gets the indices of the vertices of the current face

Return type:int list

Derived from api method maya.OpenMaya.MItMeshPolygon.getVertices

hasColor()

This method determines whether the current face has color-per-vertex set for any vertex.

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.hasColor

hasUVs()

Tests whether this face has UV’s mapped or not (either all the vertices for a face should have UV’s, or none of them do, so the UV count for a face is either 0, or equal to the number of vertices).

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.hasUVs

hasValidTriangulation()

This method checks if the face has a valid triangulation. If it doesn’t, then the face was bad geometry: it may gave degenerate points or cross over itself.

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.hasValidTriangulation

isConnectedTo(component)
Return type:bool
isConnectedToEdge(index)

This method determines whether the given edge is connected to a vertex in the current face

Parameters :
index : int

Index of the edge to be tested for

Return type:

bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isConnectedToEdge

isConnectedToFace(index)

This method determines whether the given face is adjacent to the current face

Parameters :
index : int

Index of the face to be tested for

Return type:

bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isConnectedToFace

isConnectedToVertex(index)

This method determines whether the given vertex shares an edge with a vertex in the current face.

Parameters :
index : int

Index of the vertex to be tested for

Return type:

bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isConnectedToVertex

isConvex()

This method checks if the face is convex.

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isConvex

isHoled()

This method checks if the face has any holes.

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isHoled

isLamina()

This method checks if the face is a lamina (the face is folded over onto itself).

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isLamina

isOnBoundary()

This method determines whether the current face is on a boundary

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.onBoundary

isPlanar()

This method checks if the face is planar

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isPlanar

isStarlike()

This method checks if the face is starlike. That is, a line from the centre to any vertex lies entirely within the face.

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.isStarlike

isZeroArea()

This method checks if its a zero area face

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.zeroArea

isZeroUVArea()

This method checks if the UV area of the face is zero

Return type:bool

Derived from api method maya.OpenMaya.MItMeshPolygon.zeroUVArea

normalIndex(localVertexIndex)

Returns the normal index for the specified vertex. This index refers to an element in the normal array returned by MFnMesh::getNormals . These normals are per-polygon per-vertex normals. See the MFnMesh description for more information on normals.

Parameters :
localVertexIndex : int

The face-relative index of the vertex to examine for the current polygon

Return type:

int

Derived from api method maya.OpenMaya.MItMeshPolygon.normalIndex

numColors(colorSetName=None)

This method checks for the number of colors on vertices in this face.

Parameters :
colorSetName : unicode

Name of the color set.

Return type:

int

Derived from api method maya.OpenMaya.MItMeshPolygon.numColors

numConnectedEdges()

This method checks for the number of connected edges on the vertices of this face

Return type:int

Derived from api method maya.OpenMaya.MItMeshPolygon.numConnectedEdges

numConnectedFaces()

This method checks for the number of connected faces

Return type:int

Derived from api method maya.OpenMaya.MItMeshPolygon.numConnectedFaces

numTriangles()

This Method checks for the number of triangles in this face in the current triangulation

Return type:int

Derived from api method maya.OpenMaya.MItMeshPolygon.numTriangles

numVertices()

Return the number of vertices for the current polygon.

Return type:int

Derived from api method maya.OpenMaya.MItMeshPolygon.polygonVertexCount

polygonVertexCount()

Return the number of vertices for the current polygon.

Return type:int

Derived from api method maya.OpenMaya.MItMeshPolygon.polygonVertexCount

setPoint(point, index, space='preTransform')

Set the vertex at the given index in the current polygon.

Parameters :
point : Point

The new position for the vertex

index : int

The face-relative index of the vertex in the current polygon

space : Space.Space

The coordinate system for this operation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setPoint

setPoints(pointArray, space='preTransform')

Sets new locations for vertices of the current polygon that the iterator is pointing to.

Parameters :
pointArray : Point list

The new positions for the vertices.

space : Space.Space

The coordinate system for this operation.

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setPoints

setUV(vertexId, uvPoint, uvSet=None)

Modify the UV value for the given vertex in the current face. If the face is not already mapped, this method will fail.

Parameters :
vertexId : int

face-relative index of the vertex to set UV for.

uvPoint : (float, float)

The UV values to set it to

uvSet : unicode

UV set to work with

Derived from api method maya.OpenMaya.MItMeshPolygon.setUV

setUVs(uArray, vArray, uvSet=None)

Modify the UV value for all vertices in the current face. If the face has not already been mapped, this method will fail.

Parameters :
uArray : float list

All the U values - in local face order

vArray : float list

The corresponding V values

uvSet : unicode

UV set to work with

Derived from api method maya.OpenMaya.MItMeshPolygon.setUVs

updateSurface()

Signal that this polygonal surface has changed and needs to redraw itself. Derived from api method maya.OpenMaya.MItMeshPolygon.updateSurface

Undo is not currently supported for this method

Previous topic

pymel.core.general.MeshEdge

Next topic

pymel.core.general.MeshUV

Core

Core Modules

Other Modules

This Page