From 0e2a6178c28c19a73cfd941cb4d93ca349d31bac Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 24 Jan 2013 04:33:29 +0000 Subject: Remove dynamic-topology flag from mesh when entering sculpt mode This will be enabled if the file was saved with dynamic topology on, but we don't automatically re-enter dynamic-topology mode when loading a file so remove the flag. Fixes bug [#33956] projects.blender.org/tracker/?func=detail&aid=33956&group_id=9&atid=498 --- source/blender/editors/sculpt_paint/sculpt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5ab287479a4..ce7d72f9787 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4901,6 +4901,12 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op)) /* Enter sculptmode */ ob->mode |= OB_MODE_SCULPT; + /* Remove dynamic-topology flag; this will be enabled if the + * file was saved with dynamic topology on, but we don't + * automatically re-enter dynamic-topology mode when loading a + * file. */ + me->flag &= ~ME_SCULPT_DYNAMIC_TOPOLOGY; + if (flush_recalc) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); -- cgit v1.2.3