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:
authorJeroen Bakker <jbakker>2022-05-16 16:42:43 +0300
committerJeroen Bakker <jeroen@blender.org>2022-05-16 16:42:54 +0300
commit00eb7594b11a6dfd1f1957a7f037b6ea9a3b1a13 (patch)
tree1829685a2f9afaa2cb2bc676e4c1f859e17d35be /source/blender/editors/space_image
parent0d80c4a2a6ffcb6bfe7338588d85d5b56ee05afb (diff)
3D Texturing: Undo.
Blender can only support a single undo system per undo step. As sculpting/vertex colors are mutual exclusive operations out approach is just to switch the undo system when painting on an image. PBVHNodes contain a list of areas that needs to be pushed to the undo system. Currently the undo code is in sculpt_paint_image. We should eventually support undo for color filtering and other nodes. we might need to place it to its own compile unit so more brushes can invoke the same code. {F13048942} Reviewed By: brecht Maniphest Tasks: T97479 Differential Revision: https://developer.blender.org/D14821
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_undo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c
index c3a48abcae1..1fd9fde084b 100644
--- a/source/blender/editors/space_image/image_undo.c
+++ b/source/blender/editors/space_image/image_undo.c
@@ -1040,7 +1040,7 @@ static ImageUndoStep *image_undo_push_begin(const char *name, int paint_mode)
bContext *C = NULL; /* special case, we never read from this. */
UndoStep *us_p = BKE_undosys_step_push_init_with_type(ustack, C, name, BKE_UNDOSYS_TYPE_IMAGE);
ImageUndoStep *us = (ImageUndoStep *)us_p;
- BLI_assert(ELEM(paint_mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D));
+ BLI_assert(ELEM(paint_mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, PAINT_MODE_SCULPT));
us->paint_mode = paint_mode;
return us;
}