line screation question

Hello

I want to create a line :

new_spline = splineShape ()
addNewSpline new_spline
addKnot new_spline 1 #corner #curve [0,0,0]
addKnot new_spline 1 #corner #curve [1,1,1]

I think there is something wrong, because when I want to select a sub level object, max crash....

Thanks for help :-)

Comments

Comment viewing options

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

Thanks for help :-) Yes,

Thanks for help :-)
Yes, without updateShape() Max will crash...
I made "my script" looking "How To ... Draw a Freehand Spline" too.

Graph's picture

anubis, did you check the

anubis, did you check the example? :-P {/childish humor} btw your not the one from frankfurth are you?

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Anubis's picture

RE: "btw your not the one

RE: "btw your not the one from frankfurth are you?"

- Nope, I'm from Sofia :)

my recent MAXScripts RSS (archive here)

Anubis's picture

yep, without updateShape()

yep, without updateShape() Max will crash.

my recent MAXScripts RSS (archive here)

Graph's picture

( new_spline = splineShape

(
	new_spline = splineShape ()
 
	select new_spline
 
	addNewSpline new_spline
 
	addKnot new_spline 1 #smooth #curve [0,100,0]
 
	addKnot new_spline 1 #smooth #curve [50,0,0]
 
	addKnot new_spline 1 #corner #curve [100,50,0]
 
	addKnot new_spline 1 #smooth #curve [150,0,0]
 
	addKnot new_spline 1 #smooth #curve [200,100,0]
 
	--close new_spline 1
 
	updateshape new_spline
 
	sphere  pos:[57,4.6662,0] radius:3
	sphere  pos:[140.6,4.6662,0] radius:3
 
)

taken from: How To ... Draw a Freehand Spline

have phun

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

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