Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-05-09 19:42:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-09 19:42:14 +0300
commitd8cf14fa67896cfe3144519e138fd1028bbdcb6e (patch)
treed3552d3e014f474a9e6803d17f5ad80ac3eb028f /source/blender/editors/util
parent9513bdcaeaaf561e205b9a0313c11fc8a9505972 (diff)
Fix T48388: Undo history sculpt mode not visible
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index fe9fd1cd3ba..ee6700666c0 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -436,7 +436,8 @@ enum {
UNDOSYSTEM_GLOBAL = 1,
UNDOSYSTEM_EDITMODE = 2,
UNDOSYSTEM_PARTICLE = 3,
- UNDOSYSTEM_IMAPAINT = 4
+ UNDOSYSTEM_IMAPAINT = 4,
+ UNDOSYSTEM_SCULPT = 5,
};
static int get_undo_system(bContext *C)
@@ -468,6 +469,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;
@@ -495,6 +500,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);
}
@@ -576,6 +584,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);