[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49165] branches/soc-2012-bratwurst/source /blender/editors/space_view3d/view3d_header.c: Restore the widgets to the 3D view header, they shouldn' t come out until someone does a proper re-design, even if they're redundant .
Jorge Rodriguez
bs.vino at gmail.com
Tue Jul 24 03:02:00 CEST 2012
Revision: 49165
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49165
Author: vino
Date: 2012-07-24 01:01:59 +0000 (Tue, 24 Jul 2012)
Log Message:
-----------
Restore the widgets to the 3D view header, they shouldn't come out until someone does a proper re-design, even if they're redundant.
Modified Paths:
--------------
branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_header.c
Modified: branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_header.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_header.c 2012-07-24 00:57:40 UTC (rev 49164)
+++ branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_header.c 2012-07-24 01:01:59 UTC (rev 49165)
@@ -357,6 +357,63 @@
WM_operator_properties_free(&props_ptr);
break;
+ case B_SEL_VERT:
+ if (em) {
+ if (shift == 0 || em->selectmode == 0)
+ em->selectmode = SCE_SELECT_VERTEX;
+ ts->selectmode = em->selectmode;
+ EDBM_selectmode_set(em);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ ED_undo_push(C, "Selectmode Set: Vertex");
+ }
+ break;
+ case B_SEL_EDGE:
+ if (em) {
+ if (shift == 0 || em->selectmode == 0) {
+ if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) {
+ if (ctrl) EDBM_selectmode_convert(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);
+ }
+ em->selectmode = SCE_SELECT_EDGE;
+ }
+ ts->selectmode = em->selectmode;
+ EDBM_selectmode_set(em);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ ED_undo_push(C, "Selectmode Set: Edge");
+ }
+ break;
+ case B_SEL_FACE:
+ if (em) {
+ if (shift == 0 || em->selectmode == 0) {
+ if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) {
+ if (ctrl) EDBM_selectmode_convert(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE);
+ }
+ em->selectmode = SCE_SELECT_FACE;
+ }
+ ts->selectmode = em->selectmode;
+ EDBM_selectmode_set(em);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ ED_undo_push(C, "Selectmode Set: Face");
+ }
+ break;
+
+ case B_MAN_TRANS:
+ if (shift == 0 || v3d->twtype == 0) {
+ v3d->twtype = V3D_MANIP_TRANSLATE;
+ }
+ ED_area_tag_redraw(sa);
+ break;
+ case B_MAN_ROT:
+ if (shift == 0 || v3d->twtype == 0) {
+ v3d->twtype = V3D_MANIP_ROTATE;
+ }
+ ED_area_tag_redraw(sa);
+ break;
+ case B_MAN_SCALE:
+ if (shift == 0 || v3d->twtype == 0) {
+ v3d->twtype = V3D_MANIP_SCALE;
+ }
+ ED_area_tag_redraw(sa);
+ break;
case B_NDOF:
ED_area_tag_redraw(sa);
break;
@@ -478,6 +535,15 @@
uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
block = uiLayoutGetBlock(row);
+ if (v3d->twflag & V3D_USE_MANIPULATOR) {
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator - Shift-Click for multiple modes"));
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator - Shift-Click for multiple modes"));
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator - Shift-Click for multiple modes"));
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+ }
+
if (v3d->twmode > (BIF_countTransformOrientation(C) - 1) + V3D_MANIP_CUSTOM) {
v3d->twmode = 0;
}
@@ -497,4 +563,6 @@
/* Scene lock */
uiItemR(layout, &v3dptr, "lock_camera_and_layers", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
+
+ uiTemplateEditModeSelection(layout, C);
}
More information about the Bf-blender-cvs
mailing list