This is my very first script and I wanted to share it on here. Hopefully I can get some feedback. There might still be some bugs, and some of the code might be able to be optimized further, but again, this is my first script so I don't know all the commands. And maybe someone did this already, or there is some special way…
Ok cool. Just a few questions about your code. If I don't select any verticies (btn1) i don't get an error message. You used the line "format "No Verticies are selected.\m"" but shouldn't there also be a messageBox to display the error? And why is 'redraw off' and 'undo "Align Vertices"' when pressing btn2? Thanks again.
xXm0RpH3usXx: Yeah you are right, but it looks like monster already dealt with that :) Thanks for pointing that out though. monster: Wow, thanks a lot for taking the time to rework my code! Yeah I knew it wasn't efficient, but my goal was just to make it work. Again, I am new to maxscript. I'll have a closer look at it…
Btn1 - I changed messageBox to format, because in my experience people don't like popups. Many of the built in tools in Max don't display pop ups. I think maybe a better way would be to have the buttons disabled until you have the proper selection. This is preference though. Btn2 - Redraw Off means the viewport won't…
Pretty cool man! I get excited when people try to learn MaxScript. Lots of little things I would change, but the biggest one is just doing less in the loop. Try to figure out what can live outside the loop. I change a few things, then a little more, but this is how I would have created it. For 2000 verts I was able to…
Got it down to 1 millisecond! In the first pass above I was thinking how to optimize the loop, but then I wanted to get rid of the loop. Thanks for being open to suggestions. If you ever have MaxScript questions you can message me. rollout VertexAlign "Vertex Align" width:136 height:160 --Code by Francois Stelluti -…
i am bvy no means a coder, but do you really need to "refresh" the script everytime the radiobutton is changed? wouldnt it be enough to check which state is activated in the "on btn2 pressed [...]" section? its minor, but a design choice which could take a lot longer in a more heavy script...