From 8a92976254f38d1f260e7e23e48e0b6f92c6481c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 29 Nov 2018 10:31:56 +0100 Subject: Fix T57653: Fix T58075: Crash when switching between Edit and Sculpt/Paint modes. Sculpt (and paint) modes rely on valid evaluated data at their initialization. Added code to ensure that in `ED_object_mode_toggle()`, when relevant toggle operator requires it (looks like sculpt/paint should be the only ones affected, although particle edit may be too...). --- source/blender/editors/sculpt_paint/paint_vertex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c') diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index a604bd5feb6..9d078d4fea2 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1320,7 +1320,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) ot->poll = paint_poll_test; /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; } /* ************ weight paint operator ********** */ @@ -2450,7 +2450,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) ot->poll = paint_poll_test; /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; } -- cgit v1.2.3