diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-25 08:11:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-25 08:19:58 +0300 |
commit | bdbf4471a6c4ba2d444eea5e7f0e6984b3aaafc2 (patch) | |
tree | 0aeabc52f0b6c770270b0dfe5f5877cb790c826d /source/blender/editors/uvedit | |
parent | c7c6070a6469055a1a503acec47780a2de30c218 (diff) |
TexFace removal part 3
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 9 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 1cb913c316a..2a8b4928b46 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -624,7 +624,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, SceneLayer *sl, Object *obe unsigned int pos; - efa_act = EDBM_mtexpoly_active_get(em, false, false); /* will be set to NULL if hidden */ + efa_act = EDBM_uv_active_face_get(em, false, false); /* will be set to NULL if hidden */ ts = scene->toolsettings; drawfaces = draw_uvs_face_check(scene); @@ -1039,7 +1039,7 @@ static void draw_uv_shadows_get(SpaceImage *sima, Object *ob, Object *obedit, bo if ((sima->mode == SI_MODE_PAINT) && obedit && obedit->type == OB_MESH) { struct BMEditMesh *em = BKE_editmesh_from_object(obedit); - *show_shadow = EDBM_mtexpoly_check(em); + *show_shadow = EDBM_uv_check(em); } *show_texpaint = (ob && ob->type == OB_MESH && ob->mode == OB_MODE_TEXTURE_PAINT); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 02257a08c21..9d1c36aff31 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -106,7 +106,7 @@ bool ED_uvedit_test(Object *obedit) return 0; em = BKE_editmesh_from_object(obedit); - ret = EDBM_mtexpoly_check(em); + ret = EDBM_uv_check(em); return ret; } @@ -218,11 +218,10 @@ void ED_uvedit_assign_image(Main *UNUSED(bmain), Scene *scene, Object *obedit, I #endif /* ensure we have a uv map */ - if (!CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) { - BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY); + if (!CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) { BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV); /* make UVs all nice 0-1 */ - ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer_index(&em->bm->pdata, CD_MTEXPOLY)); + ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer_index(&em->bm->ldata, CD_MLOOPUV)); update = true; } @@ -3828,7 +3827,7 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op) em = me->edit_btmesh; bm = em->bm; - if (!EDBM_mtexpoly_check(em)) { + if (!EDBM_uv_check(em)) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index c362a8a6f2d..0cb117da341 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -117,7 +117,7 @@ static bool ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) if (ED_uvedit_test(obedit)) return 1; - if (em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) + if (em && em->bm->totface && !CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) ED_mesh_uv_texture_add(obedit->data, NULL, true); if (!ED_uvedit_test(obedit)) @@ -1632,8 +1632,6 @@ void ED_uvedit_unwrap_cube_project(Object *ob, BMesh *bm, float cube_size, bool BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { int first = 1; - - /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */ if (use_select && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) continue; |