Notifications
Clear all

[Closed] Vertex Welding

Hi,

I’m stucked to a problem. I cant get this script working 100%
Is it possible to make this script 100% viewport interactive in any way?
At the moment it’s not optimal


 ----------------------------------------------------------------------------------------------------------------------------------------------------------
 try(destroyDialog rol_LazyweldRollout) catch()
 ----------------------------------------------------------------------------------------------------------------------------------------------------------
 
 rollout rol_LazyweldRollout "Lazy Vertex Weld V1.1"
 (
 	spinner spn_WeldThreshold "Threshold " range:[0.0, 1000.0, 0.0] type:#float fieldwidth:55  align:#center
 	button btn_Weld "Retain Focus // Apply"  height:18 align:#center tooltip:"Press this button when selecting a new selection or to apply the Threshold changes..."
 	
 	local firstPress = true
 	on btn_Weld pressed do
 	(
 		firstPress = true
 	)
 
 	on spn_WeldThreshold entered do
 	(
 		if not firstPress then
 			max undo
 		else
 			firstPress = false
 		
 		undo "UndoSpinner" on
 		(
 			for i in selection do
 			(
 				case of 
 				(
 					(classof i == editable_poly) : (i.weldThreshold = spn_WeldThreshold.value; polyOp.weldVertsByThreshold i i.verts)
 					(classof i == editable_mesh) : meshOp.weldVertsByThreshold i i.verts spn_WeldThreshold.value
 				)
 			)
 		)
 	)
 	
 	label lbl_niceascii "-=- Thanks to Håvard Schei -=-" align:#center
 	HyperLink homepage "Raymond H.Ingebretsen'2011" address:"http://www.homme3d.com/" color:(color 255 255 255) hovercolor:(color 127 127 127) visitedcolor:(color 255 255 255) align:#center
 )
 
 createDialog rol_LazyweldRollout  160 85 250 200
 
1 Reply

Wouldn’t u want to use i.selectedVerts ?

Or do u want to weld the entire mesh for some reason?