diff options
author | Antonioya <blendergit@gmail.com> | 2019-03-17 21:47:31 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-03-17 21:47:56 +0300 |
commit | 6577618d5bb93792c805e0c22e4de1a015ee25d5 (patch) | |
tree | 05d5056646b3aefd8be21bb1ff314e4373865683 /source/blender/editors/gpencil/gpencil_primitive.c | |
parent | 887d052e56a515145f4dd7433e49c91c5d149169 (diff) |
GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:
- Changes to fill algorithms and improves, specially in small areas and stroke corners.
New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.
Kudos to @charlie for coding this fill improvements.
- New 3D cursor view plane option.
Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.
- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.
Changes reviewed by @pepeland and @mendio
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 88906488e1a..962442824f9 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -930,11 +930,13 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) ts->gpencil_v3d_align, origin); /* reproject current */ ED_gpencil_tpoint_to_point(tgpi->ar, origin, tpt, &spt); - ED_gp_project_point_to_plane(tgpi->ob, tgpi->rv3d, origin, tgpi->lock_axis - 1, &spt); + ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d, + origin, tgpi->lock_axis - 1, &spt); /* reproject previous */ ED_gpencil_tpoint_to_point(tgpi->ar, origin, tptb, &spt2); - ED_gp_project_point_to_plane(tgpi->ob, tgpi->rv3d, origin, tgpi->lock_axis - 1, &spt2); + ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d, + origin, tgpi->lock_axis - 1, &spt2); tgpi->totpixlen += len_v3v3(&spt.x, &spt2.x) / pixsize; tpt->uv_fac = tgpi->totpixlen; if ((gp_style) && (gp_style->sima)) { @@ -993,7 +995,8 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) tgpi->scene, tgpi->ob, tgpi->gpl, ts->gpencil_v3d_align, origin); ED_gp_project_stroke_to_plane( - tgpi->ob, tgpi->rv3d, gps, origin, ts->gp_sculpt.lock_axis - 1); + tgpi->scene, tgpi->ob, tgpi->rv3d, gps, + origin, ts->gp_sculpt.lock_axis - 1); } /* if parented change position relative to parent object */ |