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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-08-31 19:01:40 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-08-31 19:01:40 +0400
commitfe9b1c644f6dbfb531f23f9c4b4af53a3488abbb (patch)
tree95840364b32eb536e5161fe33f57c863a5c8dc02 /source/blender/editors/uvedit
parent78c181fafc91d90e794b43da876f3c317a4fe3a6 (diff)
Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its UVs shown in the image editor to be used as the source of the image shown.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c5
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c14
3 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 1f78bc6bddf..e5888a1b508 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -455,8 +455,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
StitchPreviewer *stitch_preview = uv_get_stitch_previewer();
- activetf = EDBM_mtexpoly_active_get(em, &efa_act, FALSE); /* will be set to NULL if hidden */
- activef = BM_active_face_get(bm, FALSE);
+ activetf = EDBM_mtexpoly_active_get(em, &efa_act, FALSE, FALSE); /* will be set to NULL if hidden */
+ activef = BM_active_face_get(bm, FALSE, FALSE);
ts = scene->toolsettings;
drawfaces = draw_uvs_face_check(scene);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index b922647f3e6..5008c35e46a 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -174,6 +174,8 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
BMIter iter;
MTexPoly *tf;
int update = 0;
+ int sloppy = TRUE;
+ int selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION);
/* skip assigning these procedural images... */
if (ima && (ima->type == IMA_TYPE_R_RESULT || ima->type == IMA_TYPE_COMPOSITE))
@@ -190,8 +192,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
if (BKE_scene_use_new_shading_nodes(scene)) {
/* new shading system, assign image in material */
- int sloppy = 1;
- BMFace *efa = BM_active_face_get(em->bm, sloppy);
+ BMFace *efa = BM_active_face_get(em->bm, sloppy, selected);
if (efa)
ED_object_assign_active_image(bmain, obedit, efa->mat_nr + 1, ima);
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index b4903390408..c1fb3ee3807 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -192,7 +192,10 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
handle = param_construct_begin();
if (correct_aspect) {
- efa = BM_active_face_get(em->bm, TRUE);
+ int sloppy = TRUE;
+ int selected = FALSE;
+
+ efa = BM_active_face_get(em->bm, sloppy, selected);
if (efa) {
float aspx, aspy;
@@ -380,7 +383,10 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
handle = param_construct_begin();
if (correct_aspect) {
- editFace = BM_active_face_get(em->bm, TRUE);
+ int sloppy = TRUE;
+ int selected = FALSE;
+
+ editFace = BM_active_face_get(em->bm, sloppy, selected);
if (editFace) {
MTexPoly *tf;
@@ -1003,7 +1009,9 @@ static void uv_transform_properties(wmOperatorType *ot, int radius)
static void correct_uv_aspect(BMEditMesh *em)
{
- BMFace *efa = BM_active_face_get(em->bm, TRUE);
+ int sloppy = TRUE;
+ int selected = FALSE;
+ BMFace *efa = BM_active_face_get(em->bm, sloppy, selected);
BMLoop *l;
BMIter iter, liter;
MLoopUV *luv;