I have a script that selects the top polygons for a few separate objects, and i want to put them all in one array/group (i don’t have a preferred choice)
After the selection happens I don’t know how to add them to a group/array (I have a for loop that goes through each object)
I can accsess the ‘selectedFaces’/polyop.getFaceSelection but i don’t know how to transfer the face to a working list
I would love some help on the topic
When I try and attach the face to a random editable poly it gives me this message:
– Error occurred in anonymous codeblock; filename: ; position: 36; line: 2
– Unable to convert: #faces( : $Box001) to type:
– MAXScript callstack:
– thread data: threadID:4444
– [stack level: 0]
– In top-level
thanks very much
Solved! Go to Solution.
Solved by denisT.MaxDoctor. Go to Solution.
polylist = polyop.getFaceSelection obj
polyOp.detachFaces obj polyList delete:true asNode:true
polyop.attach $box001 polylist
I want to detach the selected faces of an object, and than I want to attach them to a different object (in this case box001)
fn reattachPolyFaces source target faces: delete:on = ( if faces == unsupplied do faces = target.selectedfaces as bitarray if not faces.isempty do ( if (polyop.detachfaces target faces delete:delete asnode:on) do ( _faces = objects[objects.count] polyop.attach source _faces ) ) ) /* detaches specified faces (or selected) from <target> (optional delete == ON) and attaches to <source> using: reattachPolyFaces <to_poly_objects> <from_poly_object> faces:<optional bitarray> delete:<optional> */
Can't find what you're looking for? Ask the community or share your knowledge.