diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-24 17:48:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-24 17:48:10 +0300 |
commit | faec4309147988fbab7b7d7ec661f5130358d169 (patch) | |
tree | 0c839f8f88fe80f4a3762980adb5efe729ce1b44 /source/blender/editors/util | |
parent | f85745b17bfe68673bf5f799e98c617d9471ddf1 (diff) | |
parent | e1dd83b399d46d81ea51f6c41725eec5c1a1db7a (diff) |
Merge branch 'master' into blender2.8
Conflicts:
intern/cycles/blender/blender_curves.cpp
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/undo.c
source/blender/makesrna/intern/rna_object_force.c
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/util/undo.c | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index e105b6f893d..321b1043595 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -82,6 +82,7 @@ set(SRC ../include/ED_space_api.h ../include/ED_text.h ../include/ED_transform.h + ../include/ED_transform_snap_object_context.h ../include/ED_transverts.h ../include/ED_types.h ../include/ED_util.h diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 2a58b1fd2ec..805238bd2af 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -420,7 +420,8 @@ void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_ev enum { UNDOSYSTEM_GLOBAL = 1, UNDOSYSTEM_EDITMODE = 2, - UNDOSYSTEM_IMAPAINT = 3 + UNDOSYSTEM_IMAPAINT = 3, + UNDOSYSTEM_SCULPT = 4, }; static int get_undo_system(bContext *C) @@ -450,6 +451,10 @@ static int get_undo_system(bContext *C) if (!ED_undo_paint_empty(UNDO_PAINT_IMAGE)) return UNDOSYSTEM_IMAPAINT; } + else if (obact->mode & OB_MODE_SCULPT) { + if (!ED_undo_paint_empty(UNDO_PAINT_MESH)) + return UNDOSYSTEM_SCULPT; + } } if (U.uiflag & USER_GLOBALUNDO) return UNDOSYSTEM_GLOBAL; @@ -474,6 +479,9 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) else if (undosys == UNDOSYSTEM_IMAPAINT) { name = ED_undo_paint_get_name(C, UNDO_PAINT_IMAGE, i, &active); } + else if (undosys == UNDOSYSTEM_SCULPT) { + name = ED_undo_paint_get_name(C, UNDO_PAINT_MESH, i, &active); + } else { name = BKE_undo_get_name(i, &active); } @@ -552,6 +560,9 @@ static int undo_history_exec(bContext *C, wmOperator *op) else if (undosys == UNDOSYSTEM_IMAPAINT) { ED_undo_paint_step_num(C, UNDO_PAINT_IMAGE, item); } + else if (undosys == UNDOSYSTEM_SCULPT) { + ED_undo_paint_step_num(C, UNDO_PAINT_MESH, item); + } else { ED_viewport_render_kill_jobs(CTX_wm_manager(C), CTX_data_main(C), true); BKE_undo_number(C, item); |