Pedro, Justin - Thank you both so much for your replies. This is definitely a lot simpler than what I was doing, and I learned a lot from what you both did.
However, I did have some problems in certain cases with the script - When used on a cube or a plane, it worked as expected. BUT, when I tried it on a sphere, and then several more complicated character models, it did not give me the correct results. For example, try running the script on a completely default polySphere . Unless I am doing something wrong, I do not believe it works quite as expected, as it is deleting some faces it should not, and leaving some that should be deleted. I am wondering if it because of the xform command? It seems like the xform of each face is located not in the center, but in the corner. Therefore (at least in the sphere example) some of the faces that are actually in negative x, come back with an xform of 0. I'm going to try to do a bit more experimenting on this when I have a chance, but if either of you have any additional thoughts, I'd love to hear them! Thanks again! Aren On Monday, January 27, 2014 9:39:15 PM UTC-6, Pedro Bellini wrote: > > Hi Justin, great suggestions. > > also, if wanted to separate already the first element, then we can just > use the one liner > obj = cmds.ls(sl=1)[0] #like Aren has on the original code > > xrange indeed should be used over range since its more efficient while > dealing with large amounts. I was testing in a cube with a couple of > divisions =\ > attr cleanup also looks better > > btw, critiques are always welcome. > cheers > > -- 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/68190869-e9a1-4f2f-a7e0-0f6cf1ea410a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
