Target Align Vertex

I was wondering if it would be possible to use the target weld process to target align ?

I've been given a script by Daniel Swahn over at the Area forums, he's happy for his script to be modified as long as credits are provided.(file attached)

I'm asking here because I don't know maxscript, but see how this script might be improved.

All it needs is the target weld process combined with the axis constraints, only aligning, not welding. ie, click first vertex (copy) click second vertex (paste).
Currently I have it set to hotkeys, which is fine but targeting would be a breeze to use.
Here's a vid of the process, you can see how i got the targeting idea.

http://www.youtube.com/watch?v=exXrkx1-fxo

thx

AttachmentSize
epoly_copypaste_vertex.rar3 KB

Comments

Comment viewing options

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

I forgot to add the link to

I forgot to add the link to the video.
I wouldn't know what to do with that code, I don't know maxscript. ;)

Emphasis on...."I'm asking here because I don't know maxscript, but see how this script might be improved." :)

Graph's picture

so you want target welding

so you want target welding without welding?

basically this: (with then aligning the verts (for poly or mesh))

(
 
 
 
		fn pickVert obj = 
		(
			local closestVert
			local closestPos 
 
			theRay =mapscreenToWorldRay mouse.pos
 
			theInt = intersectRay obj theRay
 
			 if theInt != undefined do
			 (
				local pt = theInt.pos
				local msh = snapshotAsMesh obj
 
				local closestDist = distance pt (getVert msh 1)
 
 
				for i = 2 to msh.numVerts do (
					local vPos = (getVert msh i)
					local dist = distance pt vPos
					if dist < closestDist do (closestDist = dist ; closestVert = i; closestPos = vPos)
				)
 
				delete msh
 
				--return closestDist
 
			 )
			 #(closestVert, closestPos)
		)	
 
	pickpoint()
	local vert1 = pickVert $Box002
 
 
	pickpoint()
 
	local vert2 = pickVert $Box002
 
	format "align vert % at vert %'s position\n" vert1 vert2
 
 
)

Raphael Steves

JokerMartini's picture

This does not seem to be

This does not seem to be working for me. How do i use this? Does there have to be an existing selection of a vertex in the subobject level?
Is it possible to add the Rubberband on the cursor so its more like the target weld?

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Comment viewing options

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