diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-24 16:14:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-24 16:38:15 +0300 |
commit | 7a9ad029dd1d1afe42d54c9c181de887636db7c0 (patch) | |
tree | e9281cbe8bb01365a699ffd6f4bbd09a6a91015f /source/blender/editors/uvedit/uvedit_unwrap_ops.c | |
parent | 707340edd703ff1fd7c8157eb3cc811913698c8d (diff) |
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.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_unwrap_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index d8080002818..6df73051701 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -58,6 +58,7 @@ #include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_main.h" +#include "BKE_material.h" #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_editmesh.h" @@ -214,8 +215,7 @@ void ED_uvedit_get_aspect(Scene *scene, Object *ob, BMesh *bm, float *aspx, floa ED_object_get_active_image(ob, efa->mat_nr + 1, &ima, NULL, NULL, NULL); } else { - MTexPoly *tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); - ima = tf->tpage; + ima = BKE_object_material_edit_image_get(ob, efa->mat_nr); } ED_image_get_uv_aspect(ima, NULL, aspx, aspy); |