diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index c031a733630..004d2757a71 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -40,8 +40,6 @@ #include "BKE_paint.h" #include "BKE_main.h" -#include "DEG_depsgraph.h" - #include "ED_paint.h" #include "ED_screen.h" #include "ED_image.h" @@ -262,9 +260,7 @@ static void PALETTE_OT_color_delete(wmOperatorType *ot) } static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) - { - const WorkSpace *workspace = CTX_wm_workspace(C); Paint *paint = BKE_paint_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); Object *ob = CTX_data_active_object(C); @@ -272,7 +268,7 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) if (!ob || !brush) return OPERATOR_CANCELLED; /* TODO: other modes */ - if (workspace->object_mode & OB_MODE_SCULPT) { + if (ob->mode & OB_MODE_SCULPT) { BKE_brush_sculpt_reset(brush); } else { @@ -405,7 +401,6 @@ static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, static int brush_select_exec(bContext *C, wmOperator *op) { - WorkSpace *workspace = CTX_wm_workspace(C); Main *bmain = CTX_data_main(C); ToolSettings *toolsettings = CTX_data_tool_settings(C); Paint *paint = NULL; @@ -419,7 +414,7 @@ static int brush_select_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); if (ob) { /* select current paint mode */ - paint_mode = workspace->object_mode & OB_MODE_ALL_PAINT; + paint_mode = ob->mode & OB_MODE_ALL_PAINT; } else { return OPERATOR_CANCELLED; |