Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-11-19 11:31:01 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-22 15:42:00 +0300
commit7b09213f2f9a677fc38f4e7466c4d14a58bab74f (patch)
treeb80265cc5e8d63972e3a21c712e2fba06b795bda /source/blender
parent0b246ed8131f19235230b713812db6260fcbbb74 (diff)
Fix T93198: Frame Selected in greasepencil curve editing does not work
Was not taking into account curve points at all. Maniphest Tasks: T93198 Differential Revision: https://developer.blender.org/D13281
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index b85b424405e..34baf68ccdd 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -3059,6 +3059,23 @@ static int viewselected_exec(bContext *C, wmOperator *op)
if ((gps->flag & GP_STROKE_SELECT) && (gps->flag & GP_STROKE_3DSPACE)) {
ok |= BKE_gpencil_stroke_minmax(gps, true, min, max);
}
+ if (gps->editcurve != NULL) {
+ for (int i = 0; i < gps->editcurve->tot_curve_points; i++) {
+ BezTriple *bezt = &gps->editcurve->curve_points[i].bezt;
+ if ((bezt->f1 & SELECT)) {
+ minmax_v3v3_v3(min, max, bezt->vec[0]);
+ ok = true;
+ }
+ if ((bezt->f2 & SELECT)) {
+ minmax_v3v3_v3(min, max, bezt->vec[1]);
+ ok = true;
+ }
+ if ((bezt->f3 & SELECT)) {
+ minmax_v3v3_v3(min, max, bezt->vec[2]);
+ ok = true;
+ }
+ }
+ }
}
CTX_DATA_END;