Fix T46456: Crash when aborting stroke while using dyntopo.
Basically, the 'fake undo' restoring orig coordinates in this case cannot work with dyntopo, since it assumes nothing was added/removed. For now, just prevent this 'restoration' when dyntopo is used, this is no ideal solution from user PoV - but it's better than plain ugly crash! Complete solution seems much more involved and outside of scope of bug handling, added a TODO note: http://wiki.blender.org/index.php/Dev:Source/Development/Todo/Tools#Sculpting
This commit is contained in:
parent
60663c8ec4
commit
c292b4ebb9
Notes:
blender-bot
2023-02-14 10:37:50 +01:00
Referenced by issue #47204, Region selection tools (box, circle, lasso) select extra vertices Referenced by issue #46456, quitting while using dynotopo (dynamic topography) if you press ESC
|
@ -4817,8 +4817,11 @@ static void sculpt_brush_stroke_cancel(bContext *C, wmOperator *op)
|
|||
Object *ob = CTX_data_active_object(C);
|
||||
SculptSession *ss = ob->sculpt;
|
||||
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
|
||||
const Brush *brush = BKE_paint_brush(&sd->paint);
|
||||
|
||||
if (ss->cache) {
|
||||
/* XXX Cancelling strokes that way does not work with dynamic topology, user will have to do real undo for now.
|
||||
* See T46456. */
|
||||
if (ss->cache && !sculpt_stroke_is_dynamic_topology(ss, brush)) {
|
||||
paint_mesh_restore_co(sd, ob);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue