diff options
author | Bastien Montagne <bastien@blender.org> | 2020-12-23 14:19:45 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-12-23 18:03:42 +0300 |
commit | d29a720c45e55047e4f0e02df4652ba03a49c528 (patch) | |
tree | d229f47bfbc93f333ad3928515e3463c2750fb0d /source/blender/blenkernel/BKE_paint.h | |
parent | 9d04fa39d13b75b207fa7ab0315cb7731ecfff06 (diff) |
Fix T84002: Sculpt: Masking operations crash if multires is in play.
This fixes the main issue there (essentially a followup to
rB90e12e823ff0: Fix T81854: crash when undoing switch between sculpt and
edit mode).
We basically remove more (hopefully all the remaining!) modifications of
orig mesh from `sculpt_update_object`, as those done here will not be
immediately available in the evaluated data (that specific bug happened
because masking data was added to orig mesh there, but not flushed to
depsgraph evaluated one).
This also goes towards a better separation between handling of evaluated
data and orig one.
Note that modification of orig mesh data can still happen, e.g. values
in some cdlayers, but at least all pointers should now be valid in the
evaluated mesh.
There are still some issues, e.g. we now get an assert/crash in
`multires_reshape_assign_final_coords_from_ccg` when undoing out of the
Sculpt mode, presumably because subdiv_ccg data remains unchanged then
(and hence still has the `has_mask` flag set), while actual mesh data do
not have that cdlayer anymore...
This commit also cleans up/simplifies some code,
`ED_object_sculptmode_enter_ex` was (indirectly) calling
`BKE_sculpt_face_sets_ensure_from_base_mesh_visibility` twice e.g.
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index aaed2649ad9..bd2ac3da21b 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -635,9 +635,6 @@ void BKE_sculpt_sync_face_sets_visibility_to_base_mesh(struct Mesh *mesh); void BKE_sculpt_sync_face_sets_visibility_to_grids(struct Mesh *mesh, struct SubdivCCG *subdiv_ccg); -/* Ensures that a Face Set data-layers exists. If it does not, it creates one respecting the - * visibility stored in the vertices of the mesh. If it does, it copies the visibility from the - * mesh to the Face Sets. */ void BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(struct Mesh *mesh); bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct View3D *v3d); |