ScriptSpot

Forum topic · General Scripting

Newbie help, changing rectangle

By zihon · 2016-06-29

Description

Hi

I am trying to make a simple script to change a selected spline knot type. it goes as as follows:

drawing a rectangle and select a rectangle

and click a script button

convert a editable spline

and all vertex convert a "corner"

any help regarding this problem is also greatly appreciated,
Thanks!!!

Comments (2)

barigazy · 2016-06-30

Take a look this topic in mxshelp

http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=fil…
This is your code

fn createRect length: width: =
(
node = converttosplineshape (Rectangle length:length width:width cornerRadius:0)
for k = 1 to numknots node do setKnotType node 1 k #corner
updateShape node
)
-- run this function with nex line. U can change width and length value also
createRect length:30 width:50

THANKS A LOT

zihon · 2016-06-30

wow... very simple and perfect...

I troubled by trying to make using a "changeKnotTypes" & "setKnotType"

Thanks, barigazy