Blender Git Loki
Git Commits -> Revision 93c8955
Revision 93c8955 by Alexander Gavrilov (master) June 10, 2020, 13:51 (GMT) |
Mesh Edit: preserve Custom Normal vectors in topology operators. Custom Loop Normals are normally encoded relative to the default normals, similar to normal maps, allowing them to naturally follow mesh deformations. Changes to mesh topology however often result in nonsensical effects that are not desired. The Remove Doubles operation especially (now known as Merge By Distance) is intended as a purely topological operation, and definitely should not change the vector of the custom normals. This patch implements that behavior by converting the relative encoding into an absolute vector layer for the duration of the operation. It also modifies other Merge types in this way for consistency, the Rip operator as their inverse counterpart; and also Delete, Dissolve, Connect Path and Knife operators as other examples more related to topology than shape. On the technical side, this ports mesh_normals_loop_custom_set to BMesh, and then uses a temporary Custom Data layer to store the normals as vectors for the duration of the above mentioned operations. When the normals are converted back to custom data, the caller can choose whether to mark edges as sharp to preserve distinct normals, or just average them instead. All but Remove Doubles choose to average for now. Differential Revision: https://developer.blender.org/D4994 |
Commit Details:
Full Hash: 93c8955a722ba3f2022b92a2f8befaadc467756a
Parent Commit: a58dc25
Lines Changed: +377, -0