Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-03-26 14:56:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-03-26 14:56:41 +0300
commit6184c07474f03c2fb815e28264a35881bace12d0 (patch)
treedcf800750af096801f793a460d3c6893567e8cd1 /source/blender/src/drawimage.c
parent2a47d029751fc14583d7b44f4e8fc84377b15f89 (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/drawimage.c')
-rw-r--r--source/blender/src/drawimage.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 1590308125c..0da3f3e7d2d 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -243,11 +243,10 @@ void calc_image_view(SpaceImage *sima, char mode)
/* check for facelesect, and set active image */
void what_image(SpaceImage *sima)
{
- MTFace *activetf;
-
if( (sima->mode!=SI_TEXTURE) ||
(sima->image && sima->image->source==IMA_SRC_VIEWER) ||
(G.obedit != OBACT) ||
+ (G.editMesh==NULL) ||
(sima->pin)
) {
return;
@@ -255,13 +254,16 @@ void what_image(SpaceImage *sima)
/* viewer overrides uv editmode */
if (EM_texFaceCheck()) {
+ MTFace *activetf;
+
sima->image= NULL;
activetf = get_active_mtface(NULL, NULL, 1); /* partially selected face is ok */
if(activetf && activetf->mode & TF_TEX) {
- if (!sima->pin)
- sima->image= activetf->tpage;
+ /* done need to check for pin here, see above */
+ /*if (!sima->pin)*/
+ sima->image= activetf->tpage;
if(sima->flag & SI_EDITTILE);
else sima->curtile= activetf->tile;
@@ -2141,6 +2143,7 @@ void drawimagespace(ScrArea *sa, void *spacedata)
if(sima->image->type==IMA_TYPE_R_RESULT)
show_render= 1;
}
+
what_image(sima);
aspect_sima(sima, &xuser_asp, &yuser_asp);