PDA

View Full Version : Select uvs based on uv range


fghajhe
07-27-2012, 01:58 AM
I have a selection of faces. I need to select from that selection only the faces within for example : a uv range of 0,0 to .5, .5
Is there an effecient way to do this in mel for lots of objects?

Can this be done with the polySelectConstraint command? It only seems to be able to select based on UV area, not a uv range.

http://download.autodesk.com/global/docs/maya2013/en_us/Commands/polySelectConstraint.html

palohman
07-27-2012, 03:04 AM
this can run super quick even with python or mel using simple loops, the mistake often made when scripting with component information is to request the information(e.x. uv coords) once for every component instead of making the request once and sorting out the info after

fghajhe
07-27-2012, 03:59 AM
Thanks for your reply.

There is a code example that works here I found which may be a possible solution. It does end up checking each uv to see if its in the specified range though which can be slow for large scenes with many objects + high polycount. I will also have to add more code so it performs only on the selected faces and works on objects despite hierarchy and if they have the same name which might get interesting/ slower. Hopefully there is a better solution.

http://www.creativecrash.com/forums/mel/topics/select-faces-in-uv

CGTalk Moderation
07-27-2012, 03:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.