From cfc2b0b01ffe24ee2be224c0c266b8707cf0f7b6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 11 Apr 2011 00:49:08 +0000 Subject: fix for one of the [#26854] UV issues - add back UV X/Y number buttons, the report points out they are missing. - set the 2D cursor's subtype to PROP_COORDS (so buttons say x/y now) --- source/blender/editors/space_image/image_buttons.c | 31 ++++++++-------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'source/blender/editors/space_image/image_buttons.c') diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 6a50de566ac..3dffb924434 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -255,16 +255,10 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block) ocent[1] *= imy; } - //uiBlockBeginAlign(block); - if(nactive==1) { - uiDefButF(block, NUM, B_TRANS_IMAGE, "Vertex X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, ""); - uiDefButF(block, NUM, B_TRANS_IMAGE, "Vertex Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, ""); - } - else { - uiDefButF(block, NUM, B_TRANS_IMAGE, "Median X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, ""); - uiDefButF(block, NUM, B_TRANS_IMAGE, "Median Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, ""); - } - //uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_TRANS_IMAGE, "X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, ""); + uiDefButF(block, NUM, B_TRANS_IMAGE, "Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, ""); + uiBlockEndAlign(block); } } else { // apply event @@ -993,16 +987,6 @@ void image_buttons_register(ARegionType *art) { PanelType *pt; - /* editvertex_buts not working atm */ - if(0) { - pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv"); - strcpy(pt->idname, "IMAGE_PT_uv"); - strcpy(pt->label, "UV"); - pt->draw= image_panel_uv; - pt->poll= image_panel_uv_poll; - BLI_addtail(&art->paneltypes, pt); - } - pt= MEM_callocN(sizeof(PanelType), "spacetype image panel curves"); strcpy(pt->idname, "IMAGE_PT_curves"); strcpy(pt->label, "Curves"); @@ -1016,6 +1000,13 @@ void image_buttons_register(ARegionType *art) strcpy(pt->label, "Grease Pencil"); pt->draw= gpencil_panel_standard; BLI_addtail(&art->paneltypes, pt); + + pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv"); + strcpy(pt->idname, "IMAGE_PT_uv"); + strcpy(pt->label, "UV Vertex"); + pt->draw= image_panel_uv; + pt->poll= image_panel_uv_poll; + BLI_addtail(&art->paneltypes, pt); } static int image_properties(bContext *C, wmOperator *UNUSED(op)) -- cgit v1.2.3