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:
authorCampbell Barton <ideasman42@gmail.com>2018-02-06 09:53:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-06 10:03:29 +0300
commit2a184f3d2b6cc180fedd0c93c266d847f7d27936 (patch)
tree5d7472cb10888e6e18dd64bbcdb3c078ac325ca0 /source/blender/editors/mesh/mesh_navmesh.c
parent906ed54d286d0dd6686aac997883e7dfa4bba792 (diff)
Object Mode: use eval_ctx for paint & object
Diffstat (limited to 'source/blender/editors/mesh/mesh_navmesh.c')
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index bd2ad21d51c..aaa06951ec6 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -662,8 +662,10 @@ void MESH_OT_navmesh_face_add(struct wmOperatorType *ot)
static int navmesh_obmode_data_poll(bContext *C)
{
+ EvaluationContext eval_ctx;
+ CTX_data_eval_ctx(C, &eval_ctx);
Object *ob = ED_object_active_context(C);
- if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
+ if (ob && (eval_ctx.object_mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
Mesh *me = ob->data;
return CustomData_has_layer(&me->pdata, CD_RECAST);
}
@@ -672,8 +674,10 @@ static int navmesh_obmode_data_poll(bContext *C)
static int navmesh_obmode_poll(bContext *C)
{
+ EvaluationContext eval_ctx;
+ CTX_data_eval_ctx(C, &eval_ctx);
Object *ob = ED_object_active_context(C);
- if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
+ if (ob && (eval_ctx.object_mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
return true;
}
return false;