Enable multi-selection editing by default (Alt-key behavior)

This means editing a property will now always affect all selected objects, bones or sequencer strips. Support for this was added in rBdfbb876d4660 but you had to hold the Alt-key to use it. The old behavior of only editing the active object will not be kept like decided in the 2.8 workflow meeting (reports comming). If you only want to edit the active object, you have to deselect others.

There are still a couple of issues to be resolved (listed below), but having it enabled by default helps testing and getting used to it and should motivate us to fix them ;)
To be fixed:
* Give users hint when edits are applied to all objects/bones/strips ("Applying to x objects") - there are ideas but we need to finalize and implement them
* Make it work better in corner cases (material editing, modifier property editing, etc)

Note: Values usually override the initial value of the object/bones/strips, except of number buttons where it depends if you enter the value (absolute override) or drag the value (add value change). This behavior is consistent with multi-button editing.
This commit is contained in:
Julian Eisel 2016-11-27 16:28:56 +01:00
parent a796a84a43
commit 2821da5b70
Notes: blender-bot 2023-02-14 05:53:36 +01:00
Referenced by issue #55034, Setting duplication group for multiple selected items only affects one item
1 changed files with 7 additions and 29 deletions

View File

@ -184,7 +184,6 @@ typedef struct uiSelectContextStore {
uiSelectContextElem *elems;
int elems_len;
bool do_free;
bool is_enabled;
/* When set, simply copy values (don't apply difference).
* Rules are:
* - dragging numbers uses delta.
@ -1159,14 +1158,11 @@ static void ui_multibut_states_apply(bContext *C, uiHandleButtonData *data, uiBl
ui_but_execute_begin(C, ar, but, &active_back);
#ifdef USE_ALLSELECT
if (data->select_others.is_enabled) {
/* init once! */
if (mbut_state->select_others.elems_len == 0) {
ui_selectcontext_begin(C, but, &mbut_state->select_others);
}
if (mbut_state->select_others.elems_len == 0) {
mbut_state->select_others.elems_len = -1;
}
if (mbut_state->select_others.elems_len == 0) {
ui_selectcontext_begin(C, but, &mbut_state->select_others);
}
if (mbut_state->select_others.elems_len == 0) {
mbut_state->select_others.elems_len = -1;
}
/* needed so we apply the right deltas */
@ -2054,12 +2050,7 @@ static void ui_apply_but(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
else
# endif
if (data->select_others.elems_len == 0) {
wmWindow *win = CTX_wm_window(C);
/* may have been enabled before activating */
if (data->select_others.is_enabled || IS_ALLSELECT_EVENT(win->eventstate)) {
ui_selectcontext_begin(C, but, &data->select_others);
data->select_others.is_enabled = true;
}
ui_selectcontext_begin(C, but, &data->select_others);
}
if (data->select_others.elems_len == 0) {
/* dont check again */
@ -3048,11 +3039,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
#ifdef USE_ALLSELECT
if (is_num_but) {
if (IS_ALLSELECT_EVENT(win->eventstate)) {
data->select_others.is_enabled = true;
data->select_others.is_copy = true;
}
data->select_others.is_copy = true;
}
#endif
@ -3652,15 +3639,6 @@ static void ui_block_open_begin(bContext *C, uiBut *but, uiHandleButtonData *dat
data->menu->popup = but->block->handle->popup;
}
#ifdef USE_ALLSELECT
{
wmWindow *win = CTX_wm_window(C);
if (IS_ALLSELECT_EVENT(win->eventstate)) {
data->select_others.is_enabled = true;
}
}
#endif
/* this makes adjacent blocks auto open from now on */
//if (but->block->auto_open == 0) but->block->auto_open = 1;
}