Notifications
Clear all

[Closed] MaxScript – Spline Smooth?

Hi, I tried to make this script using listener but it does not record that action for spline – smooth.
When I select subobject level – Vertex, and select all, then I right click and choose smooth, (like in the screenshot), I got result I need.
I need to make it using script because I have a number of splines that need to be smooth.
any help appreciated.


select $Line001
subobjectLevel = 1
modPanel.setCurrentObject $.baseObject

https://imgur.com/a/ukbUt

5 Replies

[quote=]setKnotType <shape> <spline_index_integer> <knot_index_integer> (#smooth | #corner | #bezier | #bezierCorner)
Sets the knot type of the indexed knot in the indexed spline.
This is equivalent to the right-mouse-button change you can make to spline control-points using the Edit Spline modifier in 3ds Max. select your spline and run


shp = selection[1]
for i=1 to numsplines shp do 
(
   for j=1 to numknots shp i do setKnotType shp i j #smooth
)
updateShape shp

I tried it in 3dsmax 2017, but I got

– No ““numSplines”” function for undefined

It was so simple that I thought you could figure it out yourself by a lots of examples on this forum. I’ve edited my previous post

I am not a programmer, and tried using max script lately, I do graphic design in Photoshop and started learning Max few months ago.
I couldn’t find working example like the one that I am looking for on this forum nor at some other forums,
as if I did I wouldn’t ask for help.
Thanks, if I may ask you to not reply anymore.
If it was that simple, you would of fix it, but you didn’t as it only returns another error.

– No ““setKnotType”” function for 1