Home Technical Talk

3Ds Max How to Select Nth vertex on a Spline...?

Jonathan85
polycounter lvl 9
Offline / Send Message
Jonathan85 polycounter lvl 9

Hello
How would i do this? I hava spline object and i want to select every "N-th" vertex ("knot")... In my case it every second vertex/knot, but every 3rd, 4th, or simply - N-th would be good. Is there a way how to do it in max? Either directly or with the help of some (preferably free) script or plugin etc...?
I know max can do it defaultly via the ribbon toolbar with polygon objects, but i dont know how to do it on spline object...?
Thank you

Replies

  • miauu
    Offline / Send Message
    miauu polycounter lvl 14
    </code><code>(<br>	global rol_selNthKnot<br>	try(destroyDialog rol_selNthKnot)catch()<br>	rollout rol_selNthKnot "Select N-th knot"<br>	(<br>		spinner spn_knot "Knot:" range:[1,1e9,2] type:#integer<br>		button btn_select "Select" width:140<br>		<br>		on btn_select pressed do<br>		(<br>			step = spn_knot.value<br>			if selection.count == 1 do<br>			(<br>				selObj = selection[1]<br>				if classOf selObj == Line or classOf selObj == SplineShape do<br>				(<br>					if subobjectlevel == 1 do<br>					(<br>						selSplArr = getSplineSelection selObj<br>						if selSplArr.count != 0 do<br>						(<br>							for ss in selSplArr do<br>							(<br>								knotsCnt = numKnots selObj ss<br>								knotsToSelArr = for k = step to knotsCnt by step collect k<br>								setKnotSelection selObj ss knotsToSelArr keep:false <br>							)<br>						)<br>					)<br>				)		<br>			)	<br>		)<br>	)<br>	createdialog rol_selNthKnot<br>)<br>
    The script above works this way:
    - select a spline
    - go to Spline subobjectlevel and select desired spline(one, two or more)
    - go to vertex subobject level(to see the selected verts)
    - press the [Select] button



  • Jonathan85
    Offline / Send Message
    Jonathan85 polycounter lvl 9
    WOW... thanks :-)! That was quick.... And it seems to do the job.. NICE! :-)
Sign In or Register to comment.