diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-26 14:56:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-26 14:56:41 +0300 |
commit | 6184c07474f03c2fb815e28264a35881bace12d0 (patch) | |
tree | dcf800750af096801f793a460d3c6893567e8cd1 /source/blender/src/editface.c | |
parent | 2a47d029751fc14583d7b44f4e8fc84377b15f89 (diff) |
fix for [#8732] Unwrap Project from View not matching View
the active face could be unselected. now unwrapping with no UV layer will assign the current image to the selected faces.
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r-- | source/blender/src/editface.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 33b9a60104f..f6b3b1f321a 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -363,6 +363,9 @@ void calculate_uv_map(unsigned short mapmode) if (em && em->faces.first) EM_add_data_layer(&em->fdata, CD_MTFACE); + if (G.sima && G.sima->image) /* this is a bit of a kludge, but assume they want the image on their mesh when UVs are added */ + image_changed(G.sima, G.sima->image); + if (!EM_texFaceCheck()) return; @@ -571,10 +574,11 @@ MTFace *get_active_mtface(EditFace **act_efa, MCol **mcol, short sloppy) if(!EM_texFaceCheck()) return NULL; + if (sloppy) + efa = EM_get_actFace(); + /* first check the active face */ - if (sloppy && em->act_face) { - efa = em->act_face; - } else { + if ((sloppy && efa)==0) { ese = em->selected.last; for (; ese; ese=ese->prev){ if(ese->type == EDITFACE) { |