diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-07 08:36:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-07 08:38:17 +0300 |
commit | 5b01e428a9443254b30cff015c42cee10d1ab142 (patch) | |
tree | 670b5ab895f2ea671fa9a3e69a99d26af0fc7a78 /source/blender/editors/sculpt_paint | |
parent | e99094035c493a4e0bcb47b5cb9b1680b0e853c0 (diff) |
Move eval_ctx after object mode changes
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index c94f736bf4e..43bb19639cf 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1085,10 +1085,6 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) paint_cursor_delete_textures(); } else { - EvaluationContext eval_ctx; - - CTX_data_eval_ctx(C, &eval_ctx); - ob->mode |= mode_flag; if (wp == NULL) @@ -1106,6 +1102,9 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) if (ob->sculpt) { BKE_sculptsession_free(ob); } + + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); vertex_paint_init_session(&eval_ctx, scene, ob); } @@ -2260,10 +2259,6 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) paint_cursor_delete_textures(); } else { - EvaluationContext eval_ctx; - - CTX_data_eval_ctx(C, &eval_ctx); - ob->mode |= mode_flag; ED_mesh_color_ensure(me, NULL); @@ -2283,6 +2278,9 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) } BKE_sculptsession_free(ob); } + + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); vertex_paint_init_session(&eval_ctx, scene, ob); } |