Page MenuHome

Outliner: Add new delete operator
ClosedPublic

Authored by Nathan Craddock (natecraddock) on Apr 28 2020, 6:36 PM.

Details

Summary

In the industry standard keymap, both deleting objects and collections were mapped to the same keys causing confusion when only collections could be deleted through the keymap. Other issues for outliner delete have been raised as well T67462

This adds a new delete operator to delete all selected objects and collections, accessible from both the keymap and context menu. Now any selected objects and collections are deleted when Delete is chosen from the keymap. This also updates the tooltip description which was previously undocumented.

I decided to leave the operator in the context menu twice, for objects and collections because the menu changes depending on what is selected. It would be good to make this smarter, but I think it would be better as part of a larger cleanup of the context menu.

Diff Detail

Repository
rB Blender
Branch
temp-outliner-delete (branched from master)
Build Status
Buildable 7769
Build 7769: arc lint + arc unit

Event Timeline

Nathan Craddock (natecraddock) requested review of this revision.Apr 28 2020, 6:36 PM
Nathan Craddock (natecraddock) created this revision.
source/blender/editors/space_outliner/outliner_tools.c
1516–1526

The only thing I am unsure of is all the depsgraph and notifiers tagging. I copied the lines over from the other operators and did my best to clean it up a bit

  • Use LISTBASE_FOREACH macro

This is also an issue for the default keymap - we have loads of bug reports describing how deleting doesn’t work in the Outliner. This solves that issue.

This revision is now accepted and ready to land.Apr 29 2020, 8:14 AM
  • Remove XXX from comment