Tryed that one, but normals seems to be wrong. Anyway your idea sounds working so problem is propably in my code. So here goes.
vertnormal = 0.0
-- Get vertex selection from first object at selection array
verts = getVertSelection selection[1]
-- Get all faces where first vertex in selection array is accosied with.
faces = polyop.getFacesUsingVert selection[1] (verts as array)[1]
-- Convert bit array to array
faces = faces as array
-- Loop all faces what are accosied with vertex
for i in 1 to (faces.count) do
(
-- Add face normals to vertex normal
vertnormal = vertnormal + (polyop.getFaceNormal selection[1] faces[i])
)
-- Divied vertex normal with count of faces
vertnormal = vertnormal / (faces.count)
-- Normalize
vertnormal = normalize vertnormal
Any bugs or did I make something wrong?
