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
This commit is contained in:
parent
0b246ed813
commit
7b09213f2f
Notes:
blender-bot
2023-02-13 17:05:06 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #93198, Frame Selected does not work in Grease Pencil Curve Edit Mode
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue