Fix T97207: Move to Collections Menu Grayed out when in Local View

This behaviour was introduced in a687d98e67 to bring the old obscure
"M" operator to remove objects from the local view. In order to avoid
the keymap clash with the Move to Collection operator, the Move to
Collection was artificially restricted to work in local view.

In retrospect, the "Remove from Local View" operator is in the menu anyways,
so it didn't even need to have a shortcut (back in 2.79 the operator was
not in a menu).

The changes introduced here are:
* No shortcut for "Remove from Local View"
* No more restrictions to "Move/Link to Collection" from local view.

Thanks for Philipp Oeser for digging the old commit that introduced this
and for the rationale on the changes.
This commit is contained in:
Dalai Felinto 2022-04-13 12:22:35 +02:00
parent c31b89e76e
commit cf5d582b77
Notes: blender-bot 2023-02-14 04:10:15 +01:00
Referenced by commit f076493dbb, Keymap: restore key-shortcut to remove from local-view
Referenced by issue #97207, Move to Collections Menu Grayed out when in Local View
2 changed files with 0 additions and 8 deletions

View File

@ -1387,7 +1387,6 @@ def km_view3d(params):
("view3d.localview", {"type": 'NUMPAD_SLASH', "value": 'PRESS'}, None),
("view3d.localview", {"type": 'SLASH', "value": 'PRESS'}, None),
("view3d.localview", {"type": 'MOUSESMARTZOOM', "value": 'ANY'}, None),
("view3d.localview_remove_from", {"type": 'M', "value": 'PRESS'}, None),
# Navigation.
("view3d.rotate", {"type": 'MOUSEROTATE', "value": 'ANY'}, None),
*((

View File

@ -1828,13 +1828,6 @@ static bool move_to_collection_poll(bContext *C)
if (CTX_wm_space_outliner(C) != NULL) {
return ED_outliner_collections_editor_poll(C);
}
View3D *v3d = CTX_wm_view3d(C);
if (v3d && v3d->localvd) {
return false;
}
return ED_operator_objectmode(C);
}