aFaces = (polyOp.getFaceSelection $) as array
for currentFace in aFaces do
(
aVerts = polyOp.getFaceVerts $ currentFace
polyop.setVertSelection $ aVerts
$.connectVertices()
)
drag and drop this onto your UI and name the button, This will only work on editable poly objects. Its more accurate than converting the face selection to verts as it doesnt triangulate extra border faces
I have tried this and it generates faces all over the place. What I am after is something that follows Maxs invisible triangulation. I would like avoid triangulating the entire model.
That's weird. I've tried manually triangulating a model using connect verts, and it did just use follow the same pattern as the internal triangulation. No nonsense like your image on the right.
Well the problem with the example shown here is that the polygon on the right has a valid edge connection path between all 3 vertices on the right. If you use connect it will always connect those.
Although looking at the script that was posted, it should work, since it should only process each selected face one at a time...
Mr. Bean: I believe the point of the thread was to "triangulate selected faces" only, not triangulate the whole object.
Ah, you're right. I guess you could detach the polys and convert that object to an editable patch and back to editable poly, then reattach, but I'm guessing that wouldn't be very efficient.
Connect works fine, just select the two verts where you want the edge to appear, that's how I do it. You can also do like in Maya with the cut tool. If you look at other macros that max ships with you mimic the formatting of the header you can find it under customize and add a shortcut it. I think there are scripts that triangulate the model too.
Yeah sorry guys I wasn't very clear, I'm needed to do this on a ton of objects so while things like selecting vertex pairs and connecting works it just took to much time.
Converting to patch triangulates the whole object, what might be unclear was that I wanted only the selected faces to be triangulated.
Sage: Ok, I will take a look.
Howeever, r_fletch_rs script seems to work just the way I needed it to, thanks man!
Howeever, r_fletch_rs script seems to work just the way I needed it to, thanks man!
very welcome, if you need to do this to a long list of objects the script could handle that aswell. Select your faces in each object select them all and run this. I havent tested the new bit (on a mac so no max) but its simple stuff so it should work
for obj in selection do
(
aFaces = (polyOp.getFaceSelection obj) as array
for currentFace in aFaces do
(
aVerts = polyOp.getFaceVerts obj currentFace
polyop.setVertSelection obj aVerts
obj.connectVertices()
)
)
Sorry to revive this ancient thread, but after having found this script through the forum search a while ago, and it having saved me at least a couple of hours of tedious work, i figured maybe i could point out some deficiencies.
on to the pics!
Example I works fine. Example II works fine except for the faces adjacent to the vertex lying flat on an edge with other vertices. Is there any way to check for such "coplanar" verts (for lack of better words) before executing the connectvertices command which goes by shortest edge distance i assume..?
Replies
drag and drop this onto your UI and name the button, This will only work on editable poly objects. Its more accurate than converting the face selection to verts as it doesnt triangulate extra border faces
Tiros: much easier to just convert to an editable patch model and back again, that will triangulate it
Although looking at the script that was posted, it should work, since it should only process each selected face one at a time...
Right click on the editable poly and convert it to an editable patch.
I don't use 2010, but I think it should still work.
Convert the object to patch and then convert back to poly.
Ah, you're right. I guess you could detach the polys and convert that object to an editable patch and back to editable poly, then reattach, but I'm guessing that wouldn't be very efficient.
Converting to patch triangulates the whole object, what might be unclear was that I wanted only the selected faces to be triangulated.
Sage: Ok, I will take a look.
Howeever, r_fletch_rs script seems to work just the way I needed it to, thanks man!
very welcome, if you need to do this to a long list of objects the script could handle that aswell. Select your faces in each object select them all and run this. I havent tested the new bit (on a mac so no max) but its simple stuff so it should work
on to the pics!
Example I works fine. Example II works fine except for the faces adjacent to the vertex lying flat on an edge with other vertices. Is there any way to check for such "coplanar" verts (for lack of better words) before executing the connectvertices command which goes by shortest edge distance i assume..?
Uploaded with ImageShack.us