Blender Git Loki

Git Commits -> Revision 0845dc0

October 28, 2020, 08:34 (GMT)
Fix T81854: crash when undoing switch between sculpt and edit mode.

The logic of `BKE_sculpt_update_object_for_edit` was not correct. such
low-level functions should typically never preform depsgraph evaluation
themselves, they should be able to rely on getting a fully evaluated
depsgraph and just get needed data from there.

Supporting that required fixing other broken code higher in the
callstack, namely:
* `ED_object_sculptmode_enter_ex` was freeing evaluated data, for no
valid reason it would seem.
* `sculpt_undosys_step_decode` was ensuring an evaluated depsgraph
**before** calling `ED_object_mode_generic_exit`, which would
invalidate a lot of evaluated data.

Note that it is fairly difficult to track down all code paths leading to
`BKE_sculpt_update_object_for_edit`, so there may be still cases where
this gets called with improperly evaluated depsgraph.

Reviewed By: sergey

Maniphest Tasks: T81854

Differential Revision: https://developer.blender.org/D9270

Commit Details:

Full Hash: 0845dc0eece716947148ecc11a2276b0f5634f65
Parent Commit: 8926b09
Committed By: Jeroen Bakker
Lines Changed: +13, -12

3 Modified Paths:

/source/blender/blenkernel/intern/paint.c (+5, -6) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+2, -4) (Diff)
/source/blender/editors/sculpt_paint/sculpt_undo.c (+6, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021