View Full Version : Helpful Script: Border + Paint Bucket Face Selection

01 January 2005, 03:30 PM
Last night I was trying to break up my object into different material ID zones for UV mapping and I found the task to be practically impossible due to the complexity of the object combined with the number of interior faces....backface selection doesn't work when the back faces are facing you!

So, I whipped up this little script that actually makes it possible for me...and I intend to improve upon it a great deal because I have so much stuff I have to UV map that it will probably save me time in the long run even if I only use it for this one project (which is doubtful! I'll probably be using it a lot!)

The way it works...

1) Define a border loop by selecting a closed loop of edges (Gaussian loop). It is not important if there are extraneous edges selected.
2) Click 'Define Loop'
3) Switch to face sub object mode and select any face within (or outside of) the border loop.
4) Click 'FillFaces' and the selection will grow up to the borders. Any places where the borders dont quite connect will be evidenced by "leaking"...we are familiar with this from the paint bucket tool but here you can actually see the selected polys flooding out.

Right now you have to click FillFaces a number of times...although it is exponential, I intend to change that so the iterations are performed automatically. I also plan to make it so that you can have a checkbox to control if faces with material ID's differing from the initally selected face can/cannot be well as a list of mat ID's to include/exclude from the make the process of breaking up into complete sections for UV editing even easier. Also, it only works on editable meshes right now...I will be expanding it to work on editable polys as well.

This is only the 2nd MAXSCript I've worked on so I'm not quite sure how to make a GUI pop up for the check box etc...but I can do this in MAXSCript right?

Any more suggestions? Ill post the script(s) once I get it all nice and pretty (unless someone wants it now lol)

01 January 2005, 04:09 PM
Looks good.
I'm not in scripting, so no help from me :hmm: .
But I think it would be useful for me (and others) even as it works now. So if you can give us some kind of beta it would be great :bounce: , doesn't matter it's not polished.

01 January 2005, 08:14 PM
here's a fully functional improved version

01 January 2005, 09:53 PM
Thanks :thumbsup:

CGTalk Moderation
01 January 2006, 10:00 PM
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.