They didnt include it in the pymel api wrapper, but this would be it I think.
import pymel.core as pm import maya.OpenMaya as OpenMaya face = pm.MeshFace("pCube1.f[64]") pt = face.__apimfn__().center(OpenMaya.MSpace.kWorld) centerPoint = pm.datatypes.Point(pt) -- justin On Thu, Sep 22, 2011 at 10:21 AM, owen burgess <owen.burg...@gmail.com>wrote: > Hi Roland, > > Perhaps this might help: > > > http://mayastation.typepad.com/maya-station/2009/11/where-is-the-center-of-a-polygon.html > > regards, > Owen > > > On 22 September 2011 14:58, moesian <rolandlamb...@googlemail.com> wrote: > >> Hello, >> >> Whats the best way to get the center of a face using pymel? >> pymel.core.general.MeshFace doesn't seem to have a method for it. If >> no method exists would it be possible to extend >> pymel.core.general.MeshFace to include one? >> >> Thanks >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe