diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-09 21:37:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-09 21:37:00 +0300 |
commit | dc82c2cd4817c6c84a4dd7e313eb2659a8830d59 (patch) | |
tree | dce4908aece61d8d03c0e6ea424e402919d99012 /source/blender/editors/gpencil | |
parent | 119230b565f10aeb13e7ee67ef5d75ec55015083 (diff) |
View selected support for grease-pencil
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index f54da91af71..b2c6107ab61 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -641,3 +641,21 @@ void gp_subdivide_stroke(bGPDstroke *gps, const int new_totpoints) } /* ******************************************************** */ + + +bool ED_gpencil_stroke_minmax( + const bGPDstroke *gps, const bool use_select, + float r_min[3], float r_max[3]) +{ + const bGPDspoint *pt; + int i; + bool changed = false; + + for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { + if ((use_select == false) || (pt->flag & GP_SPOINT_SELECT)) {; + minmax_v3v3_v3(r_min, r_max, &pt->x); + changed = true; + } + } + return changed; +} |