pymel.core.nodetypes.Mesh¶
digraph inheritancedf0d95092c { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "ContainerBase" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.ContainerBase.html#pymel.core.nodetypes.ContainerBase",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DependNode" -> "ContainerBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ControlPoint" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.ControlPoint.html#pymel.core.nodetypes.ControlPoint",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DeformableShape" -> "ControlPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DagNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DagNode.html#pymel.core.nodetypes.DagNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Entity" -> "DagNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DeformableShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DeformableShape.html#pymel.core.nodetypes.DeformableShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "GeometryShape" -> "DeformableShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DependNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DependNode.html#pymel.core.nodetypes.DependNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" -> "DependNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Entity" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Entity.html#pymel.core.nodetypes.Entity",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "ContainerBase" -> "Entity" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometryShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.GeometryShape.html#pymel.core.nodetypes.GeometryShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Shape" -> "GeometryShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Mesh" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.nodetypes.Mesh",style="setlinewidth(0.5)",tooltip="The Mesh class provides wrapped access to many API methods for querying and modifying meshes. Be aware that",height=0.25,shape=box,fontsize=8]; "SurfaceShape" -> "Mesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ProxyUnicode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.util.utilitytypes/pymel.util.utilitytypes.ProxyUnicode.html#pymel.util.utilitytypes.ProxyUnicode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.core.general/pymel.core.general.PyNode.html#pymel.core.general.PyNode",style="setlinewidth(0.5)",tooltip="Abstract class that is base for all pymel nodes classes.",height=0.25,shape=box,fontsize=8]; "ProxyUnicode" -> "PyNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Shape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Shape.html#pymel.core.nodetypes.Shape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DagNode" -> "Shape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SurfaceShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.SurfaceShape.html#pymel.core.nodetypes.SurfaceShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "ControlPoint" -> "SurfaceShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
- class Mesh(*args, **kwargs)¶
The Mesh class provides wrapped access to many API methods for querying and modifying meshes. Be aware that modifying meshes using API commands outside of the context of a plugin is still somewhat uncharted territory, so proceed at our own risk.
The component types can be accessed from the Mesh type (or it’s transform) using the names you are familiar with from MEL:
>>> from pymel.core import * >>> p = polySphere( name='theMoon', sa=7, sh=7 )[0] >>> p.vtx MeshVertex(u'theMoonShape.vtx[0:43]') >>> p.e MeshEdge(u'theMoonShape.e[0:90]') >>> p.f MeshFace(u'theMoonShape.f[0:48]')
They are also accessible from their more descriptive alternatives:
>>> p.verts MeshVertex(u'theMoonShape.vtx[0:43]') >>> p.edges MeshEdge(u'theMoonShape.e[0:90]') >>> p.faces MeshFace(u'theMoonShape.f[0:48]')
As you’d expect, these components are all indexible:
>>> p.vtx[0] MeshVertex(u'theMoonShape.vtx[0]')
The classes themselves contain methods for getting information about the component.
>>> p.vtx[0].connectedEdges() MeshEdge(u'theMoonShape.e[0,6,42,77]')
This class provides support for python’s extended slice notation. Typical maya ranges express a start and stop value separated by a colon. Extended slices add a step parameter and can also represent multiple ranges separated by commas. Thus, a single component object can represent any collection of indices.
This includes start, stop, and step values.
>>> # do every other edge between 0 and 10 >>> for edge in p.e[0:10:2]: ... print edge ... theMoonShape.e[0] theMoonShape.e[2] theMoonShape.e[4] theMoonShape.e[6] theMoonShape.e[8] theMoonShape.e[10]
Negative indices can be used for getting indices relative to the end:
>>> p.edges # the full range MeshEdge(u'theMoonShape.e[0:90]') >>> p.edges[5:-10] # index 5 through to 10 from the last MeshEdge(u'theMoonShape.e[5:80]')
Just like with python ranges, you can leave an index out, and the logical result will follow:
>>> p.edges[:-10] # from the beginning MeshEdge(u'theMoonShape.e[0:80]') >>> p.edges[20:] MeshEdge(u'theMoonShape.e[20:90]')
Or maybe you want the position of every tenth vert:
>>> for x in p.vtx[::10]: ... print x, x.getPosition() ... theMoonShape.vtx[0] [0.270522117615, -0.900968849659, -0.339223951101] theMoonShape.vtx[10] [-0.704405844212, -0.623489797115, 0.339223951101] theMoonShape.vtx[20] [0.974927902222, -0.222520858049, 0.0] theMoonShape.vtx[30] [-0.704405784607, 0.623489797115, -0.339224010706] theMoonShape.vtx[40] [0.270522087812, 0.900968849659, 0.339223980904]
To be compatible with Maya’s range notation, these slices are inclusive of the stop index.
>>> # face at index 8 will be included in the sequence >>> for f in p.f[4:8]: print f ... theMoonShape.f[4] theMoonShape.f[5] theMoonShape.f[6] theMoonShape.f[7] theMoonShape.f[8]
>>> from pymel.core import * >>> obj = polyTorus()[0] >>> colors = [] >>> for i, vtx in enumerate(obj.vtx): ... edgs=vtx.toEdges() ... totalLen=0 ... edgCnt=0 ... for edg in edgs: ... edgCnt += 1 ... l = edg.getLength() ... totalLen += l ... avgLen=totalLen / edgCnt ... #print avgLen ... currColor = vtx.getColor(0) ... color = datatypes.Color.black ... # only set blue if it has not been set before ... if currColor.b<=0.0: ... color.b = avgLen ... color.r = avgLen ... colors.append(color)
- BoolOperation = Enum( EnumValue('BoolOperation', 1, 'union'), EnumValue('BoolOperation', 2, 'difference'), EnumValue('BoolOperation', 3, 'intersection'))¶
- MColorRepresentation = Enum( EnumValue('MColorRepresentation', 1, 'alpha'), EnumValue('MColorRepresentation', 3, 'RGB'), EnumValue('MColorRepresentation', 4, 'RGBA'))¶
- SplitPlacement = Enum( EnumValue('SplitPlacement', 0, 'onEdge'), EnumValue('SplitPlacement', 1, 'internalPoint'), EnumValue('SplitPlacement', 2, 'invalid'))¶
- addHoles(faceIndex, vertexArray, loopCounts, mergeVertices=True, pointTolerance=1e-10)¶
Adds holes to a mesh polygon.
Parameters: - faceIndex : int
Index of the face to which to add holes.
- vertexArray : Point list
Array of ordered vertices that make up the polygon.
- loopCounts : int list
Array of vertex loop counts.
- mergeVertices : bool
If true then if a vertex falls within pointTolerance of an existing vertex then the existing vertex is reused.
- pointTolerance : float
Specifies how close verticies have to be to before they are merged. This merging is only done if mergeVerticies is true.
Derived from api method maya.OpenMaya.MFnMesh.addHoles
Undo is not currently supported for this method
- area(*args, **kwargs)¶
returns the surface area of the object’s faces in local space as a float
Derived from mel command maya.cmds.polyEvaluate
- assignColor(polygonId, vertexIndex, colorId, colorSet=None)¶
Maps a color value to a specified vertex of a polygon.
Parameters: - polygonId : int
The polygon (face) to map to
- vertexIndex : int
The face-relative (local) vertex id of the polygon to map to
- colorId : int
The color entry from the color list that will be mapped
- colorSet : unicode
Color set to work with
Derived from api method maya.OpenMaya.MFnMesh.assignColor
Undo is not currently supported for this method
- assignColors(colorIds, colorSet=None)¶
This method maps all colors for the mesh. The setColor/setColors method is used to create a color table for the mesh. After the table is created, this method is used to map those values to each polygon on a per-vertex basis. The setColor/setColors method should be called before the assignColors method.
Parameters: - colorIds : int list
The color indices to be mapped to each polygon-vertex
- colorSet : unicode
Color set to work with
Derived from api method maya.OpenMaya.MFnMesh.assignColors
Undo is not currently supported for this method
- assignUV(polygonId, vertexIndex, uvId, uvSet=None)¶
Maps a texture coordinate to a specified vertex of a polygon.
Parameters: - polygonId : int
The polygon (face) to map to
- vertexIndex : int
The face-relative (local) vertex id of the polygon to map to
- uvId : int
The uv entry from the uv list that will be mapped
- uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.assignUV
Undo is not currently supported for this method
- assignUVs(uvCounts, uvIds, uvSet=None)¶
This method maps all texture coordinates for the mesh. The setUV/setUVs method is used to create the texture coordinate table for the mesh. After the table is created, this method is used to map those values to each polygon on a per-vertex basis. The setUV/setUVs method should be called before the assignUVs method.
Parameters: - uvCounts : int list
The uv counts for each polygon (face) in the mesh
- uvIds : int list
The uv indices to be mapped to each polygon-vertex
- uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.assignUVs
Undo is not currently supported for this method
- booleanOps(op, meshes)¶
Computes the boolean between multiple meshes. The result is stored in the current MFnMesh instance. The current instance must point to a valid mesh, which can be empty. Such a mesh can result from using MFnMesh::create() for example.
Parameters: - op : Mesh.BoolOperation
Operation to perform (kUnion, kDifference or kIntersection)
values: ‘union’, ‘difference’, ‘intersection’
- meshes : PyNode list
The meshes for the boolean operation
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.booleanOps
- cleanupEdgeSmoothing()¶
This method updates the mesh after setEdgeSmoothing has been done. This should be called only once, after all the desired edges have been had their soothing set. If you don’t call this method, the normals may not be correct, and the object will look odd in shaded mode. Derived from api method maya.OpenMaya.MFnMesh.cleanupEdgeSmoothing
Undo is not currently supported for this method
- clearColors(colorSet=None)¶
This method clears out all color for the mesh, and leaves behind an empty color set.
Parameters: - colorSet : unicode
Color set to work with
Derived from api method maya.OpenMaya.MFnMesh.clearColors
Undo is not currently supported for this method
- clearUVs(uvSet=None)¶
This method clears out all texture coordinates for the mesh, and leaves behind an empty UVset.
Parameters: - uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.clearUVs
Undo is not currently supported for this method
- classmethod componentTypeFromName(assocName)¶
Get a component type from its string name.
Parameters: - assocName : unicode
String representing the component type
Return type: MFn.Type
Derived from api method maya.OpenMaya.MFnMesh.componentTypeFromName
- classmethod componentTypeName(compType)¶
Get a string representing a particular component type
Parameters: - compType : MFn.Type
The type of component to fetch
values: ‘base’, ‘namedObject’, ‘model’, ‘dependencyNode’, ‘addDoubleLinear’, ‘affect’, ‘animCurve’, ‘animCurveTimeToAngular’, ‘animCurveTimeToDistance’, ‘animCurveTimeToTime’, ‘animCurveTimeToUnitless’, ‘animCurveUnitlessToAngular’, ‘animCurveUnitlessToDistance’, ‘animCurveUnitlessToTime’, ‘animCurveUnitlessToUnitless’, ‘resultCurve’, ‘resultCurveTimeToAngular’, ‘resultCurveTimeToDistance’, ‘resultCurveTimeToTime’, ‘resultCurveTimeToUnitless’, ‘angleBetween’, ‘audio’, ‘background’, ‘colorBackground’, ‘fileBackground’, ‘rampBackground’, ‘blend’, ‘blendTwoAttr’, ‘blendWeighted’, ‘blendDevice’, ‘blendColors’, ‘bump’, ‘bump3d’, ‘cameraView’, ‘chainToSpline’, ‘choice’, ‘condition’, ‘contrast’, ‘clampColor’, ‘create’, ‘alignCurve’, ‘alignSurface’, ‘attachCurve’, ‘attachSurface’, ‘avgCurves’, ‘avgSurfacePoints’, ‘avgNurbsSurfacePoints’, ‘bevel’, ‘birailSrf’, ‘DPbirailSrf’, ‘MPbirailSrf’, ‘SPbirailSrf’, ‘boundary’, ‘circle’, ‘closeCurve’, ‘closestPointOnSurface’, ‘closeSurface’, ‘curveFromSurface’, ‘curveFromSurfaceBnd’, ‘curveFromSurfaceCoS’, ‘curveFromSurfaceIso’, ‘curveInfo’, ‘detachCurve’, ‘detachSurface’, ‘extendCurve’, ‘extendSurface’, ‘extrude’, ‘FFblendSrf’, ‘FFfilletSrf’, ‘filletCurve’, ‘fitBspline’, ‘flow’, ‘hardenPointCurve’, ‘illustratorCurve’, ‘insertKnotCrv’, ‘insertKnotSrf’, ‘intersectSurface’, ‘nurbsTesselate’, ‘nurbsPlane’, ‘nurbsCube’, ‘offsetCos’, ‘offsetCurve’, ‘planarTrimSrf’, ‘pointOnCurveInfo’, ‘pointOnSurfaceInfo’, ‘primitive’, ‘projectCurve’, ‘projectTangent’, ‘RBFsurface’, ‘rebuildCurve’, ‘rebuildSurface’, ‘reverseCurve’, ‘reverseSurface’, ‘revolve’, ‘revolvedPrimitive’, ‘cone’, ‘renderCone’, ‘cylinder’, ‘sphere’, ‘skin’, ‘stitchSrf’, ‘subCurve’, ‘surfaceInfo’, ‘textCurves’, ‘trim’, ‘untrim’, ‘dagNode’, ‘proxy’, ‘underWorld’, ‘transform’, ‘aimConstraint’, ‘lookAt’, ‘geometryConstraint’, ‘geometryVarGroup’, ‘anyGeometryVarGroup’, ‘curveVarGroup’, ‘meshVarGroup’, ‘surfaceVarGroup’, ‘ikEffector’, ‘ikHandle’, ‘joint’, ‘manipulator3D’, ‘arrowManip’, ‘axesActionManip’, ‘ballProjectionManip’, ‘circleManip’, ‘screenAlignedCircleManip’, ‘circleSweepManip’, ‘concentricProjectionManip’, ‘cubicProjectionManip’, ‘cylindricalProjectionManip’, ‘discManip’, ‘freePointManip’, ‘centerManip’, ‘limitManip’, ‘enableManip’, ‘freePointTriadManip’, ‘propMoveTriadManip’, ‘towPointManip’, ‘polyCreateToolManip’, ‘polySplitToolManip’, ‘geometryOnLineManip’, ‘cameraPlaneManip’, ‘toggleOnLineManip’, ‘stateManip’, ‘isoparmManip’, ‘lineManip’, ‘manipContainer’, ‘averageCurveManip’, ‘barnDoorManip’, ‘bevelManip’, ‘blendManip’, ‘buttonManip’, ‘cameraManip’, ‘coiManip’, ‘cpManip’, ‘createCVManip’, ‘createEPManip’, ‘curveEdManip’, ‘curveSegmentManip’, ‘directionManip’, ‘dofManip’, ‘dropoffManip’, ‘extendCurveDistanceManip’, ‘extrudeManip’, ‘ikSplineManip’, ‘ikRPManip’, ‘jointClusterManip’, ‘lightManip’, ‘motionPathManip’, ‘offsetCosManip’, ‘offsetCurveManip’, ‘projectionManip’, ‘polyProjectionManip’, ‘projectionUVManip’, ‘projectionMultiManip’, ‘projectTangentManip’, ‘propModManip’, ‘quadPtOnLineManip’, ‘rbfSrfManip’, ‘reverseCurveManip’, ‘reverseCrvManip’, ‘reverseSurfaceManip’, ‘revolveManip’, ‘revolvedPrimitiveManip’, ‘spotManip’, ‘spotCylinderManip’, ‘triplanarProjectionManip’, ‘trsManip’, ‘dblTrsManip’, ‘pivotManip2D’, ‘manip2DContainer’, ‘polyMoveUVManip’, ‘polyMappingManip’, ‘polyModifierManip’, ‘polyMoveVertexManip’, ‘polyVertexNormalManip’, ‘texSmudgeUVManip’, ‘texLatticeDeformManip’, ‘texLattice’, ‘texSmoothManip’, ‘trsTransManip’, ‘trsInsertManip’, ‘trsXformManip’, ‘manipulator2D’, ‘translateManip2D’, ‘planarProjectionManip’, ‘pointOnCurveManip’, ‘towPointOnCurveManip’, ‘markerManip’, ‘pointOnLineManip’, ‘pointOnSurfaceManip’, ‘translateUVManip’, ‘rotateBoxManip’, ‘rotateManip’, ‘handleRotateManip’, ‘rotateLimitsManip’, ‘scaleLimitsManip’, ‘scaleManip’, ‘scalingBoxManip’, ‘scriptManip’, ‘sphericalProjectionManip’, ‘textureManip3D’, ‘toggleManip’, ‘translateBoxManip’, ‘translateLimitsManip’, ‘translateManip’, ‘trimManip’, ‘jointTranslateManip’, ‘manipulator’, ‘circlePointManip’, ‘dimensionManip’, ‘fixedLineManip’, ‘lightProjectionGeometry’, ‘lineArrowManip’, ‘pointManip’, ‘triadManip’, ‘normalConstraint’, ‘orientConstraint’, ‘pointConstraint’, ‘symmetryConstraint’, ‘parentConstraint’, ‘poleVectorConstraint’, ‘scaleConstraint’, ‘tangentConstraint’, ‘unknownTransform’, ‘world’, ‘shape’, ‘baseLattice’, ‘camera’, ‘cluster’, ‘softMod’, ‘collision’, ‘dummy’, ‘emitter’, ‘field’, ‘air’, ‘drag’, ‘gravity’, ‘newton’, ‘radial’, ‘turbulence’, ‘uniform’, ‘vortex’, ‘geometric’, ‘curve’, ‘nurbsCurve’, ‘nurbsCurveGeom’, ‘dimension’, ‘angle’, ‘annotation’, ‘distance’, ‘arcLength’, ‘radius’, ‘paramDimension’, ‘directedDisc’, ‘renderRect’, ‘envFogShape’, ‘lattice’, ‘latticeGeom’, ‘locator’, ‘dropoffLocator’, ‘marker’, ‘orientationMarker’, ‘positionMarker’, ‘orientationLocator’, ‘trimLocator’, ‘plane’, ‘sketchPlane’, ‘groundPlane’, ‘orthoGrid’, ‘sprite’, ‘surface’, ‘nurbsSurface’, ‘nurbsSurfaceGeom’, ‘mesh’, ‘meshGeom’, ‘renderSphere’, ‘flexor’, ‘clusterFlexor’, ‘guideLine’, ‘light’, ‘ambientLight’, ‘nonAmbientLight’, ‘areaLight’, ‘linearLight’, ‘nonExtendedLight’, ‘directionalLight’, ‘pointLight’, ‘spotLight’, ‘particle’, ‘polyToolFeedbackShape’, ‘rigidConstraint’, ‘rigid’, ‘spring’, ‘unknownDag’, ‘defaultLightList’, ‘deleteComponent’, ‘dispatchCompute’, ‘shadingEngine’, ‘displacementShader’, ‘distanceBetween’, ‘DOF’, ‘dummyConnectable’, ‘dynamicsController’, ‘geoConnectable’, ‘expression’, ‘extract’, ‘filter’, ‘filterClosestSample’, ‘filterEuler’, ‘filterSimplify’, ‘gammaCorrect’, ‘geometryFilt’, ‘bendLattice’, ‘blendShape’, ‘combinationShape’, ‘bulgeLattice’, ‘FFD’, ‘ffdDualBase’, ‘rigidDeform’, ‘sculpt’, ‘textureDeformer’, ‘textureDeformerHandle’, ‘tweak’, ‘weightGeometryFilt’, ‘clusterFilter’, ‘softModFilter’, ‘jointCluster’, ‘deltaMush’, ‘tension’, ‘proxWrap’, ‘wire’, ‘groupId’, ‘groupParts’, ‘guide’, ‘hsvToRgb’, ‘hyperGraphInfo’, ‘hyperLayout’, ‘hyperView’, ‘ikSolver’, ‘MCsolver’, ‘PASolver’, ‘SCsolver’, ‘RPsolver’, ‘splineSolver’, ‘ikSystem’, ‘imagePlane’, ‘lambert’, ‘reflect’, ‘blinn’, ‘phong’, ‘phongExplorer’, ‘layeredShader’, ‘lightInfo’, ‘leastSquares’, ‘lightFogMaterial’, ‘envFogMaterial’, ‘lightList’, ‘lightSource’, ‘luminance’, ‘makeGroup’, ‘material’, ‘diffuseMaterial’, ‘lambertMaterial’, ‘blinnMaterial’, ‘phongMaterial’, ‘lightSourceMaterial’, ‘materialInfo’, ‘matrixAdd’, ‘matrixHold’, ‘matrixMult’, ‘matrixPass’, ‘matrixWtAdd’, ‘midModifier’, ‘midModifierWithMatrix’, ‘polyBevel’, ‘polyTweak’, ‘polyAppend’, ‘polyChipOff’, ‘polyCloseBorder’, ‘polyCollapseEdge’, ‘polyCollapseF’, ‘polyCylProj’, ‘polyDelEdge’, ‘polyDelFacet’, ‘polyDelVertex’, ‘polyExtrudeFacet’, ‘polyMapCut’, ‘polyMapDel’, ‘polyMapSew’, ‘polyMergeEdge’, ‘polyMergeFacet’, ‘polyMoveEdge’, ‘polyMoveFacet’, ‘polyMoveFacetUV’, ‘polyMoveUV’, ‘polyMoveVertex’, ‘polyMoveVertexUV’, ‘polyNormal’, ‘polyPlanProj’, ‘polyProj’, ‘polyQuad’, ‘polySmooth’, ‘polySoftEdge’, ‘polySphProj’, ‘polySplit’, ‘polySubdEdge’, ‘polySubdFacet’, ‘polyTriangulate’, ‘polyCreator’, ‘polyPrimitive’, ‘polyCone’, ‘polyCube’, ‘polyCylinder’, ‘polyMesh’, ‘polySphere’, ‘polyTorus’, ‘polyCreateFacet’, ‘polyUnite’, ‘motionPath’, ‘pluginMotionPathNode’, ‘multilisterLight’, ‘multiplyDivide’, ‘oldGeometryConstraint’, ‘opticalFX’, ‘particleAgeMapper’, ‘particleCloud’, ‘particleColorMapper’, ‘particleIncandecenceMapper’, ‘particleTransparencyMapper’, ‘partition’, ‘place2dTexture’, ‘place3dTexture’, ‘pluginDependNode’, ‘pluginLocatorNode’, ‘plusMinusAverage’, ‘pointMatrixMult’, ‘polySeparate’, ‘postProcessList’, ‘projection’, ‘record’, ‘renderUtilityList’, ‘reverse’, ‘rgbToHsv’, ‘rigidSolver’, ‘set’, ‘textureBakeSet’, ‘vertexBakeSet’, ‘setRange’, ‘shaderGlow’, ‘shaderList’, ‘shadingMap’, ‘samplerInfo’, ‘shapeFragment’, ‘simpleVolumeShader’, ‘sl60’, ‘snapshot’, ‘storyBoard’, ‘summaryObject’, ‘super’, ‘control’, ‘surfaceLuminance’, ‘surfaceShader’, ‘textureList’, ‘textureEnv’, ‘envBall’, ‘envCube’, ‘envChrome’, ‘envSky’, ‘envSphere’, ‘texture2d’, ‘bulge’, ‘checker’, ‘cloth’, ‘fileTexture’, ‘fractal’, ‘grid’, ‘mountain’, ‘ramp’, ‘stencil’, ‘water’, ‘texture3d’, ‘brownian’, ‘cloud’, ‘crater’, ‘granite’, ‘leather’, ‘marble’, ‘rock’, ‘snow’, ‘solidFractal’, ‘stucco’, ‘txSl’, ‘wood’, ‘time’, ‘timeToUnitConversion’, ‘renderSetup’, ‘renderGlobals’, ‘renderGlobalsList’, ‘renderQuality’, ‘resolution’, ‘hardwareRenderGlobals’, ‘arrayMapper’, ‘unitConversion’, ‘unitToTimeConversion’, ‘useBackground’, ‘unknown’, ‘vectorProduct’, ‘volumeShader’, ‘component’, ‘curveCVComponent’, ‘curveEPComponent’, ‘curveKnotComponent’, ‘curveParamComponent’, ‘isoparmComponent’, ‘pivotComponent’, ‘surfaceCVComponent’, ‘surfaceEPComponent’, ‘surfaceKnotComponent’, ‘edgeComponent’, ‘latticeComponent’, ‘surfaceRangeComponent’, ‘decayRegionCapComponent’, ‘decayRegionComponent’, ‘meshComponent’, ‘meshEdgeComponent’, ‘meshPolygonComponent’, ‘meshFrEdgeComponent’, ‘meshVertComponent’, ‘meshFaceVertComponent’, ‘orientationComponent’, ‘subVertexComponent’, ‘multiSubVertexComponent’, ‘setGroupComponent’, ‘dynParticleSetComponent’, ‘selectionItem’, ‘dagSelectionItem’, ‘nonDagSelectionItem’, ‘itemList’, ‘attribute’, ‘numericAttribute’, ‘doubleAngleAttribute’, ‘floatAngleAttribute’, ‘doubleLinearAttribute’, ‘floatLinearAttribute’, ‘timeAttribute’, ‘enumAttribute’, ‘unitAttribute’, ‘typedAttribute’, ‘compoundAttribute’, ‘genericAttribute’, ‘lightDataAttribute’, ‘matrixAttribute’, ‘floatMatrixAttribute’, ‘messageAttribute’, ‘plugin’, ‘data’, ‘componentListData’, ‘doubleArrayData’, ‘intArrayData’, ‘latticeData’, ‘matrixData’, ‘meshData’, ‘nurbsSurfaceData’, ‘nurbsCurveData’, ‘numericData’, ‘data2Double’, ‘data2Float’, ‘data2Long’, ‘data2Short’, ‘data3Double’, ‘data3Float’, ‘data3Int’, ‘data3Short’, ‘pluginData’, ‘pointArrayData’, ‘matrixArrayData’, ‘sphereData’, ‘stringData’, ‘stringArrayData’, ‘vectorArrayData’, ‘selectionList’, ‘transformGeometry’, ‘commEdgePtManip’, ‘commEdgeOperManip’, ‘commEdgeSegmentManip’, ‘commCornerManip’, ‘commCornerOperManip’, ‘pluginDeformerNode’, ‘torus’, ‘polyBoolOp’, ‘singleShadingSwitch’, ‘doubleShadingSwitch’, ‘tripleShadingSwitch’, ‘nurbsSquare’, ‘anisotropy’, ‘nonLinear’, ‘deformFunc’, ‘deformBend’, ‘deformTwist’, ‘deformSquash’, ‘deformFlare’, ‘deformSine’, ‘deformWave’, ‘deformBendManip’, ‘deformTwistManip’, ‘deformSquashManip’, ‘deformFlareManip’, ‘deformSineManip’, ‘deformWaveManip’, ‘softModManip’, ‘distanceManip’, ‘script’, ‘curveFromMeshEdge’, ‘curveCurveIntersect’, ‘nurbsCircular3PtArc’, ‘nurbsCircular2PtArc’, ‘offsetSurface’, ‘roundConstantRadius’, ‘roundRadiusManip’, ‘roundRadiusCrvManip’, ‘roundConstantRadiusManip’, ‘threePointArcManip’, ‘twoPointArcManip’, ‘textButtonManip’, ‘offsetSurfaceManip’, ‘imageData’, ‘imageLoad’, ‘imageSave’, ‘imageNetSrc’, ‘imageNetDest’, ‘imageRender’, ‘imageAdd’, ‘imageDiff’, ‘imageMultiply’, ‘imageOver’, ‘imageUnder’, ‘imageColorCorrect’, ‘imageBlur’, ‘imageFilter’, ‘imageDepth’, ‘imageDisplay’, ‘imageView’, ‘imageMotionBlur’, ‘viewColorManager’, ‘matrixFloatData’, ‘skinShader’, ‘componentManip’, ‘selectionListData’, ‘objectFilter’, ‘objectMultiFilter’, ‘objectNameFilter’, ‘objectTypeFilter’, ‘objectAttrFilter’, ‘objectRenderFilter’, ‘objectScriptFilter’, ‘selectionListOperator’, ‘subdiv’, ‘polyToSubdiv’, ‘skinClusterFilter’, ‘character’, ‘characterOffset’, ‘dagPose’, ‘stitchAsNurbsShell’, ‘explodeNurbsShell’, ‘nurbsBoolean’, ‘stitchSrfManip’, ‘forceUpdateManip’, ‘pluginManipContainer’, ‘polySewEdge’, ‘polyMergeVert’, ‘polySmoothFacet’, ‘smoothCurve’, ‘globalStitch’, ‘subdivCVComponent’, ‘subdivEdgeComponent’, ‘subdivFaceComponent’, ‘UVManip2D’, ‘translateUVManip2D’, ‘rotateUVManip2D’, ‘scaleUVManip2D’, ‘polyTweakUV’, ‘moveUVShellManip2D’, ‘pluginShape’, ‘geometryData’, ‘singleIndexedComponent’, ‘doubleIndexedComponent’, ‘tripleIndexedComponent’, ‘extendSurfaceDistanceManip’, ‘squareSrf’, ‘squareSrfManip’, ‘subdivToPoly’, ‘dynBase’, ‘dynEmitterManip’, ‘dynFieldsManip’, ‘dynBaseFieldManip’, ‘dynAirManip’, ‘dynNewtonManip’, ‘dynTurbulenceManip’, ‘dynSpreadManip’, ‘dynAttenuationManip’, ‘dynArrayAttrsData’, ‘pluginFieldNode’, ‘pluginEmitterNode’, ‘pluginSpringNode’, ‘displayLayer’, ‘displayLayerManager’, ‘polyColorPerVertex’, ‘createColorSet’, ‘deleteColorSet’, ‘copyColorSet’, ‘blendColorSet’, ‘polyColorMod’, ‘polyColorDel’, ‘characterMappingData’, ‘dynSweptGeometryData’, ‘wrapFilter’, ‘meshVtxFaceComponent’, ‘binaryData’, ‘attribute2Double’, ‘attribute2Float’, ‘attribute2Short’, ‘attribute2Long’, ‘attribute3Double’, ‘attribute3Float’, ‘attribute3Short’, ‘attribute3Int’, ‘reference’, ‘blindData’, ‘blindDataTemplate’, ‘polyBlindData’, ‘polyNormalPerVertex’, ‘nurbsToSubdiv’, ‘pluginIkSolver’, ‘instancer’, ‘moveVertexManip’, ‘stroke’, ‘brush’, ‘strokeGlobals’, ‘pluginGeometryData’, ‘lightLink’, ‘dynGlobals’, ‘polyReduce’, ‘lodThresholds’, ‘chooser’, ‘lodGroup’, ‘multDoubleLinear’, ‘fourByFourMatrix’, ‘towPointOnSurfaceManip’, ‘surfaceEdManip’, ‘surfaceFaceComponent’, ‘clipScheduler’, ‘clipLibrary’, ‘subSurface’, ‘smoothTangentSrf’, ‘renderPass’, ‘renderPassSet’, ‘renderLayer’, ‘renderLayerManager’, ‘passContributionMap’, ‘precompExport’, ‘renderTarget’, ‘renderedImageSource’, ‘imageSource’, ‘polyFlipEdge’, ‘polyExtrudeEdge’, ‘animBlend’, ‘animBlendInOut’, ‘polyAppendVertex’, ‘uvChooser’, ‘subdivCompId’, ‘volumeAxis’, ‘deleteUVSet’, ‘subdHierBlind’, ‘subdBlindData’, ‘characterMap’, ‘layeredTexture’, ‘subdivCollapse’, ‘particleSamplerInfo’, ‘copyUVSet’, ‘createUVSet’, ‘clip’, ‘polySplitVert’, ‘subdivData’, ‘subdivGeom’, ‘UInt64ArrayData’, ‘int64ArrayData’, ‘polySplitEdge’, ‘subdivReverseFaces’, ‘meshMapComponent’, ‘sectionManip’, ‘xsectionSubdivEdit’, ‘subdivToNurbs’, ‘editCurve’, ‘editCurveManip’, ‘crossSectionManager’, ‘createSectionManip’, ‘crossSectionEditManip’, ‘dropOffFunction’, ‘subdBoolean’, ‘subdModifyEdge’, ‘modifyEdgeCrvManip’, ‘modifyEdgeManip’, ‘scalePointManip’, ‘transformBoxManip’, ‘symmetryLocator’, ‘symmetryMapVector’, ‘symmetryMapCurve’, ‘curveFromSubdivEdge’, ‘createBPManip’, ‘modifyEdgeBaseManip’, ‘subdExtrudeFace’, ‘subdivSurfaceVarGroup’, ‘sfRevolveManip’, ‘curveFromSubdivFace’, ‘unused1’, ‘unused2’, ‘unused3’, ‘unused4’, ‘unused5’, ‘unused6’, ‘polyTransfer’, ‘polyAverageVertex’, ‘polyAutoProj’, ‘polyLayoutUV’, ‘polyMapSewMove’, ‘subdModifier’, ‘subdMoveVertex’, ‘subdMoveEdge’, ‘subdMoveFace’, ‘subdDelFace’, ‘snapshotShape’, ‘subdivMapComponent’, ‘jiggleDeformer’, ‘globalCacheControls’, ‘diskCache’, ‘subdCloseBorder’, ‘subdMergeVert’, ‘boxData’, ‘box’, ‘renderBox’, ‘subdSplitFace’, ‘volumeFog’, ‘subdTweakUV’, ‘subdMapCut’, ‘subdLayoutUV’, ‘subdMapSewMove’, ‘ocean’, ‘volumeNoise’, ‘subdAutoProj’, ‘subdSubdivideFace’, ‘noise’, ‘attribute4Double’, ‘data4Double’, ‘subdPlanProj’, ‘subdTweak’, ‘subdProjectionManip’, ‘subdMappingManip’, ‘hardwareReflectionMap’, ‘polyNormalizeUV’, ‘polyFlipUV’, ‘hwShaderNode’, ‘pluginHardwareShader’, ‘pluginHwShaderNode’, ‘subdAddTopology’, ‘subdCleanTopology’, ‘implicitCone’, ‘implicitSphere’, ‘rampShader’, ‘volumeLight’, ‘oceanShader’, ‘bevelPlus’, ‘styleCurve’, ‘polyCut’, ‘polyPoke’, ‘polyWedgeFace’, ‘polyCutManipContainer’, ‘polyCutManip’, ‘polyMirrorManipContainer’, ‘polyPokeManip’, ‘fluidTexture3D’, ‘fluidTexture2D’, ‘polyMergeUV’, ‘polyStraightenUVBorder’, ‘alignManip’, ‘pluginTransformNode’, ‘fluid’, ‘fluidGeom’, ‘fluidData’, ‘smear’, ‘stringShadingSwitch’, ‘studioClearCoat’, ‘fluidEmitter’, ‘heightField’, ‘geoConnector’, ‘snapshotPath’, ‘pluginObjectSet’, ‘quadShadingSwitch’, ‘polyExtrudeVertex’, ‘pairBlend’, ‘textManip’, ‘viewManip’, ‘xformManip’, ‘mute’, ‘constraint’, ‘trimWithBoundaries’, ‘curveFromMeshCoM’, ‘follicle’, ‘hairSystem’, ‘remapValue’, ‘remapColor’, ‘remapHsv’, ‘hairConstraint’, ‘timeFunction’, ‘mentalRayTexture’, ‘objectBinFilter’, ‘polySmoothProxy’, ‘pfxGeometry’, ‘pfxHair’, ‘hairTubeShader’, ‘psdFileTexture’, ‘keyframeDelta’, ‘keyframeDeltaMove’, ‘keyframeDeltaScale’, ‘keyframeDeltaAddRemove’, ‘keyframeDeltaBlockAddRemove’, ‘keyframeDeltaInfType’, ‘keyframeDeltaTangent’, ‘keyframeDeltaWeighted’, ‘keyframeDeltaBreakdown’, ‘polyMirror’, ‘polyCreaseEdge’, ‘polyPinUV’, ‘hikEffector’, ‘hikIKEffector’, ‘hikFKJoint’, ‘hikSolver’, ‘hikHandle’, ‘proxyManager’, ‘polyAutoProjManip’, ‘polyPrism’, ‘polyPyramid’, ‘polySplitRing’, ‘pfxToon’, ‘toonLineAttributes’, ‘polyDuplicateEdge’, ‘facade’, ‘materialFacade’, ‘envFacade’, ‘AISEnvFacade’, ‘lineModifier’, ‘polyArrow’, ‘polyPrimitiveMisc’, ‘polyPlatonicSolid’, ‘polyPipe’, ‘hikFloorContactMarker’, ‘hikGroundPlane’, ‘polyComponentData’, ‘polyHelix’, ‘cacheFile’, ‘historySwitch’, ‘closestPointOnMesh’, ‘transferAttributes’, ‘dynamicConstraint’, ‘NComponent’, ‘polyBridgeEdge’, ‘cacheableNode’, ‘nucleus’, ‘NBase’, ‘cacheBase’, ‘cacheBlend’, ‘cacheTrack’, ‘keyframeRegionManip’, ‘curveNormalizerAngle’, ‘curveNormalizerLinear’, ‘hyperLayoutDG’, ‘pluginImagePlaneNode’, ‘NCloth’, ‘NParticle’, ‘NRigid’, ‘pluginParticleAttributeMapperNode’, ‘cameraSet’, ‘pluginCameraSet’, ‘container’, ‘floatVectorArrayData’, ‘NObjectData’, ‘NObject’, ‘pluginConstraintNode’, ‘asset’, ‘polyEdgeToCurve’, ‘animLayer’, ‘blendNodeBase’, ‘blendNodeBoolean’, ‘blendNodeDouble’, ‘blendNodeDoubleAngle’, ‘blendNodeDoubleLinear’, ‘blendNodeEnum’, ‘blendNodeFloat’, ‘blendNodeFloatAngle’, ‘blendNodeFloatLinear’, ‘blendNodeInt16’, ‘blendNodeInt32’, ‘blendNodeAdditiveScale’, ‘blendNodeAdditiveRotation’, ‘pluginManipulatorNode’, ‘NIdData’, ‘NId’, ‘floatArrayData’, ‘membrane’, ‘mergeVertsToolManip’, ‘uint64SingleIndexedComponent’, ‘polyToolFeedbackManip’, ‘polySelectEditFeedbackManip’, ‘writeToFrameBuffer’, ‘writeToColorBuffer’, ‘writeToVectorBuffer’, ‘writeToDepthBuffer’, ‘writeToLabelBuffer’, ‘stereoCameraMaster’, ‘blendNodeTime’, ‘createBezierManip’, ‘bezierCurve’, ‘bezierCurveData’, ‘nurbsCurveToBezier’, ‘bezierCurveToNurbs’, ‘polySpinEdge’, ‘polyHoleFace’, ‘pointOnPolyConstraint’, ‘polyConnectComponents’, ‘skinBinding’, ‘volumeBindManip’, ‘vertexWeightSet’, ‘nearestPointOnCurve’, ‘colorProfile’, ‘adskMaterial’, ‘containerBase’, ‘dagContainer’, ‘polyUVRectangle’, ‘hardwareRenderingGlobals’, ‘polyProjectCurve’, ‘renderingList’, ‘polyExtrudeManip’, ‘polyExtrudeManipContainer’, ‘threadedDevice’, ‘clientDevice’, ‘pluginClientDevice’, ‘pluginThreadedDevice’, ‘timeWarp’, ‘assembly’, ‘clipGhostShape’, ‘clipToGhostData’, ‘mandelbrot’, ‘mandelbrot3D’, ‘greasePlane’, ‘greasePlaneRenderShape’, ‘greasePencilSequence’, ‘editMetadata’, ‘creaseSet’, ‘polyEditEdgeFlow’, ‘fosterParent’, ‘snapUVManip2D’, ‘toolContext’, ‘NLE’, ‘shrinkWrapFilter’, ‘editsManager’, ‘polyBevel2’, ‘polyCBoolOp’, ‘geomBind’, ‘colorMgtGlobals’, ‘polyBevel3’, ‘timeEditorClipBase’, ‘timeEditorClipEvaluator’, ‘timeEditorClip’, ‘timeEditor’, ‘timeEditorTracks’, ‘timeEditorInterpolator’, ‘timeEditorAnimSource’, ‘caddyManipBase’, ‘polyCaddyManip’, ‘polyModifierManipContainer’, ‘polyRemesh’, ‘polyContourProj’, ‘contourProjectionManip’, ‘nodeGraphEditorInfo’, ‘nodeGraphEditorBookmarks’, ‘nodeGraphEditorBookmarkInfo’, ‘pluginSkinCluster’, ‘pluginGeometryFilter’, ‘pluginBlendShape’, ‘trackInfoManager’, ‘polyClean’, ‘shapeEditorManager’, ‘oceanDeformer’, ‘poseInterpolatorManager’, ‘controllerTag’, ‘reForm’, ‘customEvaluatorClusterNode’, ‘polyCircularize’
Return type: unicode
Derived from api method maya.OpenMaya.MFn.componentTypeName
- createColorSet(colorSetName, modifier=None, instances=None)¶
Create a new empty color set for this mesh. If the name passed in is empty (zero length), or a color set with the same name already exists, then a new unique name is generated and used as the new color set’s name.
Parameters: - colorSetName : unicode
The name of the color set to add.
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- instances : MUintArray
The instance number(s) for which the set should be added, or nullptr if the uv-set should be shared by all instances.
Return type: unicode
Derived from api method maya.OpenMaya.MFnMesh.createColorSetWithName
- createUVSet(uvSetName, modifier=None, instances=None)¶
Create a new empty uv set for this mesh. If the name passed in is empty (zero length), or a uv set with the same name already exists, then a new unique name is generated and used as the new uvset’s name.
Parameters: - uvSetName : unicode
The name of the uv set to add. If a new name needed to be generated then the new name will be returned by the function.
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- instances : MUintArray
The instance number(s) for which the set should be added, or nullptr if the uv-set should be shared by all instances.
Return type: unicode
Derived from api method maya.OpenMaya.MFnMesh.createUVSetWithName
- deleteColorSet(colorSetName, modifier=None, currentSelection=None)¶
Deletes a named color set from the object. If a color set with the given name cannot be found, then no color set will be deleted.
Parameters: - colorSetName : unicode
Name of the color set to delete
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- currentSelection : SelectionSet
Since this method may change the selection list, if you wish to undo its effects, you need to keep track of the current active selection. If this selection list is non-null, then the active selection list will be returned in this argument.
Derived from api method maya.OpenMaya.MFnMesh.deleteColorSet
Undo is not currently supported for this method
- deleteUVSet(setName, modifier=None, currentSelection=None)¶
Deletes a named uv set from the object. If a uv set with the given name cannot be found, then no uv set will be deleted.
Parameters: - setName : unicode
Name of the uv set to delete
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- currentSelection : SelectionSet
Since this method may change the selection list, if you wish to undo its effects, you need to keep track of the current active selection. If this selection list is non-null, then the active selection list will be returned in this argument.
Derived from api method maya.OpenMaya.MFnMesh.deleteUVSet
Undo is not currently supported for this method
- getAssignedUVs(uvSet=None)¶
Get assigned UVs. This method finds all texture coordinates for the mesh that have been mapped, and returns them in the same format as the assignUVs.
Parameters: - uvSet : unicode
UV set to work with
Return type: (int list, int list)
Derived from api method maya.OpenMaya.MFnMesh.getAssignedUVs
- getAssociatedUVSetTextures(uvSetName)¶
Get a list of texture nodes which are using a given uv set. If the texture has a 2d texture placement, the texture, and not the placement will be returned.
Parameters: - uvSetName : unicode
Name of uv set to use
Return type: PyNode list
Derived from api method maya.OpenMaya.MFnMesh.getAssociatedUVSetTextures
- getAxisAtPoint(pt, space='preTransform', uvSet=None)¶
Find the point on the mesh which is closest to the given point, and return the axis at that point.
Parameters: - pt : Point
The point to be queried
- space : Space.Space
The coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
UV set to work with
Return type: (Vector, Vector, Vector, int)
Derived from api method maya.OpenMaya.MSpace.getAxisAtPoint
- getBinormals(space='preTransform', uvSet=None)¶
Return the binormal vectors for all face vertices.
Parameters: - space : Space.Space
Specifies the coordinate system for this operation.
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the binormals aginst.
Return type: FloatVector list
Derived from api method maya.OpenMaya.MSpace.getBinormals
- getCheckSamePointTwice()¶
Return true if checking for duplicate points is turned on. Return false otherwise.
Return type: bool Derived from api method maya.OpenMaya.MFnMesh.getCheckSamePointTwice
- getClosestNormal(toThisPoint, space='preTransform', accelParams=None)¶
Returns the closest point on this surface to the given point. This method also returns the surface normal at that point.
Parameters: - toThisPoint : Point
Point to be compared
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- accelParams : MMeshIsectAccelParams
optional acceleration parameters
Return type: (Vector, int)
Derived from api method maya.OpenMaya.MSpace.getClosestNormal
- getClosestPoint(toThisPoint, space='preTransform', accelParams=None)¶
Returns the closest point on this surface to the given point.
Parameters: - toThisPoint : Point
Point to be compared
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- accelParams : MMeshIsectAccelParams
optional acceleration parameters
Return type: (Point, int)
Derived from api method maya.OpenMaya.MSpace.getClosestPoint
- getClosestPointAndNormal(toThisPoint, space='preTransform', accelParams=None)¶
Returns the closest point on this surface to the given point. This method also returns the surface normal at that point.
Parameters: - toThisPoint : Point
Point to be compared
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- accelParams : MMeshIsectAccelParams
optional acceleration parameters
Return type: (Point, Vector, int)
Derived from api method maya.OpenMaya.MSpace.getClosestPointAndNormal
- getColor(colorId, colorSet=None, defaultUnsetColor=None)¶
Get the value of the specified texture coordinate from this mesh’s color list. The colorId is the element in the color list that will be retrieved. If the color is not set, defaultUnsetColor will be return. If defaultUnsetColor is not set, (0,0,0,1) will be return.
Parameters: - colorId : int
The element in the color list to examine
- colorSet : unicode
Color set to work with
- defaultUnsetColor : Color
default unset color
Return type: Color
Derived from api method maya.OpenMaya.MFnMesh.getColor
- getColorRepresentation(colorSet)¶
This method returns the color representation (RGB/RGBA/A) of a color set.
Parameters: - colorSet : unicode
Color set to work with
Return type: Derived from api method maya.OpenMaya.MFnMesh.getColorRepresentation
- getColorSetFamilyNames()¶
Get the names of all of the color set families on this object. A color set family is a set of per-instance sets with the same name with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family.
Return type: list list Derived from api method maya.OpenMaya.MFnMesh.getColorSetFamilyNames
- getColorSetNames()¶
Get the names of all of the colors sets on this object.
Return type: list list Derived from api method maya.OpenMaya.MFnMesh.getColorSetNames
- getColors(colorSet=None, defaultUnsetColor=None)¶
This method copies the color array for this mesh into the given color array. Use the index returned by getColorIndex to access the array. If the color is not set for a vertex, defaultUnsetColor will be return. If defaultUnsetColor is not set, (0,0,0,1) will be return.
Parameters: - colorSet : unicode
Color set to work with
- defaultUnsetColor : Color
Default unset color
Return type: Color list
Derived from api method maya.OpenMaya.MFnMesh.getColors
- getCurrentColorSetName()¶
Get the name of the “current” or “working” color set. The “current” color set is the color set which is used for color operations when no color set is explcitly specified.
Parameters: - instance : int
Instance of the mesh whose set we are interested in, or kMFnMeshInstanceUnspecified for the set which is shared across all instances.
Return type: unicode
Derived from api method maya.OpenMaya.MFnMesh.currentColorSetName
- getCurrentUVSetName()¶
Get the name of the “current” uv set. The “current” uv set is the uv set which is used for uv operations when no uv set is explicitly specified.
Parameters: - instance : int
Instance of the mesh whose set we are interested in, or kMFnMeshInstanceUnspecified for the set which is shared across all instances.
Return type: unicode
Derived from api method maya.OpenMaya.MFnMesh.currentUVSetName
- getDisplayColors()¶
Determine if the mesh node is set to display vertex colors.
Return type: bool Derived from api method maya.OpenMaya.MFnMesh.displayColors
- getEdgeVertices(edgeId)¶
This method retrieves the object-relative (mesh-relative/global) vertex indices corresponding to the specified edge. The indices can be used to refer to the elements in the array returned by the ‘getPoints’ method.
Parameters: - edgeId : int
The edge to get the vertices for
Return type: (int, int)
Derived from api method maya.OpenMaya.MFnMesh.getEdgeVertices
- getFaceNormalIds(faceIndex)¶
Return normal indices for all vertices for a given face. The normalIds can be used to index into an array returned by MFnMesh::getNormals() ;
Parameters: - faceIndex : int
Index of face (polygon) of interest
Return type: int list
Derived from api method maya.OpenMaya.MFnMesh.getFaceNormalIds
- getFaceUVSetNames(polygonId)¶
This method returns the list of UV sets mapped to a face.
Parameters: - polygonId : int
The polygon ID of the face of interest
Return type: list list
Derived from api method maya.OpenMaya.MFnMesh.getFaceUVSetNames
- getFaceVertexBinormal(faceIndex, vertexIndex, space='preTransform', uvSet=None)¶
Return the binormal vector at a given face vertex.
Parameters: - faceIndex : int
Index of the face of interest
- vertexIndex : int
The object-relative (mesh-relative/global) vertex index
- space : Space.Space
Specifies the coordinate system for this operation.
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the binormals aginst.
Return type: Vector
Derived from api method maya.OpenMaya.MSpace.getFaceVertexBinormal
- getFaceVertexBinormals(faceIndex, space='preTransform', uvSet=None)¶
Return all per-vertex-per-face binormals for a given face.
Parameters: - faceIndex : int
Index of the face (polygon) for which to retrive the binormals
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the binormals aginst.
Return type: FloatVector list
Derived from api method maya.OpenMaya.MSpace.getFaceVertexBinormals
- getFaceVertexColorIndex(faceIndex, localVertexIndex, colorSet=None)¶
Get an index into the array returned by getFaceVertexColors. So that you can index into the array directly, instead of walking it in face-vertex order.
Parameters: - faceIndex : int
The face to look for
- localVertexIndex : int
The face-relative (local) vertex id to look for
- colorSet : unicode
Color set to work with
Return type: int
Derived from api method maya.OpenMaya.MFnMesh.getFaceVertexColorIndex
- getFaceVertexColors(colorSet=None, defaultUnsetColor=None)¶
Get colors for all vertex/faces of the given color set. If the color set is not specified, the default color set will be used. If no vertex/face has color for that vertex, the entry returned will be defaultUnsetColor. If defaultUnsetColor is not given, then (-1, -1, -1, -1) will be used. If a color was set for some but not all the faces for that vertex, the ones where the color has not been explicitly set will have (0,0,0). If a vertex has shared color, the same value will be set for all its vertes/faces.
Parameters: - colorSet : unicode
Color set name
- defaultUnsetColor : Color
Default unset color
Return type: Color list
Derived from api method maya.OpenMaya.MFnMesh.getFaceVertexColors
- getFaceVertexNormal(faceIndex, vertexIndex, space='preTransform')¶
Return a per-vertex-per-face normal for a given face (polygon) and given vertex.
Parameters: - faceIndex : int
Index of the face of interest
- vertexIndex : int
The object-relative (mesh-relative/global) vertex index
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Vector
Derived from api method maya.OpenMaya.MSpace.getFaceVertexNormal
- getFaceVertexTangent(faceIndex, vertexIndex, space='preTransform', uvSet=None)¶
Return the normalized tangent vector at a given face vertex.
Parameters: - faceIndex : int
Index of the face of interest.
- vertexIndex : int
The object-relative (mesh-relative/global) vertex index.
- space : Space.Space
Specifies the coordinate system for this operation.
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the binormals aginst.
Return type: Vector
Derived from api method maya.OpenMaya.MSpace.getFaceVertexTangent
- getFaceVertexTangents(faceIndex, space='preTransform', uvSet=None)¶
Return all per-vertex-per-face tangents for a given face.
Parameters: - faceIndex : int
Index of the face (polygon) for which to retrive the tangents
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the tangents aginst.
Return type: FloatVector list
Derived from api method maya.OpenMaya.MSpace.getFaceVertexTangents
- getHoles()¶
Retrieves a list of the holes in the polygon.
Return type: (int, int list, int list) Derived from api method maya.OpenMaya.MFnMesh.getHoles
- getNormalIds()¶
Return normal indices for all vertices for a all faces. The normalIds can be used to index into an array returned by MFnMesh::getNormals() ;
Return type: (int list, int list) Derived from api method maya.OpenMaya.MFnMesh.getNormalIds
- getNormals(space='preTransform')¶
This method copies the normal list for this mesh into the given array. The normals are the per-polygon per-vertex normals. To find the normal for a particular vertex-face, use getFaceNormalIds() or MItMeshPolygon::normalIndex to get the index into the array.
Parameters: - space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: FloatVector list
Derived from api method maya.OpenMaya.MSpace.getNormals
- getPoint(vertexId, space='preTransform')¶
Get the position of the specified vertex in this mesh’s vertex list.
Parameters: - vertexId : int
The object-relative (mesh-relative/global) index of the vertex to retrieve
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Point
Derived from api method maya.OpenMaya.MSpace.getPoint
- getPointAtUV(polygonId, uvPoint, space='preTransform', uvSet=None, tolerance=0.0)¶
Return the position of the point at the given UV value in the current polygon.
Parameters: - polygonId : int
Search for uv on this face
- uvPoint : (float, float)
The UV value to try to locate
- space : Space.Space
The coordinate system to return “toThisPoint” in
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')¶
This method copies the vertex list for this mesh into the given point array.
Parameters: - space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Point list
Derived from api method maya.OpenMaya.MSpace.getPoints
- getPolygonNormal(polygonId, space='preTransform')¶
Return the normal at the given polygon. The returned normal is a per-polygon normal. See the class description for more information on normals.
Parameters: - polygonId : int
The polygon (face) to get the normal for
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Vector
Derived from api method maya.OpenMaya.MSpace.getPolygonNormal
- getPolygonTriangleVertices(polygonId, triangleId)¶
This method retrieves the object-relative (mesh-relative/global) vertex indices for the specified triangle in the specified polygon. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Parameters: - polygonId : int
The polygon to examine
- triangleId : int
The triangle within the polygon to examine (numbered from zero)
Return type: (int, int, int)
Derived from api method maya.OpenMaya.MFnMesh.getPolygonTriangleVertices
- getPolygonUV(polygonId, vertexIndex, uvSet=None)¶
Get the value of the specified texture coordinate for a vertex in a polygon. Since texture coordinates (uv’s) are stored per-polygon per-vertex you must specify both the polygon and the vertex that the u and v values are mapped to.
Parameters: - polygonId : int
The polygon (face) to examine
- vertexIndex : int
The face-relative (local) vertex id to examine
- uvSet : unicode
UV set to work with
Return type: (float, float)
Derived from api method maya.OpenMaya.MFnMesh.getPolygonUV
- getPolygonUVid(polygonId, vertexIndex, uvSet=None)¶
Get the id of the specified texture coordinate for a vertex in a polygon.
Parameters: - polygonId : int
The polygon (face) to examine
- vertexIndex : int
The face-relative (local) vertex id to examine
- uvSet : unicode
UV set to work with
Return type: int
Derived from api method maya.OpenMaya.MFnMesh.getPolygonUVid
- getPolygonVertices(polygonId)¶
This method retrieves the object-relative (mesh-relative/global) vertex indices for the specified polygon. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Parameters: - polygonId : int
The polygon to examine
Return type: int list
Derived from api method maya.OpenMaya.MFnMesh.getPolygonVertices
- getTangentId(faceIndex, vertexIndex)¶
Return the tangent index for a given face vertex.
Parameters: - faceIndex : int
Index of the face of interest.
- vertexIndex : int
The object-relative (mesh-relative/global) vertex index.
Return type: int
Derived from api method maya.OpenMaya.MFnMesh.getTangentId
- getTangents(space='preTransform', uvSet=None)¶
Return the tangent vectors for all face vertices. The tangent is defined as the surface tangent of the polygon running in the U direction defined by the uv map.
Parameters: - space : Space.Space
Specifies the coordinate system for this operation.
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- uvSet : unicode
The uv map set to calculate the tangents against.
Return type: FloatVector list
Derived from api method maya.OpenMaya.MSpace.getTangents
- getTriangleOffsets()¶
Returns the number of triangles for every polygon face and the offset into the vertex indices array for each triangle vertex (see getVertices() ). The triangleVertices array holds each vertex for each triangle in sequence, so it has three times as many elements as there are triangles. (i.e. three times the sum of the elements of the triangleCounts array)
Return type: (int list, int list) Derived from api method maya.OpenMaya.MFnMesh.getTriangleOffsets
- getTriangles()¶
Returns the number of triangles for every polygon face and the vertex Ids of each triangle vertex. The triangleVertices array holds each vertex for each triangle in sequence, so it has three times as many elements as there are triangles. (i.e. three times the sum of the elements of the triangleCounts array)
Return type: (int list, int list) Derived from api method maya.OpenMaya.MFnMesh.getTriangles
- getUV(uvId, uvSet=None)¶
Get the value of the specified texture coordinate from this mesh’s uv list. The uvId is the element in the uv list that will be retrieved.
Parameters: - uvId : int
The element in the uv list to examine
- uvSet : unicode
UV set to work with
Return type: (float, float)
Derived from api method maya.OpenMaya.MFnMesh.getUV
- getUVAtPoint(uvPoint, space=2, uvSet=None, returnClosestPolygon=False)¶
Find the point closest to the given point, 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), int)
Derived from api method maya.OpenMaya.MSpace.getUVAtPoint
- getUVSetFamilyNames()¶
Get the names of all of the uv set families on this object. A uv set family is a set of per-instance sets with the same name with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family.
Return type: list list Derived from api method maya.OpenMaya.MFnMesh.getUVSetFamilyNames
- getUVSetNames()¶
Get the names of all of the uv sets on this object.
Return type: list list Derived from api method maya.OpenMaya.MFnMesh.getUVSetNames
- getUVSetsInFamily(familyName)¶
Get the names of the uv sets that belong to this set family. Per-instance sets will have multiple sets in a family, with each individual set applying to one or more instances. A set which is shared across all instances will be the sole member of its family and will share the same name as its family.
Parameters: - familyName : unicode
The uv set family name
Return type: list list
Derived from api method maya.OpenMaya.MFnMesh.getUVSetsInFamily
- getUVs(uvSet=None)¶
This method copies the texture coordinate list for this mesh into the given uv arrays.
Parameters: - uvSet : unicode
UV set to work with
Return type: (float list, float list)
Derived from api method maya.OpenMaya.MFnMesh.getUVs
- getUvShellsIds(uvSet=None)¶
Constructs an array of unique integer for each UV shell. This method let the user identify each connected piece of UV.
Parameters: - uvSet : unicode
UV set to work with
Return type: (int list, int)
Derived from api method maya.OpenMaya.MFnMesh.getUvShellsIds
- getVertexNormal(vertexId, angleWeighted, space='preTransform')¶
Return the normal at the given vertex. The returned normal is a single per-vertex normal, so unshared normals at a vertex will be averaged. See the class description for more information on normals.
Parameters: - vertexId : int
The object-relative (mesh-relative/global) vertex index to get the normal for
- angleWeighted : bool
Defines algorithm used to compute normal
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Vector
Derived from api method maya.OpenMaya.MSpace.getVertexNormal
- getVertices()¶
This method retrieves the object-relative (mesh-relative/global) vertex indices for all polygons. The indices refer to the elements in the array returned by the ‘getPoints’ method.
Return type: (int list, int list) Derived from api method maya.OpenMaya.MFnMesh.getVertices
- hasAlphaChannels(colorSet)¶
This method returns true if the color set has Alpha component.
Parameters: - colorSet : unicode
Color set to work with
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.hasAlphaChannels
- hasColorChannels(colorSet)¶
This method returns if the color set has RGB components.
Parameters: - colorSet : unicode
Color set to work with
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.hasColorChannels
- intersect(raySource, rayDirection, tolerance=1e-10, space='preTransform')¶
Determines whether the given ray intersects this polygon and if so, returns the points of intersection. The points of intersection will be in order of closest point to the raySource.
Parameters: - raySource : Point
Starting point for the ray
- rayDirection : Vector
Direction of the ray
- tolerance : float
Tolerance used in intersection calculation
- space : Space.Space
specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: (bool, Point list, int list)
Derived from api method maya.OpenMaya.MSpace.intersect
- isColorClamped(colorSet)¶
This method returns if the color set has its R,G,B,and A components clamped in the range from 0 to 1.
Parameters: - colorSet : unicode
Color set to work with
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isColorClamped
- isColorSetPerInstance(name)¶
Return true if this color set is per-instance, and false if it is shared across all instances. The name provided may be an individual set name or a set family name.
Parameters: - name : unicode
The set name or set family name
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isColorSetPerInstance
- isEdgeSmooth(edgeId)¶
This method determines if the specified edge is smooth (soft).
Parameters: - edgeId : int
The edge to be tested
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isEdgeSmooth
- isNormalLocked(normalId)¶
Test if the normal for a face/vertex pairs is locked (user defined).
Parameters: - normalId : int
Normal to test.
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isNormalLocked
- isPolygonConvex(faceIndex)¶
This method determines if the specified polygon is convex.
Parameters: - faceIndex : int
The polygon to be tested
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isPolygonConvex
- isRightHandedTangent(tangentId, uvSetName=None)¶
Returns true if the normal, tangent and binormal form a right handed coordinate system. By default, Maya uses a right-handed system. Mirrored geometry can introduce a left-handed system.
Parameters: - tangentId : int
tangent index for a given face vertex
- uvSetName : unicode
Name of uv set to use
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isRightHandedTangent
- isUVSetPerInstance(name)¶
Return true if this set is per-instance, and false if it is shared across all instances. The name provided may be an individual set name or a set family name.
Parameters: - name : unicode
The set name or set family name
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.isUVSetPerInstance
- lockFaceVertexNormals(faceList, vertexList)¶
Lock Normals for these face/vertex pairs
Parameters: - faceList : int list
The faces to lock normal in
- vertexList : int list
The corresponding object-relative (global) vertex indices to lock them for
Derived from api method maya.OpenMaya.MFnMesh.lockFaceVertexNormals
Undo is not currently supported for this method
- lockVertexNormals(vertexList)¶
Lock Shared Normals for these vertices.
Parameters: - vertexList : int list
The object-relative (global) verticex ides to lock normals for
Derived from api method maya.OpenMaya.MFnMesh.lockVertexNormals
Undo is not currently supported for this method
- numColorSets(*args, **kwargs)¶
Returns the number of color sets for an object.
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numColorSets
- numColors(colorSet=None)¶
Returns the number of (vertex) color for this mesh. The color are stored in a list which is referenced by polygons requiring color on a per-polygon per-vertex basis. This method returns the number of elements in this list.
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numColors
- numEdges(*args, **kwargs)¶
returns the number of edges as an int
Derived from mel command maya.cmds.polyEvaluate
- numFaceVertices(*args, **kwargs)¶
Returns the number of face-vertices for this mesh.
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numFaceVertices
- numFaces(*args, **kwargs)¶
returns the number of faces as an int
Derived from mel command maya.cmds.polyEvaluate
- numNormals(*args, **kwargs)¶
Returns the number of per-polygon per-vertex normals for this mesh. This number will correspond to the length of the normal array returned by getNormals( normalArray, space ).
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numNormals
- numPolygonVertices(polygonId)¶
Returns the number of vertices for the specified polygon.
Parameters: - polygonId : int
The polygon index
Return type: int
Derived from api method maya.OpenMaya.MFnMesh.polygonVertexCount
- numSelectedEdges(*args, **kwargs)¶
returns the object’s number of selected edges as an int
Derived from mel command maya.cmds.polyEvaluate
- numSelectedFaces(*args, **kwargs)¶
returns the object’s number of selected faces as an int
Derived from mel command maya.cmds.polyEvaluate
- numSelectedTriangles(*args, **kwargs)¶
returns the number of triangles of selected components as an int
Derived from mel command maya.cmds.polyEvaluate
- numSelectedVertices(*args, **kwargs)¶
returns the object’s number of selected vertices as an int
Derived from mel command maya.cmds.polyEvaluate
- numTriangles(*args, **kwargs)¶
returns the number of triangles as an int
Derived from mel command maya.cmds.polyEvaluate
- numUVSets(*args, **kwargs)¶
Returns the number of uv sets for an object.
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numUVSets
- numUVs(*args, **kwargs)¶
Returns the number of texture (uv) coordinates for this mesh. The uv’s are stored in a list which is referenced by polygons requiring textures on a per-polygon per-vertex basis. This method returns the number of elements in this list.
Return type: int Derived from api method maya.OpenMaya.MFnMesh.numUVs
- numVertices(*args, **kwargs)¶
returns the number of vertices as an int
Derived from mel command maya.cmds.polyEvaluate
- onBoundary(polygonId)¶
A method to determines whether the specified face in the mesh is a boundary face.
Parameters: - polygonId : int
The polygon (face) to examine
Return type: bool
Derived from api method maya.OpenMaya.MFnMesh.onBoundary
- classmethod polyTriangulate(pointsAndHoles, pointsCount, outerPointsCount, holesCount, considerNormal, normals)¶
Triangulates a polygon. The polygon consists of 2D positions with optional 3D normals and holes. These 2D positions can be in any coordinate system. 3D positions can be projected to a 2D plane by its face normal. 3D normals are references to help triangulation. This function can work without normals but normals can improve the quality. This function works with pointers and is more efficient than the other variant.
Parameters: - pointsAndHoles : float
Array of 2D positions and hole description. The array contains 2D positions (x,y) followed by the hole offsets. For example, if pointsAndHoles = [x1, y1, x2, y2, ..., x9, y9, o1, o1, o2, o2], then this means that (x1, y1) ~ (x9, y9) are positions, o1 is the offset for the first loop and o2 is the offset for the second loop.
- pointsCount : int
The number of 2D positions in pointsAndHoles
- outerPointsCount : int
The number of outer (non-hole) 2D positions in pointsAndHoles
- holesCount : int
The number of holes in pointsAndHoles
- considerNormal : bool
If true then normals are considered during triangulation
- normals : float
Array of 3D normals. If considerNormal is false, this array can be nullptr. If considerNormal is true, then there must be one normal per point.
Return type: (int, int)
Derived from api method maya.OpenMaya.MFnMesh.polyTriangulate
- removeFaceColors(faceList)¶
Remove previously set color these faces. For each face, the color will be unset for each vertex-face component in the face.
Parameters: - faceList : int list
The faces to remove color from
Derived from api method maya.OpenMaya.MFnMesh.removeFaceColors
Undo is not currently supported for this method
- removeFaceVertexColors(faceList, vertexList)¶
Remove colors for these face/vertex pairs
Parameters: - faceList : int list
The faces to remove color for
- vertexList : int list
The corresponding object-relative (mesh-relative/global) vertex indices to remove color for
Derived from api method maya.OpenMaya.MFnMesh.removeFaceVertexColors
Undo is not currently supported for this method
- removeVertexColors(vertexList)¶
Remove color from these vertices.
Parameters: - vertexList : int list
The object-relative (mesh-relative/global) vertex indices to remove color from
Derived from api method maya.OpenMaya.MFnMesh.removeVertexColors
Undo is not currently supported for this method
- renameUVSet(origName, newName, modifier=None)¶
Renames a uv set from one name to another for this mesh. The original name must exist, and the new name cannot be the same name as one that already exists. In these cases the uv set will not be renamed.
Parameters: - origName : unicode
The name of the uv set to change
- newName : unicode
The name to set the uv set to.
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
Derived from api method maya.OpenMaya.MFnMesh.renameUVSet
Undo is not currently supported for this method
- setCheckSamePointTwice(check=True)¶
This method allows the turning on or off of duplicate point checking when polygons are created or added using this class. Checking for duplicates, is the default state.
Parameters: - check : bool
true for checking, false otherwise
Derived from api method maya.OpenMaya.MFnMesh.setCheckSamePointTwice
- setColor(colorId, color, colorSet=None)¶
Sets the specified color values. The colorId is the element in the color list that will be set. If the colorId is greater than or equal to numColors() then the color list will be grown to accommodate the specified color.
Parameters: - colorId : int
The element in the color list to be set
- color : Color
The new color value that is to be set
- colorSet : unicode
Color set to work with
Derived from api method maya.OpenMaya.MFnMesh.setColor
- setColorClamped(colorSet, clamped)¶
Set the color set to be clamped.
Parameters: - colorSet : unicode
Color set to work with
- clamped : bool
If the color set should be set clamped
Derived from api method maya.OpenMaya.MFnMesh.setIsColorClamped
- setColors(colorArray, colorSet=None)¶
Sets all of the colors for this mesh. The color array must be at least as large as the current color set size. You can determine the color set size by calling numColors() for the default color set, or numColors(colorSet) for a named color set.
Parameters: - colorArray : Color list
The array of color values to be set
- colorSet : unicode
The color set to work with
Derived from api method maya.OpenMaya.MFnMesh.setColors
- setCurrentColorSetName(setName, modifier=None, currentSelection=None)¶
Set the “current” or “working” color set for this object. The “current” color set is the set to use by functions that do not have a specific color set defined.
Parameters: - setName : unicode
Name of color set to make “current”
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- currentSelection : SelectionSet
Since this method may change the selection list, if you wish to undo its effects, you need to keep track of the current active selection. If this selection list is non-null, then the active selection list will be returned in this argument.
Derived from api method maya.OpenMaya.MFnMesh.setCurrentColorSetName
- setCurrentUVSetName(setName, modifier=None, currentSelection=None)¶
Set the “current” uv set for this object. The “current” uv set is the uv set to use when no uv set name is specified for a uv set operation. If the uv set does not exist then the “current” uv set will not be changed.
Parameters: - setName : unicode
Name of uv set to make “current”
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
- currentSelection : SelectionSet
Since this method may change the selection list, if you wish to undo its effects, you need to keep track of the current active selection. If this selection list is non-null, then the active selection list will be returned in this argument.
Derived from api method maya.OpenMaya.MFnMesh.setCurrentUVSetName
- setDisplayColors(enable)¶
Set whether the mesh node should display vertex colors.
Parameters: - enable : bool
True to turn on color display, false to turn it off.
Derived from api method maya.OpenMaya.MFnMesh.setDisplayColors
- setEdgeSmoothing(edgeId, smooth=True)¶
This method sets the specified edge to be hard or smooth (soft). You must use the cleanupEdgeSmoothing method after all the desired edges on your mesh have had setEdgeSmoothing done. Use the updateSurface method to indicate the mesh needs to be redrawn.
Parameters: - edgeId : int
The edge to set the smoothing information for
- smooth : bool
If true the edge will be smooth (soft), otherwise the edge will be hard.
Derived from api method maya.OpenMaya.MFnMesh.setEdgeSmoothing
Undo is not currently supported for this method
- setFaceColor(color, faceIndex)¶
Set vertex-face Color for all vertices on this face.
Parameters: - color : Color
The color to set
- faceIndex : int
The face to set it for
Derived from api method maya.OpenMaya.MFnMesh.setFaceColor
Undo is not currently supported for this method
- setFaceColors(colors, faceList)¶
Set color for these faces. The color will be set for each vertex-face component of a face.
Parameters: - colors : Color list
The colors to set
- faceList : int list
The faces to set it for
Derived from api method maya.OpenMaya.MFnMesh.setFaceColors
Undo is not currently supported for this method
- setFaceVertexColor(color, faceIndex, vertexIndex, modifier=None)¶
Set color for this vertex in this face.
Parameters: - color : Color
The color to set
- faceIndex : int
The face to set it for
- vertexIndex : int
The object-relative (mesh_relative/global) vertex index to set it for
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
Derived from api method maya.OpenMaya.MFnMesh.setFaceVertexColor
Undo is not currently supported for this method
- setFaceVertexNormal(normalIn, faceId, vertexId, space='preTransform', modifier=None)¶
Set Normal for this face/vertex pair
Parameters: - normalIn : Vector
The normal to set
- faceId : int
The face to set it for
- vertexId : int
The object-relative (mesh-relative/global) vertex index to set it for
- space : Space.Space
World space or Object space
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
Derived from api method maya.OpenMaya.MSpace.setFaceVertexNormal
Undo is not currently supported for this method
- setNormals(normals, space='preTransform')¶
Set the normal array (user normals)
Parameters: - normals : FloatVector list
The normal array to set
- space : Space.Space
World space or Object space
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Derived from api method maya.OpenMaya.MSpace.setNormals
- setPoint(vertexId, pos, space='preTransform')¶
Sets the position of specified vertex in the vertex list for this mesh.
Parameters: - vertexId : int
The object-relative (mesh-relative/global) index of the vertex to be changed
- pos : Point
The new value for the vertex
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Derived from api method maya.OpenMaya.MSpace.setPoint
- setPoints(vertexArray, space='preTransform')¶
This method copies the points in the given point array to the vertices of this mesh.
Parameters: - vertexArray : Point list
Storage for the vertex list
- space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Derived from api method maya.OpenMaya.MSpace.setPoints
- setSomeColors(colorIds, colorArray, colorSet=None)¶
Sets the specified colors for this mesh. If the largest colorId in the array is larger than numColors() then the color list for this mesh will be grown to accommodate the new color values.
Parameters: - colorIds : int list
The array of colorIds to set values for
- colorArray : Color list
The array of color values to be set
- colorSet : unicode
Color set to work with
Derived from api method maya.OpenMaya.MFnMesh.setSomeColors
Undo is not currently supported for this method
- setSomeUVs(uvIds, uArray, vArray, uvSet=None)¶
Sets the specified texture coordinates (UV’s) for this mesh. The uv arrays and uvId array must be of equal size. If the largest uvId in the array is larger than numUVs() then the uv list for this mesh will be grown to accommodate the new uv values. If a named uv set is given, the array will be grown when the largest uvId is larger than numUVs(uvSet).
Parameters: - uvIds : int list
The array of uvIds to set values for
- uArray : float list
The array of u values to be set
- vArray : float list
The array of v values to be set
- uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.setSomeUVs
Undo is not currently supported for this method
- setUV(uvId, u, v, uvSet=None)¶
Sets the specified texture coordinate. The uvId is the element in the uv list that will be set. If the uvId is greater than or equal to numUVs() then the uv list will be grown to accommodate the specified uv. If a named uv set is given, the largest uvId must be larger than numUVs(uvSet).
Parameters: - uvId : int
The element in the uv list to be set
- u : float
The new u value that is to be set
- v : float
The new v value that is to be set
- uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.setUV
- setUVs(uArray, vArray, uvSet=None)¶
Sets all of the texture coordinates (uv’s) for this mesh. The uv arrays must be of equal size and must be at least as large as the current UV set size. You can determine the UV set size by calling numUVs() for the default UV set, or numUVs(uvSet) for a named UV set.
Parameters: - uArray : float list
The array of u values to be set
- vArray : float list
The array of v values to be set
- uvSet : unicode
UV set to work with
Derived from api method maya.OpenMaya.MFnMesh.setUVs
- setVertexColor(color, vertexIndex, modifier=None)¶
Set color for this vertex. The color is set for the vertex-face in each face that the vertex belongs to.
Parameters: - color : Color
The color to set
- vertexIndex : int
The object-relative (mesh-relative/global) vertex index to set it for
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
Derived from api method maya.OpenMaya.MFnMesh.setVertexColor
Undo is not currently supported for this method
- setVertexNormal(normalIn, vertexId, space='preTransform', modifier=None)¶
Set Shared Normal for this vertex
Parameters: - normalIn : Vector
The normal to set
- vertexId : int
The object-relative (mesh-relative/global) vertex index to set it for
- space : Space.Space
World space or Object space
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
- modifier : MDGModifier
Since this method may modify the DG, if you wish to undo its effects, you need to keep track of what needs to be undone. If the modifier is non-null, and this MFnMesh refers to a shape, then it will add the command to be undone to the modifier. Use MDGModifier::undoIt to undo the effects of this method.
Derived from api method maya.OpenMaya.MSpace.setVertexNormal
- syncObject()¶
If a non-api operation happens that many have changed the underlying Maya object wrapped by this api object, make sure that the api object references a valid maya object. In particular this call should be used if you are calling mel commands from your plugin. Note that this only applies for mesh shapes: in a plugin node where the dataMesh is being accessed directly this is not necessary. Derived from api method maya.OpenMaya.MFnMesh.syncObject
Undo is not currently supported for this method
- unlockFaceVertexNormals(faceList, vertexList)¶
Unlock Normals for these face/vertex pairs
Parameters: - faceList : int list
The faces to unlock normal in
- vertexList : int list
The corresponding object-relative (global) vertex indices to unlock them for
Derived from api method maya.OpenMaya.MFnMesh.unlockFaceVertexNormals
Undo is not currently supported for this method
- unlockVertexNormals(vertexList)¶
Unlock Shared Normals for these vertices
Parameters: - vertexList : int list
The vertices to unlock normals for
Derived from api method maya.OpenMaya.MFnMesh.unlockVertexNormals
Undo is not currently supported for this method
- updateSurface()¶
Signal that this polygonal mesh has changed and needs to redraw itself. Derived from api method maya.OpenMaya.MFnMesh.updateSurface
Undo is not currently supported for this method
- worldArea(*args, **kwargs)¶
returns the surface area of the object’s faces in world space as a float
Derived from mel command maya.cmds.polyEvaluate