diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-15 22:58:01 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-15 22:58:01 +0400 |
commit | be1efd74d120068a9a650feddf512b50e5e6c2b8 (patch) | |
tree | e1232b3256b84165f9194fe5287bf620cf174c18 /source/blender/editors/object | |
parent | e63d4d2bea06075ef666d613d1136236bb09ae79 (diff) |
2.5/Sculpt:
* Made sculpt mode local to object.
* This also fixes loading files from 2.4x saved in sculptmode
Touched a lot of things here, let me know if anything breaks
TODO:
* The other paint modes should be converted as well
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 7d008847602..188d0d8e915 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -3740,7 +3740,7 @@ void ED_object_exit_editmode(bContext *C, int flag) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene); } - ED_view3d_restore_paint_modes(C, obedit->restore_mode); + ED_object_toggle_modes(C, obedit->restore_mode); } @@ -3774,7 +3774,9 @@ void ED_object_enter_editmode(bContext *C, int flag) if(flag & EM_WAITCURSOR) waitcursor(1); - ob->restore_mode = ED_view3d_exit_paint_modes(C); + ob->restore_mode = ob->mode; + ED_view3d_exit_paint_modes(C); + ED_object_toggle_modes(C, ob->mode); if(ob->type==OB_MESH) { Mesh *me= ob->data; @@ -7034,3 +7036,9 @@ void hookmenu(Scene *scene, View3D *v3d) if (changed) { } } + +void ED_object_toggle_modes(bContext *C, int mode) +{ + if(mode & OB_MODE_SCULPT) + WM_operator_name_call(C, "SCULPT_OT_sculptmode_toggle", WM_OP_EXEC_REGION_WIN, NULL); +} |