GP: Use only selected points to calc transform center

This commit is contained in:
2018-12-20 21:25:29 +01:00
parent b49699b1ec
commit 4d9606ef19

View File

@@ -8213,15 +8213,7 @@ static void createTransGPencil_center_get(
zero_v3(r_center);
int tot_sel = 0;
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
bool point_ok;
if (is_prop_edit) {
point_ok = true;
}
else {
/* Only selected points in selected strokes */
point_ok = (pt->flag & GP_SPOINT_SELECT) != 0;
}
if (point_ok) {
if (pt->flag & GP_SPOINT_SELECT) {
add_v3_v3(r_center, &pt->x);
tot_sel++;
}