Ok I think I remember now. I checked one of my plugins where I had to delete some faces. And the API does seem to be bugged. Here's how I did it :D Little hack but it should work.
Extract the faces with MFnMesh extractfaces, than use MFnMesh collapseFaces on the extracted faces. After you collapsed them and do an Updatesurface maya "deletes" those faces. :D Cheers, J On Thursday, June 11, 2015 at 4:29:03 PM UTC+2, Dilen Shah wrote: > > Hey Janos, > > Hahahahah, you know what I just did try it couple of hours that, but it > still doesn't do anything. > > D. > > > On Thursday, June 11, 2015 at 3:59:10 PM UTC+2, Janos Hunyadi wrote: >> >> What you can do it is put it into a plugin. Compute it inside your plugin >> and output the mesh as a plug. It should work that way. >> J >> >> On Wednesday, June 10, 2015 at 5:45:34 PM UTC+2, Dilen Shah wrote: >>> >>> Hey Janos, >>> >>> I am using Maya 2014, and it doesnt do it for me, I tried it on a plane >>> and tried to deleteFace, deleteEdge but it didnt do it for me and I am >>> using normal viewport and not viewport 2.0. I am using Python API. >>> >>> I got no clue why it isnt doing it for me. >>> >>> D. >>> >>> >>> >>> On Tuesday, June 9, 2015 at 8:28:26 PM UTC+2, Janos Hunyadi wrote: >>>> >>>> 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c7137291-128d-4e1d-8775-c39c3fc3adc5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.