111e5864248043c477ba13b1c531e20cdf7d7f47
Keeping a mutable reference to vertex normals for the entire lifetime of the PBVH structure makes caching the normals and sharing the cache harder than it should be. Generally code is safer when we reduce the number of mutable references to data. Currently the normals are modified in two places. First is the sculpt mesh normal recalculation. There we can just retrieve the normals from the mesh each time. Second is the restore from an undo step. That is unnecessary because the normals are marked for recalculation anyway. It doesn't even make much sense to store the normals in an undo step when we can easily recalculate them based on new positions. This change helps with #110479. These were also the last place that kept a mutable reference to normals. I tested undo and redo after sculpting, and it works well for each PBVH type. Pull Request: https://projects.blender.org/blender/blender/pulls/111470
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
