PDA

View Full Version : Mel script help


Chris528
05-14-2008, 07:33 PM
Hi,
I just imported a half life 2 map I built in hammer and have 500+ brushes that need to have there vertices merged. The problem that I'm having is each brush was split up into planes with unmerged vertices. How would I write a script that will go through each polygonal object in my scene and merge all vertices within .01 of each other?
,thanks

dbsmith
05-15-2008, 04:48 AM
Just go into vertex component mode, drag over all your objects and go Edit Polys > Merge Vertices [ ] set to 0.01

ewerybody
05-15-2008, 06:49 AM
but then there shall be only 1 object. You'd have to combine all objects before you could merge the vertices all in one go.

but you could write a loop that browses your selection.

// pseudo pseudo code:
for ($obj in `ls -sl`)
mergeVertex -d 0.1 $obj; I just don't know the exact command now for merging verts. But you should dig that ;]

CGTalk Moderation
05-15-2008, 06:49 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.