5fdf7deb57e809dea2d7aeff3a9036bca0d5aa51
When there is a deform modifier or shape keys, currently the evaluated position array is copied to a duplicate array on the sculpt PBVH tree. Historically most code has used this array directly, so the code has been a bit confusing, but conceptually this is just supposed to be the evaluated positions. Instead of editing the BVH tree position array while sculpting, we can edit the arrays on the evaluated mesh directly-- or the original mesh when there are no deform modifiers. Removing this array reduces memory usage and plays better with implicit sharing since we don't need to unshare the attribute just to store a mutable copy. The remaining non-ideal part is sculpt mode's use of a specialized crazy-space function `BKE_crazyspace_build_sculpt` for building the evaluated position array rather than using the general system for retrieving deformed mesh data, `BKE_object_get_mesh_deform_eval`. This should be replaced at some point. This change makes clear a few simplifications for sculpt normals recomputation, because we can store the normals for all cases as a shared cache, unifying the code paths for original and deformed normals. Part of #118145. Pull Request: https://projects.blender.org/blender/blender/pulls/126382
…
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%
