Notifications
Clear all

[Closed] getSelectedFaces does not work for multiple selection

Hi, i am new to maxscript. And here is my issue. My task is to get selected uv faces, i use this function for it getSelectedFaces and it is all working ok, until i select multiple objects in scene, then i got type of selection ObjectSet and i can’t get faces using this way. I tried iterate thru selection and this neither work. Only way i found so far is select single object in code and get selected faces for it and then return selection for all objects after job is done. But this is very slow for multiple objects.

If there any way get selected uv faces when multiple objects is selected?

3 Replies

for s in selection where s.modifiers[‘unwrap_uvw’] != undefined collect s.modifiers[‘unwrap_uvw’].getSelectedFaces()

or

for s in selection where s.modifiers[‘unwrap_uvw’] != undefined collect #( s, s.modifiers[‘unwrap_uvw’].getSelectedFaces())

if you need to keep track of which selection corresponds to which object

thank for reply, i already find the solution in this thread http://forums.cgsociety.org/archive/index.php?t-1119598.html

Thank you for reply, i already found the solution in this thread http://forums.cgsociety.org/archive/index.php?t-1119598.html