[SOLVED] vertex normal bug?

It seems I need to do an extra multiplication of the vertex normal with an inverted object world matrix like this

v.normal*obj.matrix_world.inverted()

to get the correct mapping.

Hi.
I can’t figure out if I’m doing something wrong in my script or there is a bug in the vertex normal calculation.
I have a script that uses

mesh = obj.to_mesh(bpy.context.scene, True, 'PREVIEW', calc_tessface=False) 
mesh.transform(obj.matrix_world)

to give me world data for an object obj. This correctly returns world space face normals & position, and vertex position, but incorrect vertex normals. I have to accept first any rotation of the object to get correct vertex normals.
Am I doing something wrong?
Cheers

The solution is to call mesh.update() as the vertex normals are not automatically recalculated to save load.