获取当前工程名字
import pymel.core as pmmaya_file = pm.sceneName()print(maya_file)
获取形状(shape)属性面板下类型名字
import pymel.core as pmmyplane = pm.nurbsPlane()shape = myplane[0].getShape()print(shape.longName())print(shape.name())
获取对象点、线、面
import pymel.core as pm#创建一个方盒,每条边的细分都为10cube = pm.polyCube(name="mycube",subdivisionsWidth=10,subdivisionsHeight=10,subdivisionsDepth=10)shape = cube[0]#获取物体一共有多少个点、线、面print(shape.numVertices())print(shape.numEdges())print(shape.numFaces())#这些组件都是可以索引的print(shape.verts[0])print(shape.edges