diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 11:34:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 11:35:06 +0300 |
commit | ce0cb4de8d9174f94e1c48952050080576b76141 (patch) | |
tree | 1e6288d49a098353bc3f777e6f388688ad9669bd /source/blender/editors | |
parent | f9da89a38d3dc0399b7d7943c732cbaf4e336290 (diff) |
Object Mode: use eval_ctx for modifiers_isCorrectableDeformed
Some other minor changes from D3037 as well
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 4b00852557f..c9dc9e6952c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -472,9 +472,13 @@ static int editmode_toggle_poll(bContext *C) if (ELEM(NULL, ob, ob->data) || ID_IS_LINKED(ob->data)) return 0; + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); + /* if hidden but in edit mode, we still display */ - if ((ob->restrictflag & OB_RESTRICT_VIEW) && !(ob->mode & OB_MODE_EDIT)) + if ((ob->restrictflag & OB_RESTRICT_VIEW) && !(eval_ctx.object_mode & OB_MODE_EDIT)) { return 0; + } return OB_TYPE_SUPPORT_EDITMODE(ob->type); } diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 19dcf7b4a44..3d9021480d9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -334,9 +334,6 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C, Object *ob, SculptSession *ss) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - if (unode->applied) { BM_log_undo(ss->bm, ss->bm_log); unode->applied = false; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index ecc02ef7abc..9720cc1e613 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2562,7 +2562,7 @@ static void createTransEditVerts(TransInfo *t) /* detect CrazySpace [tm] */ if (modifiers_getCageIndex(t->scene, t->obedit, NULL, 1) != -1) { int totleft = -1; - if (modifiers_isCorrectableDeformed(t->scene, t->obedit)) { + if (modifiers_isCorrectableDeformed(&t->eval_ctx, t->scene, t->obedit)) { /* check if we can use deform matrices for modifier from the * start up to stack, they are more accurate than quats */ totleft = BKE_crazyspace_get_first_deform_matrices_editbmesh(&t->eval_ctx, t->scene, t->obedit, em, &defmats, &defcos); |