[Bf-blender-cvs] [cf5d582b77f] master: Fix T97207: Move to Collections Menu Grayed out when in Local View

Dalai Felinto noreply at git.blender.org
Wed Apr 13 12:30:47 CEST 2022


Commit: cf5d582b77fbb7bf392a94248228846bfb774a15
Author: Dalai Felinto
Date:   Wed Apr 13 12:22:35 2022 +0200
Branches: master
https://developer.blender.org/rBcf5d582b77fbb7bf392a94248228846bfb774a15

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

This behaviour was introduced in a687d98e6782 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.

===================================================================

M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	source/blender/editors/object/object_edit.c

===================================================================

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index a1913945364..be6ea28e72e 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -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),
         *((
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index cc8644285c0..2518b2d201d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -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);
 }



More information about the Bf-blender-cvs mailing list