diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-13 13:47:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-13 13:47:33 +0300 |
commit | 6e2270f3d33c1b6dc8c7779a42398c5943fa3072 (patch) | |
tree | 18506a29e1c666bb97da9eefbd1949cf3071f92c | |
parent | 58555ccc7aabecd6349de816af29be33f0fc9941 (diff) | |
parent | e30ccb9a34f39ef0565214aef1084c47871a27fe (diff) |
Merge branch 'blender-v3.2-release'
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert_tracking.c | 11 |
2 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc index 43aa52f08c8..2c4e7bfa802 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc @@ -387,8 +387,7 @@ static void extract_edituv_points_iter_poly_mesh(const MeshRenderData *mr, for (int ml_index = mp->loopstart; ml_index < ml_index_end; ml_index += 1) { const MLoop *ml = &mloop[ml_index]; - const bool real_vert = (mr->extract_type == MR_EXTRACT_MAPPED && (mr->v_origindex) && - mr->v_origindex[ml->v] != ORIGINDEX_NONE); + const bool real_vert = !mr->v_origindex || mr->v_origindex[ml->v] != ORIGINDEX_NONE; edituv_point_add( data, ((mp->flag & ME_HIDE) != 0) || !real_vert, (mp->flag & ME_FACE_SEL) != 0, ml_index); } @@ -449,9 +448,8 @@ static void extract_edituv_points_iter_subdiv_mesh(const DRWSubdivCache *subdiv_ uint end_loop_idx = (subdiv_quad_index + 1) * 4; for (uint i = start_loop_idx; i < end_loop_idx; i++) { const int vert_origindex = subdiv_loop_vert_index[i]; - const bool real_vert = (mr->extract_type == MR_EXTRACT_MAPPED && (mr->v_origindex) && - vert_origindex != -1 && - mr->v_origindex[vert_origindex] != ORIGINDEX_NONE); + const bool real_vert = !mr->v_origindex || (vert_origindex != -1 && + mr->v_origindex[vert_origindex] != ORIGINDEX_NONE); edituv_point_add(data, ((coarse_quad->flag & ME_HIDE) != 0) || !real_vert, (coarse_quad->flag & ME_FACE_SEL) != 0, @@ -543,8 +541,7 @@ static void extract_edituv_fdots_iter_poly_mesh(const MeshRenderData *mr, for (int ml_index = mp->loopstart; ml_index < ml_index_end; ml_index += 1) { const MLoop *ml = &mloop[ml_index]; - const bool real_fdot = (mr->extract_type == MR_EXTRACT_MAPPED && mr->p_origindex && - mr->p_origindex[mp_index] != ORIGINDEX_NONE); + const bool real_fdot = !mr->p_origindex || (mr->p_origindex[mp_index] != ORIGINDEX_NONE); const bool subd_fdot = BLI_BITMAP_TEST(facedot_tags, ml->v); edituv_facedot_add(data, ((mp->flag & ME_HIDE) != 0) || !real_fdot || !subd_fdot, @@ -553,8 +550,7 @@ static void extract_edituv_fdots_iter_poly_mesh(const MeshRenderData *mr, } } else { - const bool real_fdot = (mr->extract_type == MR_EXTRACT_MAPPED && mr->p_origindex && - mr->p_origindex[mp_index] != ORIGINDEX_NONE); + const bool real_fdot = !mr->p_origindex || (mr->p_origindex[mp_index] != ORIGINDEX_NONE); edituv_facedot_add( data, ((mp->flag & ME_HIDE) != 0) || !real_fdot, (mp->flag & ME_FACE_SEL) != 0, mp_index); } diff --git a/source/blender/editors/transform/transform_convert_tracking.c b/source/blender/editors/transform/transform_convert_tracking.c index 90ca2805008..d447cd71a40 100644 --- a/source/blender/editors/transform/transform_convert_tracking.c +++ b/source/blender/editors/transform/transform_convert_tracking.c @@ -621,7 +621,7 @@ static void flushTransTracking(TransInfo *t) TransData *td; TransData2D *td2d; TransDataTracking *tdt; - int a; + int td_index; if (t->state == TRANS_CANCEL) { cancelTransTracking(t); @@ -630,8 +630,9 @@ static void flushTransTracking(TransInfo *t) TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_SINGLE(t); /* flush to 2d vector from internally used 3d vector */ - for (a = 0, td = tc->data, td2d = tc->data_2d, tdt = tc->custom.type.data; a < tc->data_len; - a++, td2d++, td++, tdt++) { + for (td_index = 0, td = tc->data, td2d = tc->data_2d, tdt = tc->custom.type.data; + td_index < tc->data_len; + td_index++, td2d++, td++, tdt++) { if (tdt->mode == transDataTracking_ModeTracks) { float loc2d[2]; @@ -655,7 +656,7 @@ static void flushTransTracking(TransInfo *t) if (!tdt->smarkers) { tdt->smarkers = MEM_callocN(sizeof(*tdt->smarkers) * tdt->markersnr, "flushTransTracking markers"); - for (a = 0; a < tdt->markersnr; a++) { + for (int a = 0; a < tdt->markersnr; a++) { copy_v2_v2(tdt->smarkers[a], tdt->markers[a].pos); } } @@ -665,7 +666,7 @@ static void flushTransTracking(TransInfo *t) sub_v2_v2v2(d2, loc2d, tdt->srelative); - for (a = 0; a < tdt->markersnr; a++) { + for (int a = 0; a < tdt->markersnr; a++) { add_v2_v2v2(tdt->markers[a].pos, tdt->smarkers[a], d2); } |