diff options
author | Germano <germano.costa@ig.com.br> | 2017-12-08 17:42:00 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2017-12-08 17:42:00 +0300 |
commit | e6838ecc260441dcba0abfcd8a8292b94081df64 (patch) | |
tree | cb3faf9c6d756e43066d68bb76c57847950b739c /source/blender/editors/space_view3d/drawobject.c | |
parent | f39a97fac5e619541550874ee230f3ed374d1183 (diff) |
Fix T53512: Vertices with index 0 were not being selected
Bug introduced on rB9f5bf197a0c3.
The offset for selection of vertices (`bm_vertoffs`) starts where the offset o edges ends (`bm_wireoffs`).
However, the `bm_wireoffs` depends on the offset of face selection (`bm_solidoffs`).
Before the commit that introduced the bug, the drawn of edges (in backbuff) was always computed along with the `bm_wireoffs`:
```
bm_wireoffs = bm_solidoffs + em->bm->totedge;
```
Now that the edges are not always drawn in backbuff, `bm_wireoffs` has to start from `bm_solidoffs`.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index a1075f7efcf..a1ddec7531e 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -8433,8 +8433,9 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec bbs_mesh_solid_EM(em, scene, v3d, ob, dm, (ts->selectmode & SCE_SELECT_FACE) != 0); if (ts->selectmode & SCE_SELECT_FACE) bm_solidoffs = 1 + em->bm->totface; - else + else { bm_solidoffs = 1; + } ED_view3d_polygon_offset(rv3d, 1.0); @@ -8443,6 +8444,10 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec bbs_mesh_wire(em, dm, bm_solidoffs); bm_wireoffs = bm_solidoffs + em->bm->totedge; } + else { + /* `bm_vertoffs` is calculated from `bm_wireoffs`. (otherwise see T53512) */ + bm_wireoffs = bm_solidoffs; + } /* we draw verts if vert select mode. */ if (ts->selectmode & SCE_SELECT_VERTEX) { |