Works for me in Maya 2016. I just replaced the outputShape with a simple subdivided plane-s output shape "pPlaneShape1" and it deleted it. It might be something with Viewport 2.0. What maya version are you using? 2015 If I recall correctly might have some update issues with VP 2.0 in python.
J On Monday, June 8, 2015 at 11:29:02 AM UTC+2, Dilen Shah wrote: > > Hey guys, > > I am trying to delete faces from my Mfnmesh using MFnMesh.deleteFace() > command but it seems to be not working. > > Here is my code: > > import maya.OpenMaya as OpenMaya > > name = "outputShape" > > list = OpenMaya.MSelectionList() > node = OpenMaya.MObject() > list.add(name) > list.getDependNode(0, node) > > meshFn = OpenMaya.MFnMesh(node) > > meshFn.deleteFace(14) > meshFn.updateSurface() > > It does absolutely nothing, can anyone tell me if there is another way to > do it in API or am I doing something wrong? > > Thank you. > > D. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ac3f8753-9db8-4407-87ea-77b7ae516764%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
