Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Is there a way to get vertices adjacent to a selected vertex in maxscript?
It's like Houdini's "neighbours"
Solved! Go to Solution.
Hi,
Is there a way to get vertices adjacent to a selected vertex in maxscript?
It's like Houdini's "neighbours"
Solved! Go to Solution.
You might want to use octree/kdtree. Go through this thread:
https://maxscriptbook.com/community/maxscript/%5bmaxscript%5d+kdtree.+can+we+make+it+faster%3f/
there is a ton of related code.
(
selObj = selection[1]
selVertBA = (polyop.getVertSelection selObj)
vertEdgesBA = polyop.getEdgesUsingVert selObj selVertBA
adjacentvertsBA = polyop.getVertsUsingEdge selObj vertEdgesBA
polyop.setVertSelection selObj adjacentvertsBA
)
Keep in mind that this will select only vertices which have common edges with the selected vert.