Fix T93130: Frame Selected with selected paint mask does not work

This broke with {rB20fac2eca723} (which landed in 2.63), so long
standing bug.

Convention for paint modes is:
- when no paint mask is active, `Frame Selected` will focus the last
stroke
- when paint mask is active, `Frame Selected` will focus the selected
mask faces

To check the right vert coords we have to offset with `mp->loopstart`.

Maniphest Tasks: T93130

Differential Revision: https://developer.blender.org/D13247
This commit is contained in:
Philipp Oeser 2021-11-16 20:25:11 +01:00
parent 35c3644e78
commit a773cd3850
Notes: blender-bot 2023-02-14 10:54:29 +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 #93130, View/Frame Selected (Vertex Paint mode) not working
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3])
continue;
}
ml = me->mloop + mp->totloop;
ml = me->mloop + mp->loopstart;
for (b = 0; b < mp->totloop; b++, ml++) {
mul_v3_m3v3(vec, bmat, mvert[ml->v].co);
add_v3_v3v3(vec, vec, ob->obmat[3]);