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:
authorMatt Ebb <matt@mke3.net>2008-07-07 06:02:10 +0400
committerMatt Ebb <matt@mke3.net>2008-07-07 06:02:10 +0400
commit0456a71eddb53a60ffe127c4d6870ce46374264c (patch)
tree3de9e6c74ae32e6ea63324085f0d07d29ebe38e9 /source/blender/src
parent32cefbdecfc4867dfca813e304a6184987115013 (diff)
* New UV editor selection mode: Island
This goes alongside vertex and face selection and selects an entire UV island with a single click. It's a lot less painful to use when rearranging UV layouts, especially with Drag Immediately on - see: http://mke3.net/blender/etc/uv_island.mov
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawimage.c2
-rw-r--r--source/blender/src/editsima.c16
-rw-r--r--source/blender/src/header_image.c23
3 files changed, 26 insertions, 15 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 547de85e856..14849cdd450 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -422,7 +422,7 @@ int draw_uvs_face_check(void)
return 1;
}
} else {
- if (G.sima->flag & SI_SELACTFACE) {
+ if (G.sima->selectmode == SI_SELECT_FACE) {
return 1;
}
}
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index 18a9803dcae..7c2edc3e236 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -694,7 +694,7 @@ void mouse_select_sima(void)
EditFace *efa;
MTFace *tf, *nearesttf;
EditFace *nearestefa=NULL;
- int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift;
+ int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island;
char sticky= 0;
int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
unsigned int hitv[4], nearestv;
@@ -706,7 +706,7 @@ void mouse_select_sima(void)
edgeloop= G.qual & LR_ALTKEY;
shift= G.qual & LR_SHIFTKEY;
-
+
if (G.sima->flag & SI_SYNC_UVSEL) {
/* copy from mesh */
if (G.scene->selectmode == SCE_SELECT_FACE) {
@@ -718,7 +718,8 @@ void mouse_select_sima(void)
}
} else {
/* normal operation */
- actface= G.sima->flag & SI_SELACTFACE;
+ actface= G.sima->selectmode == SI_SELECT_FACE;
+ island= G.sima->selectmode == SI_SELECT_ISLAND;
switch(G.sima->sticky) {
case SI_STICKY_LOC:
@@ -761,6 +762,9 @@ void mouse_select_sima(void)
if (nearestefa->v4) hitv[3]= nearestefa->v4->tmp.l;
else hitv[3]= 0xFFFFFFFF;
}
+ else if (island) {
+
+ }
else {
find_nearest_uv(&nearesttf, &nearestefa, &nearestv, &nearestuv);
if(nearesttf==NULL)
@@ -774,7 +778,11 @@ void mouse_select_sima(void)
}
}
- if(!edgeloop && shift) {
+ if (island) {
+ if(shift) select_linked_tface_uv(1);
+ else select_linked_tface_uv(0);
+ }
+ else if(!edgeloop && shift) {
/* (de)select face */
if(actface) {
if(simaFaceSel_Check(nearestefa, nearesttf)) {
diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c
index 7ac57cb839b..fac9e3af1af 100644
--- a/source/blender/src/header_image.c
+++ b/source/blender/src/header_image.c
@@ -1214,28 +1214,31 @@ void image_buttons(void)
uiBlockBeginAlign(block);
/* B_SEL_VERT & B_SEL_FACE are not defined here which is a bit bad, BUT it works even if image editor is fullscreen */
- uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)");
- xco+= XIC;
+ uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL,
+ xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)");
/* no edge */
/*uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode (Ctrl Tab 2)");
xco+= XIC; */
- uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)");
- xco+= XIC+8;
+ uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL,
+ xco+=XIC,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)");
uiBlockEndAlign(block);
} else {
uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOGN, SI_SELACTFACE, B_REDR, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.sima->flag, 1.0, 0.0, 0, 0, "UV Vertex select mode");
- xco+= XIC;
- uiDefIconButBitI(block, TOG, SI_SELACTFACE, B_REDR, ICON_FACESEL, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "UV Face select mode");
- xco+= XIC+8;
- uiBlockEndAlign(block);
+ uiDefIconButS(block, ROW, B_REDR, ICON_VERTEXSEL,
+ xco,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_VERTEX, 0, 0, "UV vertex select mode");
+ uiDefIconButS(block, ROW, B_REDR, ICON_FACESEL,
+ xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_FACE, 0, 0, "UV Face select mode");
+ uiDefIconButS(block, ROW, B_REDR, ICON_MESH,
+ xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_ISLAND, 0, 0, "UV Island select mode");
+ uiBlockEndAlign(block);
+
/* would use these if const's could go in strings
* SI_STICKY_LOC SI_STICKY_DISABLE SI_STICKY_VERTEX */
ubut = uiDefIconTextButC(block, ICONTEXTROW, B_REDR, ICON_STICKY_UVS_LOC,
"Sticky UV Selection: %t|Disable%x1|Shared Location%x0|Shared Vertex%x2",
- xco,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0,
+ xco+=XIC+10,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0,
"Sticky UV Selection (Hotkeys: Shift C, Alt C, Ctrl C)");
}