PDA

View Full Version : How to pick a vertex?


fabman
05-24-2004, 02:59 PM
Anyone knows hoy to pick a vertex of any object in a viewport?, I mean, if you use pickbutton you can get an object, but I want the user to pick two vertex on two different objects for getting the distance betwen those two vertex.

Thank you in advance.

fabman
05-26-2004, 08:27 AM
Anyone??...
The only solution I found so far is to select the vertex before running the script and then work on the selection... anyone found something diferent?

Rens
05-26-2004, 08:42 AM
Have you looked at the pickPoint() function?
It seems to do what you want and you can snap to 3D space.

With a bit of tinkering I think you can get it to snap to vertices :)

FatAssasin
05-26-2004, 04:31 PM
This works on editable meshes:

fn pickAVert = (
vertPos = pickPoint snap:#3d
for i = 1 to getNumVerts $ do (
if (getVert $ i) == vertPos then (
setVertSelection $ #(i)
return i
)
)
return undefined
)

CGTalk Moderation
01-18-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.