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:
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_ops.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 6f3e6bee850..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);
@@ -2056,7 +2057,7 @@ static void UV_OT_select(wmOperatorType *ot)
ot->name = "Select";
ot->description = "Select UV vertices";
ot->idname = "UV_OT_select";
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* api callbacks */
ot->exec = select_exec;
@@ -2101,7 +2102,7 @@ static void UV_OT_select_loop(wmOperatorType *ot)
ot->name = "Loop Select";
ot->description = "Select a loop of connected UV vertices";
ot->idname = "UV_OT_select_loop";
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* api callbacks */
ot->exec = select_loop_exec;
@@ -2203,7 +2204,7 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot)
ot->name = "Select Linked Pick";
ot->description = "Select all UV vertices linked under the mouse";
ot->idname = "UV_OT_select_linked_pick";
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* api callbacks */
ot->invoke = select_linked_pick_invoke;