diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 08:34:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:28 +0300 |
commit | ef11113399e3273ee647b3710b346356a2b5f8f0 (patch) | |
tree | ab2a0d19651915b45fa9db2f0a188054fcbbefc6 /source/blender/editors/transform/transform_generics.c | |
parent | 91db372b486807cec87a7ae3ccfc7bae0af62264 (diff) |
Object Mode: use eval_ctx mode in transform code
This adds EvaluationContext into TransInfo
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 1aa4513e99b..bd4acbe72cf 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -904,7 +904,9 @@ static void recalcData_objects(TransInfo *t) else BKE_pose_where_is(&eval_ctx, t->scene, ob); } - else if (base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, t->view_layer, base->object)) { + else if (base && (eval_ctx.object_mode & OB_MODE_PARTICLE_EDIT) && + PE_get_current(t->scene, t->view_layer, base->object)) + { if (t->state != TRANS_CANCEL) { applyProject(t); } @@ -1115,6 +1117,8 @@ static int initTransInfo_edit_pet_to_flag(const int proportional) */ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *event) { + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); Depsgraph *depsgraph = CTX_data_depsgraph(C); Scene *sce = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -1266,7 +1270,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } } - if (ob && ob->mode & OB_MODE_ALL_PAINT) { + if (ob && eval_ctx.object_mode & OB_MODE_ALL_PAINT) { Paint *p = BKE_paint_get_active_from_context(C); if (p && p->brush && (p->brush->flag & BRUSH_CURVE)) { t->options |= CTX_PAINT_CURVE; |