class MFnMesh



Your Ad Here

Jump to documentation

: public MFnDagNode Polygonal surface function set. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnMesh < MFnDagNode < MFnDependencyNode < MFnBase

public members:

MFnMesh ( const MObject & object, MStatus * ReturnStatus = NULL )
MObject create ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( int numVertices , int numPolygons , const MPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, const MFloatArray & uArray, const MFloatArray & vArray, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( int numVertices , int numPolygons , const MPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, const MFloatArray & uArray, const MFloatArray & vArray, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject addPolygon ( const MPointArray & vertexArray, bool mergeVertices = true, double pointTolerance = kMFnMeshPointTolerance, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject addPolygon ( const MPointArray & vertexArray, int & faceIndex, bool mergeVertices = true, double pointTolerance = kMFnMeshPointTolerance, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MStatus deleteFace (int index, MDGModifier *modifier = NULL)
MStatus deleteEdge (int index, MDGModifier *modifier = NULL)
MStatus deleteVertex (int index, MDGModifier *modifier = NULL)
enum SplitPlacement
kOnEdge
kInternalPoint
kInvalid
MStatus split ( MIntArray & placements, MIntArray & edgeList, MFloatArray & edgeFactors, MFloatPointArray & internalPoints)
MStatus subdivideFaces ( MIntArray & faceList, int divisionCount)
MStatus subdivideEdges ( MIntArray & edgeList, int divisionCount)
MStatus extrudeFaces ( MIntArray & faceList, int extrusionCount, MFloatVector * translation, bool extrudeTogether)
MStatus extrudeEdges ( MIntArray & edgeList, int extrusionCount, MFloatVector * translation, bool extrudeTogether)
MStatus duplicateFaces ( MIntArray & faceList, MFloatVector * translation)
MStatus extractFaces ( MIntArray & faceList, MFloatVector * translation)
MStatus collapseFaces ( MIntArray & faceList)
MStatus collapseEdges ( MIntArray & edgeList)
int numVertices ( MStatus * ReturnStatus = NULL) const
int numEdges ( MStatus * ReturnStatus = NULL ) const
int numPolygons ( MStatus * ReturnStatus = NULL ) const
int numFaceVertices ( MStatus * ReturnStatus = NULL ) const
int polygonVertexCount ( int polygonId, MStatus * ReturnStatus = NULL ) const
int numUVs ( MStatus * ReturnStatus = NULL ) const
int numUVs ( const MString &uvSet, MStatus * ReturnStatus = NULL ) const
int numColors ( MStatus * ReturnStatus = NULL ) const
int numColors ( const MString &colorSet, MStatus * ReturnStatus = NULL ) const
int numNormals ( MStatus * ReturnStatus = NULL ) const
MStatus getTriangles ( MIntArray & triangleCounts, MIntArray &triangleVertices ) const
static MMeshIsectAccelParams uniformGridParams ( int xDiv, int yDiv, int zDiv )
static MMeshIsectAccelParams autoUniformGridParams ()
bool closestIntersection ( const MFloatPoint & raySource, const MFloatVector & rayDirection, const MIntArray * faceIds, const MIntArray * triIds, bool idsSorted, MSpace::Space space, float maxParam, bool testBothDirections, MMeshIsectAccelParams *accelerator, MFloatPoint & hitPoint, float* hitRayParam, int* hitFace, int* hitTriangle, float* hitBary1, float* hitBary2, float tolerance = 1e-6, MStatus * ReturnStatus = NULL )
bool anyIntersection ( const MFloatPoint & raySource, const MFloatVector & rayDirection, const MIntArray * faceIds, const MIntArray * triIds, bool idsSorted, MSpace::Space space, float maxParam, bool testBothDirections, MMeshIsectAccelParams *accelerator, MFloatPoint & hitPoint, float* hitRayParam, int* hitFace, int* hitTriangle, float* hitBary1, float* hitBary2, float tolerance = 1e-6, MStatus * ReturnStatus = NULL )
bool allIntersections ( const MFloatPoint & raySource, const MFloatVector & rayDirection, const MIntArray * faceIds, const MIntArray * triIds, bool idsSorted, MSpace::Space space, float maxParam, bool testBothDirections, MMeshIsectAccelParams *accelerator, bool sortHits, MFloatPointArray & hitPoints, MFloatArray * hitRayParams, MIntArray * hitFaces, MIntArray * hitTriangles, MFloatArray * hitBary1, MFloatArray * hitBary2, float tolerance = 1e-6, MStatus * ReturnStatus = NULL )
MStatus sortIntersectionFaceTriIds ( MIntArray * faceIds, MIntArray * triIds )
MStatus freeCachedIntersectionAccelerator ()
MString cachedIntersectionAcceleratorInfo ( MStatus *ReturnStatus = NULL )
static MString globalIntersectionAcceleratorsInfo ()
static void clearGlobalIntersectionAcceleratorInfo ()
bool intersect ( const MPoint & raySource, const MVector & rayDirection, MPointArray & points, double tolerance = kMFnMeshPointTolerance, MSpace::Space space = MSpace::kObject , MIntArray * polygonIds = NULL, MStatus * ReturnStatus = NULL ) const
MStatus getClosestPointAndNormal ( const MPoint & toThisPoint, MPoint & theClosestPoint, MVector & theNormal, MSpace::Space space = MSpace::kObject , int * closestPolygon = NULL ) const
MStatus getClosestPoint (const MPoint &toThisPoint, MPoint &theClosestPoint, MSpace::Space space = MSpace::kObject , int * closestPolygon = NULL ) const
MStatus getClosestNormal (const MPoint &toThisPoint, MVector & theNormal, MSpace::Space space = MSpace::kObject , int * closestPolygon = NULL ) const
MStatus getConnectedShaders ( unsigned int instanceNumber, MObjectArray & shaders, MIntArray & indices ) const
MStatus getConnectedSetsAndMembers ( unsigned int instanceNumber, MObjectArray & sets, MObjectArray & comps, bool renderableSetsOnly ) const
MObject copy ( const MObject & source, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MStatus updateSurface ()
MStatus syncObject ()
MStatus getPoints ( MFloatPointArray & vertexArray, MSpace::Space space = MSpace::kObject ) const
MStatus getPoints ( MPointArray & vertexArray, MSpace::Space space = MSpace::kObject ) const
MStatus setPoints ( MFloatPointArray & vertexArray, MSpace::Space space = MSpace::kObject )
MStatus setPoints ( MPointArray & vertexArray, MSpace::Space space = MSpace::kObject )
MStatus getVertices ( MIntArray & vertexCount, MIntArray & vertexList ) const
MStatus getPolygonVertices ( int polygonId, MIntArray & vertexList ) const
MStatus getPolygonTriangleVertices ( int polygonId, int triangleId, int triangleVertices[3] ) const
MStatus setPoint ( int vertexId, const MPoint & pos, MSpace::Space space = MSpace::kObject )
MStatus getPoint ( int vertexId, MPoint & pos, MSpace::Space space = MSpace::kObject ) const
MStatus getNormals ( MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject ) const
MStatus setNormals ( MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject )
MStatus getFaceVertexNormal ( int faceIndex, int vertexIndex, MVector & normal, MSpace::Space space = MSpace::kObject ) const
MStatus getFaceVertexNormals ( int faceIndex, MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject ) const
MStatus getNormalIds ( MIntArray & normalIdCounts, MIntArray &normalIds ) const
MStatus getFaceNormalIds ( int faceIndex, MIntArray &normals ) const
MStatus setFaceVertexNormal ( MVector &normal, int faceIndex, int vertexIndex, MSpace::Space space = MSpace::kObject , MDGModifier *modifier = NULL)
MStatus setVertexNormal ( MVector &normal, int vertexIndex, MSpace::Space space = MSpace::kObject , MDGModifier *modifier = NULL)
MStatus setFaceVertexNormals ( MVectorArray & normalArray, MIntArray & faceList, MIntArray & vertexList, MSpace::Space space = MSpace::kObject )
MStatus setVertexNormals ( MVectorArray & normalArray, MIntArray & vertexList, MSpace::Space space = MSpace::kObject )
MStatus getVertexNormal ( int vertexId, MVector & normal, MSpace::Space space = MSpace::kObject ) const
MStatus getPolygonNormal ( int polygonId, MVector & normal, MSpace::Space space = MSpace::kObject ) const
bool isNormalLocked (int normalId, MStatus * ReturnStatus = NULL ) const
MStatus lockVertexNormals ( MIntArray & vertexList)
MStatus lockFaceVertexNormals ( MIntArray & faceList, MIntArray & vertexList)
MStatus unlockVertexNormals ( MIntArray & vertexList)
MStatus unlockFaceVertexNormals ( MIntArray & faceList, MIntArray & vertexList)
int getTangentId ( int faceIndex, int vertexIndex, MStatus * ReturnStatus = NULL ) const
MStatus getTangents ( MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL) const
MStatus getFaceVertexTangent ( int faceIndex, int vertexIndex, MVector & tangent, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL ) const
MStatus getFaceVertexTangents ( int faceIndex, MFloatVectorArray & tangents, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL ) const
MStatus getBinormals ( MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL ) const
MStatus getFaceVertexBinormal ( int faceIndex, int vertexIndex, MVector & normal, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL) const
MStatus getFaceVertexBinormals ( int faceIndex, MFloatVectorArray & normals, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL) const
bool isPolygonConvex ( int faceIndex, MStatus * ReturnStatus = NULL ) const
MStatus getEdgeVertices ( int edgeId, int2 & vertexList ) const
bool isEdgeSmooth ( int edgeId, MStatus * ReturnStatus = NULL ) const
MStatus setEdgeSmoothing ( int edgeId, bool smooth = true )
MStatus cleanupEdgeSmoothing ()
MStatus getCreaseEdges ( MUintArray &edgeIds, MDoubleArray &creaseData) const
MStatus setCreaseEdges (const MUintArray &edgeIds, const MDoubleArray &creaseData)
int numUVSets ( MStatus *ReturnStatus = NULL) const
MString createUVSetWithName (const MString &uvSetName, MDGModifier *modifier = NULL, MStatus *ReturnStatus = NULL)
MString copyUVSetWithName (const MString &fromName, const MString &toName, MDGModifier *modifier = NULL, MStatus *ReturnStatus = NULL)
MStatus renameUVSet (const MString &origName, const MString &newName, MDGModifier *modifier = NULL)
MStatus deleteUVSet (const MString &setName, MDGModifier *modifier = NULL, MSelectionList *currentSelection = NULL)
MStatus setCurrentUVSetName (const MString &setName, MDGModifier *modifier = NULL, MSelectionList *currentSelection = NULL)
MString currentUVSetName ( MStatus *ReturnStatus = NULL) const
MStatus getUVSetNames ( MStringArray &setNames) const
MStatus getFaceUVSetNames ( int polygonId, MStringArray &setNames) const
MStatus getAssociatedUVSetTextures (const MString uvSetName, MObjectArray & textures) const
MStatus setUVs ( const MFloatArray & uArray, const MFloatArray & vArray, const MString * uvSet = NULL )
MStatus setSomeUVs ( const MIntArray & uvIds, const MFloatArray & uArray, const MFloatArray & vArray, const MString * uvSet = NULL )
MStatus getUVs ( MFloatArray & uArray, MFloatArray & vArray, const MString * uvSet = NULL ) const
MStatus setUV ( int uvId, float u, float v, const MString * uvSet = NULL )
MStatus getUV ( int uvId, float & u, float & v, const MString * uvSet = NULL ) const
MStatus getPointAtUV ( int polygonId, MPoint &theClosestPoint, float2 & uvPoint, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL, float tolerance=0.0)
MStatus getUVAtPoint ( MPoint &pt, float2 & uvPoint, MSpace::Space space = MSpace::kObject , const MString * uvSet = NULL, int * closestPolygon = NULL)
MStatus getPolygonUV ( int polygonId, int vertexIndex, float & u, float & v, const MString * uvSet = NULL ) const
MStatus getPolygonUVid ( int polygonId, int vertexIndex, int &uvId, const MString * uvSet = NULL ) const
MStatus assignUV ( int polygonId, int vertexIndex, int uvId, const MString * uvSet = NULL )
MStatus assignUVs ( const MIntArray & uvCounts, const MIntArray & uvIds, const MString * uvSet = NULL )
MStatus clearUVs ( const MString * uvSet = NULL )
MStatus getAssignedUVs ( MIntArray & uvCounts, MIntArray & uvIds, const MString * uvSet = NULL ) const
int numColorSets ( MStatus *ReturnStatus = NULL) const
MString createColorSetWithName (const MString &colorSetName, MDGModifier *modifier = NULL, MStatus *ReturnStatus = NULL)
MStatus deleteColorSet (const MString &colorSetName, MDGModifier *modifier = NULL, MSelectionList *currentSelection = NULL)
MStatus setCurrentColorSetName (const MString &setName, MDGModifier *modifier = NULL, MSelectionList *currentSelection = NULL)
MString currentColorSetName ( MStatus * ReturnStatus = NULL) const
MStatus getColorSetNames ( MStringArray &setNames) const
MStatus setFaceColor ( MColor &color, int index)
MStatus setVertexColor ( MColor &color, int index, MDGModifier *modifier = NULL)
MStatus setFaceVertexColor ( MColor &color, int faceIndex, int vertexIndex, MDGModifier *modifier = NULL)
MStatus setFaceVertexColor ( int faceIndex, int localVertexIndex, MColor &color, MDGModifier *modifier = NULL)
MStatus setFaceColors ( MColorArray &colors, MIntArray &faceList)
MStatus setVertexColors ( MColorArray &colors, MIntArray &vertexList, MDGModifier *modifier = NULL)
MStatus setFaceVertexColors ( MColorArray &colors, MIntArray &faceList, MIntArray &vertexList, MDGModifier *modifier = NULL)
MStatus removeFaceColors ( MIntArray &faceList)
MStatus removeVertexColors ( MIntArray &vertexList)
MStatus removeFaceVertexColors ( MIntArray &faceList, MIntArray &vertexList)
MStatus getVertexColors ( MColorArray &colors, const MString * colorSet = NULL)
MStatus getFaceVertexColors ( MColorArray &colors, const MString *colorSet = NULL)
MStatus getFaceVertexColorIndex (int faceIndex, int localVertexIndex, int &colorIndex, const MString * colorSet = NULL)
MStatus setColors ( const MColorArray & colors, const MString * colorSet = NULL )
MStatus setSomeColors ( const MIntArray & colorIds, const MColorArray & colors, const MString * colorSet = NULL )
MStatus getColors ( MColorArray & colors, const MString * colorSet = NULL ) const
MStatus getColorIndex (int faceIndex, int localVertexIndex, int &colorIndex, const MString *colorSet = NULL )
MStatus setColor ( int colorId, const MColor &color, const MString * colorSet = NULL )
MStatus getColor ( int colorId, MColor &color, const MString * colorSet = NULL ) const
MStatus assignColor ( int polygonId, int vertexIndex, int colorId, const MString * colorSet = NULL )
MStatus assignColors ( const MIntArray & colorIds, const MString * colorSet = NULL )
MStatus clearColors ( const MString * colorSet = NULL )
int getHoles ( MIntArray & holeInfoArray, MIntArray & holeVertexArray, MStatus * ReturnStatus = NULL )
bool onBoundary ( int polygonId, MStatus * ReturnStatus = NULL) const
bool isBlindDataTypeUsed ( int blindDataId, MStatus * ReturnStatus = NULL ) const
MStatus createBlindDataType ( int blindDataId, MStringArray longNames, MStringArray shortNames, MStringArray formatNames)
bool hasBlindDataComponentId ( int compID, MFn::Type compType, int blindDataId, MStatus * ReturnStatus = NULL ) const
bool hasBlindData ( MFn::Type compType, int blindDataId, MStatus * ReturnStatus = NULL ) const
bool hasBlindDataComponentId ( int compID, MFn::Type compType, MStatus * ReturnStatus = NULL ) const
bool hasBlindData ( MFn::Type compType, MStatus * ReturnStatus = NULL ) const
MStatus getBlindDataTypes ( MFn::Type compType, MIntArray & blindDataIds ) const
MStatus getBlindDataAttrNames (int blindDataId, MStringArray & longNames, MStringArray & shortNames, MStringArray & formatNames) const
MStatus getFaceVertexBlindDataIndex (int faceIndex, int vertexIndex, int &blindDataIndex) const
MStatus getBlindDataFaceVertexIndices (int blindDataIndex, int &faceIndex, int &vertexIndex) const
MStatus getIntBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, int &data) const
MStatus getIntBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MIntArray & data) const
MStatus getFloatBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, float &data) const
MStatus getFloatBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MFloatArray & data) const
MStatus getDoubleBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, double &data) const
MStatus getDoubleBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MDoubleArray & data) const
MStatus getBoolBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, bool &data) const
MStatus getBoolBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MIntArray & data) const
MString stringBlindDataComponentId ( int compID, MFn::Type compType, int blindDataId, MString attrName, MStatus *ReturnStatus = NULL) const
MStatus getStringBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MStringArray & data) const
MString binaryBlindDataComponentId ( int compID, MFn::Type compType, int blindDataId, MString attrName, MStatus *ReturnStatus = NULL) const
MStatus getBinaryBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MStringArray & data) const
MStatus setIntBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, int data)
MStatus setIntBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, int data)
MStatus setIntBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MIntArray & data)
MStatus setFloatBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, float data)
MStatus setFloatBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, float data)
MStatus setFloatBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MFloatArray &data)
MStatus setDoubleBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, double data)
MStatus setDoubleBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, double data)
MStatus setDoubleBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MDoubleArray &data)
MStatus setBoolBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, bool data)
MStatus setBoolBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, bool data)
MStatus setBoolBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MIntArray & data)
MStatus setStringBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, MString data)
MStatus setStringBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MString data)
MStatus setStringBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MStringArray &data)
MStatus setBinaryBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, MString data)
MStatus setBinaryBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MString data)
MStatus setBinaryBlindData ( MIntArray & compIDs, MFn::Type compType, int blindDataId, MString attrName, MStringArray &data)
MStatus setBinaryBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, char *data, int length)
MStatus clearBlindData (int compID, MFn::Type compType, int blindDataId, MString attrName)
MStatus clearBlindData ( MFn::Type compType, int blindDataId, MString attrName)
MStatus clearBlindData ( MFn::Type compType)
MStatus clearBlindData (int compID, MFn::Type compType, int blindDataId)
MStatus clearBlindData ( MFn::Type compType, int blindDataId)
void setCheckSamePointTwice ( bool check = true )
bool getCheckSamePointTwice ( void )
MStatus createInPlace ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects )
MStatus copyInPlace ( const MObject & source )
MObject addPolygon ( MPointArray & vertexArray, double polyTolerance, bool mergeVertices = true, double pointTolerance = kMFnMeshPointTolerance, bool forceGeometry = true, MObject parentOrOwner = MObject::kNullObj , MStatus * ReturnStatus = NULL )
OBSOLETE & NO SCRIPT SUPPORT
bool intersect ( MPoint & raySource, MVector & rayDirection, MPointArray & points, MStatus * ReturnStatus = NULL ) const
OBSOLETE & NO SCRIPT SUPPORT
bool intersect ( const MPoint & raySource, const MVector & rayDirection, MPointArray & points, MStatus * ReturnStatus = NULL ) const
OBSOLETE & NO SCRIPT SUPPORT
MStatus getBlindDataAttrNames (int blindDataId, MStringArray & longNames, MStringArray & shortNames) const
OBSOLETE & NO SCRIPT SUPPORT
bool hasBlindData ( int compID, MFn::Type compType, int blindDataId, MStatus * ReturnStatus = NULL ) const
OBSOLETE & NO SCRIPT SUPPORT
bool hasBlindData ( int compID, MFn::Type compType, MStatus * ReturnStatus = NULL ) const
OBSOLETE & NO SCRIPT SUPPORT
MStatus createUVSet ( MString &uvSetName, MDGModifier *modifier = NULL)
NO SCRIPT SUPPORT
MStatus copyUVSet (const MString &fromName, MString &toName, MDGModifier *modifier = NULL)
NO SCRIPT SUPPORT
MStatus getCurrentUVSetName ( MString &setName) const
NO SCRIPT SUPPORT
MStatus createColorSet ( MString &colorSetName, MDGModifier *modifier = NULL)
NO SCRIPT SUPPORT
MStatus getCurrentColorSetName ( MString &setName) const
NO SCRIPT SUPPORT
MStatus getStringBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, MString &data) const
NO SCRIPT SUPPORT
MStatus getBinaryBlindData ( int compID, MFn::Type compType, int blindDataId, MString attrName, MString &data) const
NO SCRIPT SUPPORT

Inherited from MFnDagNode:

public members:

kNextPos
MObject create ( const MTypeId &typeId, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId &typeId, const MString &name, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MString &type, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MString &type, const MString &name, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
unsigned int parentCount ( MStatus * ReturnStatus = NULL ) const
MObject parent ( unsigned int i, MStatus * ReturnStatus = NULL ) const
MStatus addChild ( MObject & child , unsigned int index = kNextPos , bool keepExistingParents = false )
MStatus removeChild ( MObject & child )
MStatus removeChildAt ( unsigned int index )
unsigned int childCount ( MStatus * ReturnStatus = NULL ) const
MObject child ( unsigned int i, MStatus * ReturnStatus = NULL ) const
MObject dagRoot ( MStatus * ReturnStatus = NULL )
bool hasParent ( const MObject & node, MStatus * ReturnStatus = NULL ) const
bool hasChild (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool isChildOf (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool isParentOf (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool inUnderWorld ( MStatus * ReturnStatus = NULL ) const
bool inModel ( MStatus * ReturnStatus = NULL ) const
bool isInstanceable ( MStatus * ReturnStatus=NULL ) const
MStatus setInstanceable ( const bool how )
bool isInstanced ( bool indirect = true, MStatus * ReturnStatus = NULL ) const
bool isInstancedAttribute ( const MObject & attr, MStatus * ReturnStatus = NULL ) const
unsigned int instanceCount ( bool total, MStatus * ReturnStatus = NULL ) const
MObject duplicate ( bool instance = false, bool instanceLeaf = false, MStatus * ReturnStatus = NULL ) const
MStatus getPath ( MDagPath & path )
MStatus getAllPaths ( MDagPathArray & paths )
MString fullPathName ( MStatus *ReturnStatus = NULL)
MString partialPathName ( MStatus *ReturnStatus = NULL)
MMatrix transformationMatrix ( MStatus * ReturnStatus = NULL ) const
bool isIntermediateObject ( MStatus * ReturnStatus = NULL ) const
MStatus setIntermediateObject ( bool isIntermediate )
int objectColor ( MStatus * ReturnStatus = NULL ) const
MStatus setObjectColor ( int color )
bool usingObjectColor ( MStatus * ReturnStatus = NULL ) const
MStatus setUseObjectColor ( bool useObjectColor )
MBoundingBox boundingBox ( MStatus * ReturnStatus = NULL ) const
MDagPath dagPath ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( const MDagPath & path )
virtual MStatus setObject ( MObject & object )
MObject model ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( const MObject & object )

Inherited from MFnDependencyNode:

public members:

virtual MFn::Type type () const
enum MAttrClass
kGlobalDynamicAttr
kLocalDynamicAttr
MObject create ( const MTypeId & typeId , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId & typeId , const MString & name , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , const MString & name , MStatus * ReturnStatus = NULL )
MTypeId typeId ( MStatus * ReturnStatus = NULL ) const
MString typeName ( MStatus * ReturnStatus = NULL ) const
MString name ( MStatus * ReturnStatus = NULL ) const
MString setName ( const MString & name , MStatus * ReturnStatus = NULL )
MStatus getConnections ( MPlugArray & array ) const
unsigned int attributeCount ( MStatus * ReturnStatus=NULL) const
MObject attribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject reorderedAttribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject attribute ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MAttrClass attributeClass ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MStatus getAffectedAttributes ( const MObject & attr, MObjectArray & affectedAttributes ) const
MStatus getAffectedByAttributes ( const MObject & attr, MObjectArray & affectedByAttributes ) const
MPlug findPlug ( const MObject & attr, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MStatus addAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MStatus removeAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MPxNode * userNode ( MStatus * ReturnStatus=NULL ) const
bool isFromReferencedFile ( MStatus * ReturnStatus=NULL) const
bool isShared ( MStatus * ReturnStatus=NULL) const
bool hasUniqueName ( MStatus * ReturnStatus=NULL) const
MString parentNamespace ( MStatus * ReturnStatus=NULL) const
bool isLocked ( MStatus * ReturnStatus=NULL) const
MStatus setLocked ( bool locked )
static MString classification ( const MString & nodeTypeName )
bool isNewAttribute ( const MObject & attr, MStatus * ReturnStatus=NULL) const
static unsigned int allocateFlag ( const MString pluginName, MStatus * ReturnStatus=NULL )
static MStatus deallocateFlag (const MString pluginName, unsigned int flag)
static MStatus deallocateAllFlags (const MString pluginName)
MStatus setFlag (unsigned int flag, bool state)
bool isFlagSet (unsigned int flag, MStatus * ReturnStatus=NULL) const
bool isDefaultNode ( MStatus * ReturnStatus=NULL) const
MStatus setDoNotWrite ( bool flag )
bool canBeWritten ( MStatus * ReturnStatus=NULL) const
bool hasAttribute (const MString & name , MStatus * ReturnStatus=NULL) const
MObject getAliasAttr (bool force, MStatus * ReturnStatus=NULL)
bool setAlias (const MString & alias,const MString & name , const MPlug & plug, bool add=true, MStatus * ReturnStatus=NULL)
bool findAlias (const MString & alias, MObject & attrObj, MStatus * ReturnStatus=NULL) const
bool getAliasList ( MStringArray & strArray, MStatus * ReturnStatus=NULL)
MString plugsAlias (const MPlug & plug, MStatus * ReturnStatus=NULL)
public
bool getPlugsAlias (const MPlug & plug, MString & aliasName, MStatus * ReturnStatus=NULL)

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

Description

Note on Terminology: The following terms are used interchangeably:

object-relative indices - they range between 0..(numVertices()-1) face-relative indices - they range between 0..(polygonVertexCount(faceId)-1)

This function set provides access to polygonal meshes. Objects of type MFn::kMesh, MFn::kMeshData, and MFn::kMeshGeom are supported. MFn::kMesh objects are shapes in the DAG, MFn::kMeshGeom objects are the raw geometry that the shapes use, and MFn::kMeshData objects are the data that is passed through dependency graph connections.

NOTE: If the function set has been initialized with a MFn::kMesh object then it must have geometry attached.

Mesh Construction
Meshes are created by specifying a vertex list, a list of vertex counts per-polygon, and a list of vertices that make up the polygons. Edge data is also maintained for the mesh and can be returned to the caller. The following lists are used by the create method to construct a mesh:

There are several cases in which the create method will alter the data passed in:

Texture Coordinates (UV's)
You can optionally specify texture (uv) coordinates. UV coordinates are 2-d coordinates used for mapping textures to the polygons of a mesh. All of the uv coordinates are stored in one or more named UV sets. The default mesh uv list stores uv coordinates in an array indexed from 0 to numUVs()-1. UV's are referenced on a per-polygon per-vertex basis, so for a polygon with 4 vertices there would be 4 uv's. The uv values for a polygon are set by specifying the index of the uv for each vertex of the polygon. This index is the uv's position in the master uv array. UV's are optional so polygons do not have to have uv values associated with them. There may be only 1 or 2 polygons in a mesh that have uv coordinates set, or all of the polygons may have uv's. UV's can also be shared so several different polygons may reference the same uv's.

Color per vertex
You can optionally specify color per vertex information using this class. It is possible to create and manipulate color per vertex information using the methods available. Many of the color per vertex methods have a default parameter: colorSet. If unspecified, the method will operate on the current color set.

Normals
Some of the Normals in Maya are now user-settable. If the vertex normals are not set or locked, they are computed by maya when the mesh changes. If set or locked, the normals remain frozen relative to the object, unless the user unlocks them. There are 3 types of normals for a mesh:

Blind Data
MFnMesh allows you to create Blind Data types, and to create and access mesh component level blind data, but not object level blind data. Object level data may be assigned through the polyBlindData command or the Blind Data Editor. However, object level blind data is just an ordinary compound dynamic attribute directly on the object. The parent attribute name is BlindDataNNNN where NNNN is the blind data typeID. e.g. if your typeId is 1001 your object will have a compound dynamic attr called BlindData1001.

Handling Components
There are also three iterator classes which provide more specific control over the vertices, edges, and polygons of a mesh and are useful when dealing with components. See MItMeshPolygon, MItMeshEdge, and MItMeshVertex.

Functions

MFnMesh:: MFnMesh ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnMesh:: MFnMesh ( MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given MObject.

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • MS::kSuccess if the function set is successfully attached
    • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnMesh:: MFnMesh ( const MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given constant MObject.

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • MS::kSuccess if the function set is successfully attached
    • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnMesh:: MFnMesh ( const MDagPath & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given constant MDagPath object.

Arguments

  • object the const MDagPath to attach the function set to
  • ReturnStatus the return status
    • MS::kSuccess if the function set is successfully attached
    • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFn::Type MFnMesh:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kMesh

MFnMesh:: ~MFnMesh ()

Description

Class destructor.

MStatus MFnMesh:: createInPlace ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects )

Description

Replaces the existing polygonal mesh with a new one specified by array of vertices and polygon connection information. This function will then operate on the replacement surface.

This method is meant to be as efficient as possible and thus assumes that all the given data is topologically correct.

Arguments

  • numVertices number of vertices
  • numPolygons number of polygons
  • vertexArray point (vertex) array. This should include all the vertices in the mesh, and no extras. For example, a cube could have the vertices: { (-1,-1,-1), (1,-1,-1), (1,-1,1), (-1,-1,1), (-1,1,-1), (-1,1,1), (1,1,1), (1,1,-1) }
  • polygonCounts array of vertex counts for each polygon. For example the cube would have 6 faces, each of which had 4 verts, so the polygonCounts would be {4,4,4,4,4,4}.
  • polygonConnects array of vertex connections for each polygon. For example, in the cube, we have 4 vertices for every face, so we list the vertices for face0, face1, etc consecutively in the array. These are specified by indexes in the vertexArray: e.g for the cube: { 0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 6, 5, 0, 3, 5, 4, 0, 4, 7, 1, 1, 7, 6, 2 }
  • parentOrOwner parent of the polygon that will be created
  • ReturnStatus Status code

Return Value

  • MS::kSuccess The method was successful.
  • MS::kLicenseFailure Application not licensed for attempted operation
  • MS::kInvalidParameter One of the following parameter errors:
    • Array length does not match given item count
    • parentOrOwner was not valid
    • There was no model present to add the object to
  • MS::kFailure An object error has occurred
  • MS::kInsufficientMemory Insufficient memory to complete this method

MObject MFnMesh:: create ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, MObject parentOrOwner, MStatus * ReturnStatus )

Description

Creates a new polygonal mesh given an array of vertices and polygon connection information and sets this function set to operate on the new surface.

This method is meant to be as efficient as possible and thus assumes that all the given data is topologically correct.

The parentOrOwner argument is used to specify the owner of the new surface.

If the parentOrOwner is kMeshData then the created surface will be of type kMeshGeom and will be returned. The parentOrOwner will become the owner of the new mesh.

If parentOrOwner is NULL then a new transform will be created and returned which will be the parent for the mesh. The new transform will be added to the DAG.

If parentOrOwner is a DAG node then the new mesh will be returned and the parentOrOwner will become its parent.

Arguments

  • numVertices number of vertices
  • numPolygons number of polygons
  • vertexArray point (vertex) array. This should include all the vertices in the mesh, and no extras. For example, a cube could have the vertices: { (-1,-1,-1), (1,-1,-1), (1,-1,1), (-1,-1,1), (-1,1,-1), (-1,1,1), (1,1,1), (1,1,-1) }
  • polygonCounts array of vertex counts for each polygon. For example the cube would have 6 faces, each of which had 4 verts, so the polygonCounts would be {4,4,4,4,4,4}.
  • polygonConnects array of vertex connections for each polygon. For example, in the cube, we have 4 vertices for every face, so we list the vertices for face0, face1, etc consecutively in the array. These are specified by indexes in the vertexArray: e.g for the cube: { 0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 6, 5, 0, 3, 5, 4, 0, 4, 7, 1, 1, 7, 6, 2 }
  • parentOrOwner parent of the polygon that will be created
  • ReturnStatus Status code

Return Value

  • If parentOrOwner is NULL then the transform for this surface is returned
  • If parentOrOwner is a DAG object then the new surface shape is returned
  • The surface geometry is returned if parentOrOwner is of type kMeshData

Status Codes

  • MS:kSuccess The method was successful.
  • MS::kLicenseFailure Application not licensed for attempted operation
  • MS::kInvalidParameter One of the following parameter errors
    • Array length does not match given item count
    • parentOrOwner was not valid
    • There was no model present to add the object to
  • MS::kFailure An object error has occurred.
  • MS::kInsufficientMemory Insufficient memory to complete this method

MObject MFnMesh:: create ( int numVertices , int numPolygons , const MPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, MObject parentOrOwner, MStatus * ReturnStatus )

Description

Creates a new polygonal mesh given an array of vertices and polygon connection information and sets this function set to operate on the new surface.

This method is meant to be as efficient as possible and thus assumes that all the given data is topologically correct.

The parentOrOwner argument is used to specify the owner of the new surface.

If the parentOrOwner is kMeshData then the created surface will be of type kMeshGeom and will be returned. The parentOrOwner will become the owner of the new mesh.

If parentOrOwner is NULL then a new transform will be created and returned which will be the parent for the mesh. The new transform will be added to the DAG.

If parentOrOwner is a DAG node then the new mesh will be returned and the parentOrOwner will become its parent.

Arguments

  • numVertices number of vertices
  • numPolygons number of polygons
  • vertexArray point (vertex) array. This should include all the vertices in the mesh, and no extras. For example, a cube could have the vertices: { (-1,-1,-1), (1,-1,-1), (1,-1,1), (-1,-1,1), (-1,1,-1), (-1,1,1), (1,1,1), (1,1,-1) }
  • polygonCounts array of vertex counts for each polygon. For example the cube would have 6 faces, each of which had 4 verts, so the polygonCounts would be {4,4,4,4,4,4}.
  • polygonConnects array of vertex connections for each polygon. For example, in the cube, we have 4 vertices for every face, so we list the vertices for face0, face1, etc consecutively in the array. These are specified by indexes in the vertexArray: e.g for the cube: { 0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 6, 5, 0, 3, 5, 4,0, 4, 7, 1, 1, 7, 6, 2 }
  • parentOrOwner parent of the polygon that will be created
  • ReturnStatus Status code

Return Value

  • If parentOrOwner is NULL then the transform for this surface is returned
  • If parentOrOwner is a DAG object then the new surface shape is returned
  • The surface geometry is returned if parentOrOwner is of type kMeshData

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kLicenseFailure Application not licensed for attempted operation
  • MS::kInvalidParameter One of the following parameter errors
    • Array length does not match given item count
    • parentOrOwner was not valid
    • There was no model present to add the object to
  • MS::kFailure An object error has occurred.
  • MS::kInsufficientMemory Insufficient memory to complete this method

MObject MFnMesh:: create ( int numVertices , int numPolygons , const MFloatPointArray &vertexArray, const MIntArray &polygonCounts, const MIntArray &polygonConnects, const MFloatArray & uArray, const MFloatArray & vArray,