diff options
author | Luca Rood <dev@lucarood.com> | 2017-07-21 12:53:13 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-07-21 15:47:26 +0300 |
commit | 1c4c288727214fa0588d66556a1cdf71755d70b4 (patch) | |
tree | 1433952be7e88cc7d09e8563831995290e3013ce /source/blender/editors/space_view3d/view3d_snap.c | |
parent | 9edb7e49d7e5e69385f3a0434c568c79fad88cd8 (diff) |
Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 8e566b8da1a..1df29201bf6 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -74,9 +74,12 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) RegionView3D *rv3d = CTX_wm_region_data(C); TransVertStore tvs = {NULL}; TransVert *tv; + EvaluationContext eval_ctx; float gridf, imat[3][3], bmat[3][3], vec[3]; int a; + CTX_data_eval_ctx(C, &eval_ctx); + gridf = rv3d->gridview; if (obedit) { @@ -163,7 +166,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) if (ob->parent) { float originmat[3][3]; - BKE_object_where_is_calc_ex(scene, NULL, ob, originmat); + BKE_object_where_is_calc_ex(&eval_ctx, scene, NULL, ob, originmat); invert_m3_m3(imat, originmat); mul_m3_v3(imat, vec); @@ -214,11 +217,14 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global View3D *v3d = CTX_wm_view3d(C); TransVertStore tvs = {NULL}; TransVert *tv; + EvaluationContext eval_ctx; float imat[3][3], bmat[3][3]; float center_global[3]; float offset_global[3]; int a; + CTX_data_eval_ctx(C, &eval_ctx); + if (use_offset) { if ((v3d && v3d->around == V3D_AROUND_ACTIVE) && snap_calc_active_center(C, true, center_global)) @@ -371,7 +377,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global if (ob->parent) { float originmat[3][3]; - BKE_object_where_is_calc_ex(scene, NULL, ob, originmat); + BKE_object_where_is_calc_ex(&eval_ctx, scene, NULL, ob, originmat); invert_m3_m3(imat, originmat); mul_m3_v3(imat, cursor_parent); |