When we enter Sculpt mode, a depsgraph evaluation is triggered. In 4.2,
a change was added in ada367a0e9 which
causes `sculpt_update_object` to exit early if it is unable to get the
evaluated mesh.
This function is responsible for ultimately ensuring the PBVH is built.
Later on when entering Sculpt Mode, we push an undo change to the stack
to signal changing and avoid a memfile undo push; this `undo::push_begin`
function was changed in 4.3 to require the PBVH, as it was expected to
only be used for cases where we needed the total number of mesh elements
(i.e. when making a stroke on the mesh)
Currently, this causes a crash because in this instance, the PBVH is now
no longer created. To fix this, this commit adds a new function to the
sculpt undo namespace to indicate that thsi special undo step is being
performed, which is similar to a geometry undo step and does not require
the PBVH.
Pull Request: https://projects.blender.org/blender/blender/pulls/130649