Remove dynamic-topology flag from mesh when entering sculpt mode
authorNicholas Bishop <nicholasbishop@gmail.com>
Thu, 24 Jan 2013 04:33:29 +0000 (04:33 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Thu, 24 Jan 2013 04:33:29 +0000 (04:33 +0000)
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

index 5ab287479a425e67af3d89eddc666eb133e70d89..ce7d72f9787fdb6998ad6301180f4764220f70d3 100644 (file)
@@ -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);