Revision: 26409
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26409
Author: campbellbarton
Date: 2010-01-30 02:25:02 +0100 (Sat, 30 Jan 2010)
Log Message:
-----------
[#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.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_view3d.py
trunk/blender/source/blender/editors/space_view3d/view3d_header.c
Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py 2010-01-30 01:10:16 UTC
(rev 26408)
+++ trunk/blender/release/scripts/ui/space_view3d.py 2010-01-30 01:25:02 UTC
(rev 26409)
@@ -56,12 +56,16 @@
row.template_header_3D()
+ # do in C for now since these buttons cant be both toggle AND
exclusive.
+ '''
if obj and obj.mode == 'EDIT' and obj.type == 'MESH':
row_sub = row.row(align=True)
row_sub.prop(toolsettings, "mesh_selection_mode", text="",
index=0, icon='VERTEXSEL')
row_sub.prop(toolsettings, "mesh_selection_mode", text="",
index=1, icon='EDGESEL')
row_sub.prop(toolsettings, "mesh_selection_mode", text="",
index=2, icon='FACESEL')
+ '''
+
# Particle edit
if obj and obj.mode == 'PARTICLE_EDIT':
row.prop(toolsettings.particle_edit, "selection_mode", text="",
expand=True, toggle=True)
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_header.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_header.c
2010-01-30 01:10:16 UTC (rev 26408)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_header.c
2010-01-30 01:25:02 UTC (rev 26409)
@@ -533,4 +533,17 @@
/* 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);
+ }
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs