follow up on r59628, setting modes now ensures that other modes exit first,

this was only done in some cases before and it was possible to enable weightpaint+sculpt at the same time when enabling sculpt by directly running the mode switching operator.

add generic function to ensure a compatible mode before entering the new mode (added to each operators exec function)
This commit is contained in:
2013-08-29 10:34:09 +00:00
parent 1b8da326ba
commit 291ad172a1
6 changed files with 149 additions and 82 deletions

View File

@@ -123,6 +123,7 @@ struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, st
void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr);
bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, int mode, struct ReportList *reports);
void ED_object_toggle_modes(struct bContext *C, int mode);
/* bitflags for enter/exit editmode */