Hey all, I'm working on a tool that can check a mesh for problems before getting exported. I would like to utilize the Mesh Cleanup tool (or something equivalent) to do part of this. Currently I am doing it like this:
#Check for non-manifold geometry def checkNonManifold(object, chk): curSel = cmds.ls(sl=True) #checkNMG = cmds.polyInfo(nonManifoldVertices=True, laminaFaces=True, nonManifoldEdges=True) # <---My initial solution, but not ideal because it doesn't catch all the issues. checkNMG = mel.eval('polyCleanupArgList 3 { "0","2","1","0","1","1","1","0","0","1e-005","1","1e-005","1","1e-005","0","1","1" };') # <----Here is the problem if chk == 7: if len(checkNMG) > 0: checkFail(object, chk) cmds.selectMode(object=True) cmds.select(curSel) It is working fine, but what I don't like is that if there are no issues on the mesh it spits out a warning saying "No items found to cleanup etc." Can anyone think of way to prevent or suppress that warning? As you can see, I was initially using the cmds.polyInfo command which nice because it was not causing a warning like that, but I decided not to use it because it did not have flags for all the different issues I needed to check for. I did some research on catchQuite, but I don't know how to do a mel.eval inside of another mel.eval (and it seems super messy!). Thanks for any help you can provide! Aren -- 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/0cf845da-5bb4-4b2d-b248-f54b5c551492%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.