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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 8b8493aa415..884d81d7e9e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -1031,10 +1031,8 @@ typedef struct SculptUndoStep {
static bool sculpt_undosys_poll(bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
- if (sa && (sa->spacetype == SPACE_VIEW3D)) {
- ViewLayer *view_layer = CTX_data_view_layer(C);
- Object *obact = OBACT(view_layer);
+ Object *obact = CTX_data_active_object(C);
+ if (obact && obact->type == OB_MESH) {
if (obact && (obact->mode & OB_MODE_SCULPT)) {
return true;
}