[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48295] branches/soc-2012-bratwurst/source /blender: A slightly different way of dealing with the shift problem that doesn' t involve a hack.
Jorge Rodriguez
bs.vino at gmail.com
Tue Jun 26 03:18:40 CEST 2012
Revision: 48295
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48295
Author: vino
Date: 2012-06-26 01:18:30 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
A slightly different way of dealing with the shift problem that doesn't involve a hack. It also changes the design of the layer buttons slightly such that clicking one doesn't automatically reset the others, which I think may be a usability improvement anyway as their purpose is to act like layers, which should be independent of each other. To make up for this I've added a ctrl-click which acts as before, selecting a single layer to the exclusion of others.
Modified Paths:
--------------
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_layout.c
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_templates.c
branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_event_system.c
Modified: branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c 2012-06-26 00:35:05 UTC (rev 48294)
+++ branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c 2012-06-26 01:18:30 UTC (rev 48295)
@@ -2246,9 +2246,6 @@
button_activate_state(C, but, BUTTON_STATE_EXIT);
- // Kind of a hack. We don't want this assignment to turn off others, so force shift on to cause handle_layer_buttons to skip that.
- win->eventstate->shift = 1;
-
return WM_UI_HANDLER_BREAK;
}
}
Modified: branches/soc-2012-bratwurst/source/blender/editors/interface/interface_layout.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/interface/interface_layout.c 2012-06-26 00:35:05 UTC (rev 48294)
+++ branches/soc-2012-bratwurst/source/blender/editors/interface/interface_layout.c 2012-06-26 01:18:30 UTC (rev 48295)
@@ -327,7 +327,10 @@
int shift = win->eventstate->shift;
int len = RNA_property_array_length(ptr, prop);
- if (!shift) {
+ if (G.drag_button_func)
+ shift = 1;
+
+ if (!shift || win->eventstate->ctrl) {
RNA_property_boolean_set_index(ptr, prop, index, TRUE);
for (i = 0; i < len; i++)
Modified: branches/soc-2012-bratwurst/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/interface/interface_templates.c 2012-06-26 00:35:05 UTC (rev 48294)
+++ branches/soc-2012-bratwurst/source/blender/editors/interface/interface_templates.c 2012-06-26 01:18:30 UTC (rev 48295)
@@ -1979,7 +1979,10 @@
wmWindow *win = CTX_wm_window(C);
int i, tot, shift = win->eventstate->shift;
- if (!shift) {
+ if (G.drag_button_func)
+ shift = 1;
+
+ if (!shift || win->eventstate->ctrl) {
tot = RNA_property_array_length(&but->rnapoin, but->rnaprop);
/* Normally clicking only selects one layer */
Modified: branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_event_system.c 2012-06-26 00:35:05 UTC (rev 48294)
+++ branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_event_system.c 2012-06-26 01:18:30 UTC (rev 48295)
@@ -2127,10 +2127,7 @@
}
if (event->val == KM_RELEASE)
- {
G.drag_button_func = 0;
- win->eventstate->shift = 0; // This was set in ui_do_but_TOG(). Clear it now that we're done toggling buttons.
- }
/* unlink and free here, blender-quit then frees all */
BLI_remlink(&win->queue, event);
More information about the Bf-blender-cvs
mailing list