diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 09:46:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 09:46:46 +0300 |
commit | 32287212f540e1b7360d551810387f6852ccde62 (patch) | |
tree | f5827e1931edfd44fb0725ff94b2f45c25aedb22 /source/blender | |
parent | 9b9861578d9f9e61ecdb0d0753df5df1e376ecb7 (diff) |
Cleanup: pass eval_ctx to sculpt_init_session
Matches vertex paint mode
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5b59de06d0a..06705f6715d 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5600,16 +5600,13 @@ static void SCULPT_OT_symmetrize(wmOperatorType *ot) /**** Toggle operator for turning sculpt mode on or off ****/ -static void sculpt_init_session(const bContext *C, Scene *scene, Object *ob) +static void sculpt_init_session(const EvaluationContext *eval_ctx, Scene *scene, Object *ob) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - /* Create persistent sculpt mode data */ BKE_sculpt_toolsettings_data_ensure(scene); ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); - BKE_sculpt_update_mesh_elements(&eval_ctx, scene, scene->toolsettings->sculpt, ob, 0, false); + BKE_sculpt_update_mesh_elements(eval_ctx, scene, scene->toolsettings->sculpt, ob, 0, false); } @@ -5677,7 +5674,9 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) BKE_sculptsession_free(ob); } - sculpt_init_session(C, scene, ob); + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); + sculpt_init_session(&eval_ctx, scene, ob); /* Mask layer is required */ if (mmd) { |