I'm trying to create an exporter for a format, which includes shape key support. This format requires both vertex coordinates and normals to be specified. This should be logical, because the vertex selected on the image below won't have the same normals:


Comparing it to this one:


But I actually haven't found any way to export shape key normals. Both Bmesh Vertex and ShapeKey Vertex only store the coordinates.

Is there any way to get them?


2 Answers 2


The only way I can think of is to use Object.to_mesh() and read normals from this temp mesh datablock, before freeing it (see also the doc):

me = my_ob.to_mesh(scene, True, 'Render', False, False)
for v in me.vertices:

Quite obviously, you need to set the influence of your shape key accordingly first.


Blender isn't storing these normals for each shape key, so its not simply a matter of accessing some data.

While you could calculate them yourself, this isn't very convenient.

Temporary Mesh

  • Pin the shape key so its active an no others are taken into account.
  • Read the mesh using the Object.to_mesh method.
  • Read the normals from the mesh.
  • Remove the mesh.

Existing Mesh

  • (optionally) store the vertex coordinates.
  • temporarily apply the shape-key to the mesh.
  • calculate the normals.
  • read them from the mesh (can store how you like, but be sure to copy them so as not to hold a reference to the original mesh data).
  • restore the original coordinates and optionally re-calculate normals again
    (though this could be postponed until after you're done with all of the shape-keys).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .