ScriptSpot home

Straighten Edge

Downloads

3ds Max compatibility
See original listing claims
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
2.0.0
From original requirements
2025 or newer
Original version requirement
2025+
Legacy votes
69
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

Royal Ghost

More by this author


Straighten Edge (maxscript) allows projecting and placing selected vertices/edges on the given straight line on the Editable Poly object, Edit Poly modifier, and Editable Spline & Line objects.


When the SHIFT key is pressed, vertices/edges will be straightened with axis constraints
in the chosen Reference Coordinate Systems. For how to use axis constraints, please read the 3ds Max help Using the Axis Constraints chapter.

When the ALT key is pressed, vertices/edges will be straightened and normalized in their distance/lengths.

The script works with the following objects / modifiers:

 

  • Editable Poly object
  • Edit Poly modifier
  • Editable Spline object
  • Line object

    Supported Reference Coordinate Systems:

  • World
  • Working Pivot
  • Parent
  • Screen

Setup & notes

2.0.0 (03.04.2026) for 3ds Max 2025+ 

  • Rewritten and improved projection to line calculations 
  • Added support for constraints by axes of Working pivot, Parent, Screen, World 
  • Improved normalize calculations Removed script “Straighten Edge (Spline Undo)”, it not needed in modern versions of 3ds Max
  • Cleaned up and refactored code
Videos
Comments (28)
Евгений Шабанов

Great script for every day!

Thank you very much for your script, I always use it.

Спасибо большое за Ваш скрипт. Постоянно им пользуюсь!

themaxxer

any news about axis constraints...?
if this would work I would use the script every day! :)
thanks.

themaxxer

appius

same for me. the shift key doesn't work.

Reply to appius
Royal Ghost

Axis constraints not work properly, please do not use it. I have no time and experiences of math to fix it. :(

themaxxer

the constraint thing is not working for me either

thanks
themaxxer

grasshopper

Axis Constraint

I am still having problems using the constraint function. When I hold shift it no longer functions.

It is working on my home PC but not at work. Both Windows 7 both Max 2013. Any clues as to why? thanks

Cobra

Hi everyone,

I am having a problem when trying to use this script.
In the animated diagram on the left above it shows it aligns the points perfectly, I am trying this to a peice of track I am editing and it doesn't align it the way it is shown above, actually the points get all messed up.
Please can someone help me.

Thank you

Reply to Cobra
Royal Ghost

Cobra: I can't understand what the problem. Can you send me video or example with this problem?

Fredblub

Pen Tablet

Hi there,
I'm working Max 2010, using a pen tablet full time 'cause i find it more natural than my 2 fingers waiting to click above theirs buttons. It works fine in every manipulation I do, except for your great script that I use a lot : once I've selected my verteces and choosen your tool, it's almost impossible to catch the end verteces, unless you click for a dozen times (if lucky). No settings of the tablet would change that matter of fact. I'm using an Intuos 4L last generation.
Any clue?
Thanks
Fredblub

Reply to Fredblub
Royal Ghost

Tablet Edition

Fredblub: It seems another :/ max bug. Seems pickPoint maxscript function doesn't work properly. I created "Tablet Edition" where replace broken pickPoint with another working function. Please try attached sedget.mcr!

Also I recommend submit as a bug to Autodesk about this broken function.

p.s. About not proper work of constraint mode - sorry, still no fixed

Reply to Royal Ghost
Fredblub

Hey, thanks a lot! The replaced fonction works great!
No regret for the lost rubber band since I do not have to drop my pen for the moose anymore.
You did that fast and efficiently
Thanks again!

Playdo

Select only vertices/edges and not the end points + constrain?

Hi Royal Ghost. I've been looking for a script similar to this for a long time. Is it possible to script it so that you only select the line of vertices or edges and then run the script? So instead of having to click on the two end vertices, it will just straighten between the end points of the line. And to also be able to constrain it to Edge/Face?

I know that this is what Straighten in Graphite Tools, Loop Tools does, but unfortunately you can not constrain it to Edge/Face mode, which would be so useful.

I'm not a coder, so I've looked everywhere for this script but have not found one.

Royal Ghost

I have found why vertexes are not straighten when axis constraint mode active. I need more time to fix algorithm of straighten to get it work. :(

grasshopper

Thanks for the script it's really handy.

Like Royal Ghost I to am having problems with the axis constraint to, it just doesn't want snap to the vertex's. I am using max design 2010.

Cobra

Hi Everyone,

I can't get this script to work at all.
I am using Max 8

Can someone help me :)

Thank you.

jsrocha

Hi Royal ghost, first of all, thanks for this script, is a very handy one. I have two comments: first, for me is very difficult to pick the vertices when i´m holding shift key, for axys constrain. I need to click several times to get the vertices selected. It happens to you too? Am i doing something wrong? second, when i use axis contrain (z for instance), i noticed that the vertices doesn´t get perfectly aligned, i need to run the script again to get better results (not perfect yet, but the diference is very subtle). Have you noticed too?
ok man, that´s it, thanks again for this very useful script!
cheers

Jsrocha - Brasil

Reply to jsrocha
Royal Ghost

Hello jsrocha. I have checked your remarks and have found:
1. I have the same problems with Shift key, it seems to me it is problem of max. Perhaps the solve of this problem will be the change Shift with something else.
2. I can't reproduce alignment problem. Probably it is connected with non commited vertexes transformations. Could u share a simple scene with this problem?

I'm glad that you have found this script useful. :)

Reply to Royal Ghost
jsrocha

Hi Royal Ghost, thanks for your reply. About the shift key problem, is it possible to separate the script in two? i mean, one for simple alignment, and other to alignment with axis constrain. Instead of have to press another key, you can have another script to do that. What do you think about it?
The alignment problem is a minor one, but i´ve made a simple max scene where you can see what i´m talking about. In the scene are two extruded arc (one is the copy of another), which i moved some vertices in z. go to the front viewport, and then you´ll see that the arc at left doesn´t have the edges perfectly aligned (there´s a spline connecting the vertices, helping to see the problem). The arc at right is much better aligned (maybe not perfect), cause i used the script twice on that arc. the max file is attached below..
thanks man, i really hope you can find a solution to the shift key problem, cause i can´t live without this script anymore :-)
best regards,

Jsrocha

Attachments
Arda Kutlu

Yes I realized that afterward, in my config,none of them was selected so if I recall correct, it didnt worked until I select one of the supported snap types.

Anyway, I will try the new version as soon as I can,

well done and thank you.

Royal Ghost

Masquerade thanks for comment they are welcome.
You are mistaken while thinking that for the proper work vertex snap is needed. You can use any type of snaps (vertex,pivot,face...) but it is important that it will be 3D.
I have taken into consideration your suggestion and fixed script. Now snap mode and type restored after straighten. When straighting begins snap mode changes to active and snap type to 3D.
Also this beta includes other changes:
Added restrictions of straight. Use SHIFT key to config it.

http://www.veda3d.com/files/sEdge1.4.0beta.rar

Royal Ghost | veda3d.com

Arda Kutlu

Thanks Royal Ghost, It is a very nice tool. and turns out it is very useful.

Though in a rush, It took me a while to understand that it uses 3d snap and vertex snap must be checked in 3d snap settings. (I realized that it was already written in the comments after I figured it out myself) It also turns off snap mode even if you are already working with 3d snap. I myself not a frequent snap user while editing, but it may be nicer if it looks for the current snap settings and options, checks true the vertex option,stores it , checks true the vertex option and restores back after the straightening.

Dont get me wrong, I just try to help you fool-proofing that nice script, thank you.

 

Royal Ghost

IN_human, снап включается то скриптом автоматом, а его тип удобнее самому выбирать.
Насчет normalize, уже давно сам хочу сделать но все никак не сяду :)
Пасиб за +1 ;)

Royal Ghost | veda3d.com

IN_human

+1

В некоторых ситуациях бывает полезней PolyBoost, тот только с лупами дружит.

По поводу снапов - их помоему надо через скрипт какраз включать, по фейсам и по вершинам.

Заодно подсмотрю как мышу скриптовать )))

Хотелось бы иметь опциональную возможность задавать рёбрам равную длину.

С нетерпением жду инструметов EdgesAlongSpline, EdgesParallel2Surface и EdgesTangentially2Faces )))

Royal Ghost

abyjoe, you must use 3D snap to get right point's coordinates

RaZeR, tnx :)

Royal Ghost | http://veda3d.com

RaZeR

молодца!

abyjoe

doesnt work for me... the selected vertices get alined only in X coordinate and not in line with the 2 picked Points but somewhere else on the viewport...