Page MenuHome

MeshVertex.co contains incorrect data after calling ShapeKey.normals_polygon_get()
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.59

Blender Version
Broken: version: 3.1.1, branch: master, commit date: 2022-03-29 17:50, hash: rBd91843f3b6c6
Worked: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: rBc77597cd0e15

Short description of error
If a mesh has a shape key then after calling ShapeKey.normals_polygon_get() the vertices affected by the key will have wrong coordinates when accessed via MeshVertex.co.

Exact steps for others to reproduce the error

  1. open the attached blend file
  2. run the active script in the Text Editor
  3. check the output in the system console

Expected results: vertex coordinates accessed before and after ShapeKey.normals_polygon_get() are the same, e.g.:
<Vector (1.0000, 1.0000, 1.0000)>
<Vector (1.0000, 1.0000, 1.0000)>

Actual results: vertex coordinates are different, e.g.:
<Vector (1.0000, 1.0000, 1.0000)>
<Vector (2.0000, 2.0000, 2.0000)>

Additional notes:

  • can be reproduced in the latest 3.2.0 build
  • same issue also arises when using ShapeKey.normals_split_get() or ShapeKey.normals_vertex_get() instead of ShapeKey.normals_polygon_get()