First Script! looking for advice/mentor/help

I just spent the last 5 days learning maxscript, but I finally got a script working. The script is pretty simple, it takes 5 objects and aligns them to the corresponding points on a the selected quads of a target obj.I just got the script working, but it has a lo~~~t of kinks to work out. Would somebody be willing ot help me out, by looking over, or letting me bounce some simple questions about maxscript programming concepts off them. Anyway its a cool script you should take a look at it even if you don't want to help out


only works on faces faceing forwards or backwords ( I need a more inclusive vert sorting method) (solved)

spamms the selectionsets (simple fix, need to switch over to using arrays (?))(solved)

runs slow for large amounts of quad selections(solved kinda)

no warnings for errors (these a referred to as callback errors, no?)

picking faces problems


Things to imlpement:

saving the move object so that it can be reused with out ht euser having to repick everything every time

moving over from using faceselections sets to letting the user dynamically pick and align faces in realtime

jpaligner10working.ms5.1 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nudity's picture

I did some more work on this

I did some more work on this script. it now uses selectionsets instead of making the user click ten times every time the script is run. Also big breakthrough, I repurposed some of Shawn Olson's wallworm script to let the user immediately see the alignment. The script is far simpler to use now.

the sort vertices algorithm is stll very limited in what it can handle. I could really use some help reworking it to handle more cases and stop crashing all the time. I was hoping to evaluate each quad by rotating it around its center so that it faces the the identity matrix, then getting corner array by comparing XY values. This is beyond my mathematical or coding prowess though. Perhaps sombody could help me out please.

AttachmentSize 7.48 KB
jpalignexample.max 916 KB
nudity's picture

I rewrote the vertex sorter.

I rewrote the vertex sorter. Now the script runs pretty smoothly. The picking messes up on ePolys that aren't all quads. I'll probably work on that next.It would be ready to submit once that happens I suppose. Anyone, feedback?

AttachmentSize 9.96 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.