diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-23 10:46:29 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-23 10:46:29 +0300 |
commit | 2204bfcf9e1c3a38e60830bd97775dd72158f4d6 (patch) | |
tree | 4f9c827389a23a431f8771b4ca02f410860c0242 /source/blender/editors/gpencil/gpencil_primitive.c | |
parent | f64db794ee690f05905ace0a66d81d2e75549b90 (diff) | |
parent | 34ad6da4a06ef46cd19945f61cc5f968538546a8 (diff) |
Merge branch 'master' into temp-gpencil-drw-engine
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 21bee0a9d4e..cca94925e6e 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -225,8 +225,8 @@ static void gp_primitive_update_cps(tGPDprimitive *tgpi) } else if (tgpi->type == GP_STROKE_CURVE) { mid_v2_v2v2(tgpi->midpoint, tgpi->start, tgpi->end); - copy_v2_v2(tgpi->cp1, tgpi->midpoint); - copy_v2_v2(tgpi->cp2, tgpi->cp1); + interp_v2_v2v2(tgpi->cp1, tgpi->midpoint, tgpi->start, 0.33f); + interp_v2_v2v2(tgpi->cp2, tgpi->midpoint, tgpi->end, 0.33f); } else if (tgpi->type == GP_STROKE_ARC) { if (tgpi->flip) { @@ -1284,6 +1284,11 @@ static void gpencil_primitive_interaction_end(bContext *C, } } + /* Close stroke with geometry */ + if ((tgpi->type == GP_STROKE_BOX) || (tgpi->type == GP_STROKE_CIRCLE)) { + BKE_gpencil_close_stroke(gps); + } + DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_COPY_ON_WRITE); DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); |