Commit: c35b9250a680f5bf6a98a2ef9a664c6e85ad0b76 Author: Jeroen Bakker Date: Mon May 16 15:25:06 2022 +0200 Branches: temp-T97479-3d-texturing-undo https://developer.blender.org/rBc35b9250a680f5bf6a98a2ef9a664c6e85ad0b76
Fix stacking multiple undo systems. =================================================================== M source/blender/editors/sculpt_paint/sculpt.c =================================================================== diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index a792665d34b..5bb4eb7cebf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5298,7 +5298,8 @@ static bool sculpt_stroke_test_start(bContext *C, struct wmOperator *op, const f /* Setup the correct undo system. Image painting and sculpting are mutual exclusive. * Color attributes are part of the sculpting undo system. */ - if (SCULPT_use_image_paint_brush(&tool_settings->paint_mode, ob)) { + if (brush && brush->sculpt_tool == SCULPT_TOOL_PAINT && + SCULPT_use_image_paint_brush(&tool_settings->paint_mode, ob)) { ED_image_undo_push_begin(op->type->name, PAINT_MODE_SCULPT); } else { @@ -5430,7 +5431,8 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str SCULPT_cache_free(ss->cache); ss->cache = NULL; - if (SCULPT_use_image_paint_brush(&tool_settings->paint_mode, ob)) { + if (brush && brush->sculpt_tool == SCULPT_TOOL_PAINT && + SCULPT_use_image_paint_brush(&tool_settings->paint_mode, ob)) { ED_image_undo_push_end(); } else { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs