diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-09-19 18:04:20 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-09-21 11:48:40 +0300 |
commit | ef45d1c8cd4313e3efb409ad5e5f8bfb29c826aa (patch) | |
tree | 69a0ef55d5d7af86ca4c6f56a9f1e2b0c345b3be /source/blender/editors | |
parent | cdf489d10152ea54d9a07b0b32fbbbb063092e09 (diff) |
GPencil: Use Object location instead of 3D cursor for Grab Brush
Instead to use the 3D cursor as reference point (legacy code), it would be better use the object location.
Tested by: @pepeland
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 59d63e0a3fd..f894c362848 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -532,7 +532,7 @@ static void gp_brush_grab_calc_dvec(tGP_BrushEditData *gso) // XXX: screen-space strokes in 3D space will suffer! if (gso->sa->spacetype == SPACE_VIEW3D) { RegionView3D *rv3d = gso->ar->regiondata; - float *rvec = gso->scene->cursor.location; + float *rvec = gso->object->loc; float zfac = ED_view3d_calc_zfac(rv3d, rvec, NULL); float mval_f[2]; @@ -657,7 +657,7 @@ static void gp_brush_calc_midpoint(tGP_BrushEditData *gso) * See: gpencil_paint.c :: gp_stroke_convertcoords() */ RegionView3D *rv3d = gso->ar->regiondata; - const float *rvec = gso->scene->cursor.location; + const float *rvec = gso->object->loc; float zfac = ED_view3d_calc_zfac(rv3d, rvec, NULL); float mval_f[2]; |