From 7a9ad029dd1d1afe42d54c9c181de887636db7c0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 May 2017 23:14:32 +1000 Subject: Remove TexFace, per-face images TexFace complicates the now more popular shading pipeline by having per-face images, see: T51382 for details. To keep the ability to select a per-material edit-image (used with UV-mapping workflow), the material now stores an image which will be set when changing images in edit-mode. This is used as a bake-target when not using Cycles too. --- source/blender/editors/uvedit/uvedit_buttons.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/uvedit/uvedit_buttons.c') diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c index ab415c0cb83..6b4dd0f0210 100644 --- a/source/blender/editors/uvedit/uvedit_buttons.c +++ b/source/blender/editors/uvedit/uvedit_buttons.c @@ -66,17 +66,14 @@ static int uvedit_center(Scene *scene, BMEditMesh *em, Image *ima, float center[ BMFace *f; BMLoop *l; BMIter iter, liter; - MTexPoly *tf; MLoopUV *luv; int tot = 0; const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); - const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY); zero_v2(center); BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) { - tf = BM_ELEM_CD_GET_VOID_P(f, cd_poly_tex_offset); - if (!uvedit_face_visible_test(scene, ima, f, tf)) + if (!uvedit_face_visible_test(scene, ima, f)) continue; BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { @@ -102,14 +99,11 @@ static void uvedit_translate(Scene *scene, BMEditMesh *em, Image *ima, float del BMLoop *l; BMIter iter, liter; MLoopUV *luv; - MTexPoly *tf; const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); - const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY); BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) { - tf = BM_ELEM_CD_GET_VOID_P(f, cd_poly_tex_offset); - if (!uvedit_face_visible_test(scene, ima, f, tf)) + if (!uvedit_face_visible_test(scene, ima, f)) continue; BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { -- cgit v1.2.3