Newbie help, changing rectangle

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

Comment viewing options

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

...

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

barigazy

zihon's picture

THANKS A LOT

wow... very simple and perfect...

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

Thanks, barigazy

Comment viewing options

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