ScriptSpot

Forum topic · Scripts Wanted

Spline with sphere caps at the begining and end.

By Mehemenuri · 2015-06-24

Downloads
Description

Hi everyone,

I really need a script which makes it possible to make the caps of a spline spherical. Now I do it manually by adding a sphere with the same radius at the beginning and end of the spline. It is a pain in the ass to do it manually. It will spare me a lot of time if I have a script for this.

Please let me know if there are questions.

Thanks!

Comments (2)

Mehemenuri · 2015-06-25

Omg you are amazing. Thanks a lot!!!

`

pixamoon · 2015-06-25

oki, try this one:


for o in selection where superclassof o == shape and o.render_renderable == on do (
	local radius = o.render_thickness / 2
	local segs = o.render_sides
	for s = 1 to (numSplines o) do (
		for k = 1 to (last = numKnots o s) where k == 1 or k == last do (
			sphere radius:radius segs:segs wirecolor:o.wirecolor pos:(getknotpoint o s k)
		)
	)
)

select splines and run the code (or place it in Favorite Scripts menu and run)
http://www.scriptspot.com/3ds-max/scripts/favorite-scripts

it works only for selected splines and with "Enable in Render" on.

enjoy!

Attachments