glitches with UV tools fixed - P was grabbing, snap cursor to selection

didnt work, and constants for black and white were reversed (not user 
visible error)
This commit is contained in:
2007-09-27 16:47:08 +00:00
parent 637a22bcc3
commit 8c2ebc2dec
3 changed files with 5 additions and 7 deletions

View File

@@ -624,7 +624,7 @@ void draw_uvs_sima(void)
break;
case SI_UVDT_BLACK: /* black/white */
case SI_UVDT_WHITE:
cpack((G.sima->dt_uv==SI_UVDT_WHITE) ? 0x0 : 0xFFFFFF);
cpack((G.sima->dt_uv==SI_UVDT_WHITE) ? 0xFFFFFF : 0x0);
for (efa= em->faces.first; efa; efa= efa->next) {
// tface= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
// if (SIMA_FACEDRAW_CHECK(efa, tface)) {
@@ -1165,8 +1165,8 @@ static void image_panel_view_properties(short cntrl) // IMAGE_HANDLER_VIEW_PROPE
uiDefBut(block, LABEL, B_NOP, "Draw Type:", 10, 20,120,19, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButC(block, ROW, B_REDR, "Dash", 10, 0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_DASH, 0, 0, "Dashed Wire UV drawtype");
uiDefButC(block, ROW, B_REDR, "Black", 68, 0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_WHITE, 0, 0, "Black Wire UV drawtype");
uiDefButC(block, ROW, B_REDR, "White", 126,0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_BLACK, 0, 0, "White Wire UV drawtype");
uiDefButC(block, ROW, B_REDR, "Black", 68, 0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_BLACK, 0, 0, "Black Wire UV drawtype");
uiDefButC(block, ROW, B_REDR, "White", 126,0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_WHITE, 0, 0, "White Wire UV drawtype");
uiDefButC(block, ROW, B_REDR, "Outline", 184,0,58,19, &G.sima->dt_uv, 0.0, SI_UVDT_OUTLINE, 0, 0, "Outline Wire UV drawtype");
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, SI_SMOOTH_UV, B_REDR, "Smooth", 250,0,60,19, &G.sima->flag, 0, 0, 0, 0, "Display smooth lines in the UV view");

View File

@@ -1027,7 +1027,7 @@ void snap_menu_sima(void)
short event;
if( is_uv_tface_editing_allowed()==0 || !G.v2d) return; /* !G.v2d should never happen */
event = pupmenu("Snap %t|Selection -> Pixels%x1|Selection -> Cursor%x2|Selection -> Adjacent Unselected%x3|Cursor-> Pixel%x3|Cursor-> Selection%x4");
event = pupmenu("Snap %t|Selection -> Pixels%x1|Selection -> Cursor%x2|Selection -> Adjacent Unselected%x3|Cursor -> Pixel%x4|Cursor -> Selection%x5");
switch (event) {
case 1:
if (snap_uv_sel_to_pixels()) {

View File

@@ -4817,7 +4817,6 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else if((G.qual==0))
borderselect_sima(UV_SELECT_ALL);
break;
case CKEY:
if (G.sima->flag & SI_SYNC_UVSEL) {
/* operate on the editmesh */
@@ -4877,6 +4876,7 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
pin_tface_uv(0);
else
pin_tface_uv(1);
break;
case GKEY:
if((G.qual==0) && is_uv_tface_editing_allowed()) {
initTransform(TFM_TRANSLATION, CTX_NONE);
@@ -4925,7 +4925,6 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
scrarea_queue_headredraw(curarea);
scrarea_queue_winredraw(curarea);
break;
case PERIODKEY:
if(G.qual==LR_CTRLKEY) {
G.v2d->around= V3D_LOCAL;
@@ -4947,7 +4946,6 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
G.scene->prop_mode = (G.scene->prop_mode+1)%7;
allqueue(REDRAWHEADERS, 0);
}
break;
case PADSLASHKEY:
if(G.qual==0)