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:
authorCampbell Barton <ideasman42@gmail.com>2010-01-30 04:25:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-30 04:25:02 +0300
commitada9ca9687cb70d02d1a6afebbb865d2080ddf1b (patch)
treefc7e484b6cb99b15a49277a3d728312078c52a9d /source/blender/editors/space_view3d/view3d_header.c
parentdd0db63a5c054f888eefc6d685efc4c5cbfcb42c (diff)
[#20487] Small bug in 3d window's header in edit mode.
[#20713] vertex, edge and face toggling acts like shift select (in 2.49) with or without shift pressed revert own changes from 26035 - python buttons were toggles so clicking on 1 didnt disable the others. - for some reason the layout engine wasnt working right here and made the buttons skilly in localview.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 3ef6166bc7c..bf774442812 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -533,4 +533,17 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
/* Scene lock */
uiItemR(layout, "", 0, &v3dptr, "lock_camera_and_layers", UI_ITEM_R_ICON_ONLY);
}
+
+ /* selection modus, dont use python for this since it cant do the toggle buttons with shift+click as well as clicking to set one. */
+ if(obedit && (obedit->type == OB_MESH)) {
+ EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
+
+ row= uiLayoutRow(layout, 1);
+ block= uiLayoutGetBlock(row);
+ uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, 0,0,XIC,YIC, &em->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0,0,XIC,YIC, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select mode");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0,0,XIC,YIC, &em->selectmode, 1.0, 0.0, 0, 0, "Face select mode");
+
+ BKE_mesh_end_editmesh(obedit->data, em);
+ }
}