Page MenuHome

Outliner: Add "Selectable" filter
ClosedPublic

Authored by Jaggz H (jaggz) on Apr 2 2020, 2:56 PM.

Details

Summary

The UI presently presents very little means to enable selection of objects which have been made unselectable -- users must basically resort to searching by hand, possibly through the entire outliner tree.

This addition to the filters will allow the user to enable the outliner tree to restrict the listing to only Selectable objects, which may serve some use itself, but in accordance with Nathan Craddock's discussions with the UI team, is primarily intended to be used along with a future-planned Inverse [of the filters] option, so UNselectable objects may be easily found in the outliner.

Diff Detail

Repository
rB Blender

Event Timeline

Jaggz H (jaggz) created this revision.Apr 2 2020, 2:56 PM
Jaggz H (jaggz) retitled this revision from First pass: Outliner->Filtes -> Objects->UNSELECTABLE to First pass: Outliner->Filters -> Objects->UNSELECTABLE.

I think this looks fine, but you should merge in commits from master. The patch is based on a master from January (when I couldn't compile on Arch for various reasons) so I had to merge. If you want me to I can update the patch for you. I was about to but I felt you should do it if you want.

Rebased branch to current master

I left a comment on a line I believe needs to be fixed, but otherwise it looks good to me. Maybe @Campbell Barton (campbellbarton) could verify about the DNA enum.

source/blender/makesdna/DNA_space_types.h
313–314

I believe that inserting SO_FILTER_OB_STATE_UNSELECTABLE into the enum will cause older files to read the filter flags incorrectly

Dalai Felinto (dfelinto) requested changes to this revision.Apr 28 2020, 12:33 PM

Hi, the patch lacks the description of the intended use. The reason why these changes are being proposed.

This should be part of the patch description and is the first thing reviewed before the code is even considered.

This revision now requires changes to proceed.Apr 28 2020, 12:33 PM

SO_FILTER_OB_STATE_UNSELECTABLE = (1 << 17), /* Not set via DNA. */
How do I resolve this? Add it to the end, as 18 (instead of 17), and keep SO_FILTER_ID_TYPE shifted up one still?

Jaggz H (jaggz) retitled this revision from First pass: Outliner->Filters -> Objects->UNSELECTABLE to Outliner: Add "Unselectable" filter.Jun 27 2020, 4:47 AM
Jaggz H (jaggz) edited the summary of this revision. (Show Details)
Jaggz H (jaggz) edited the summary of this revision. (Show Details)
  • Merge branch 'master' into arcpatch-D7310

Hi @Jaggz H (jaggz), we talked about this patch as a UI team yesterday. We decided that the feature is useful, but there are a couple of changes we would like to see.

  1. This patch should instead implement a Selectable filter.
  2. Then a later improvement can add a general invert option for the outliner filter.

Changing this patch to instead filter selectable objects should be a quick fix. Make sure to update the patch title and description too, and it would be good to merge with master since it's been a few months.

Flipped logic to Selectable

  • Corrected the actual non-flipped logic exclude_filter test
  • Changed to use an UNUSED enum
  • Removed the now-used UNUSED enum from versioning_280.c
Nathan Craddock (natecraddock) requested changes to this revision.EditedOct 31 2020, 5:30 AM

Tested and the behavior works well! Just a few small changes and it will be ready to go.
Also make sure to update the patch title & description

source/blender/blenloader/intern/versioning_280.c
3423

You should leave SO_FILTER_OB_STATE_SELECTABLE here in the versioning code. If an older file has this bit set in the filter, we want to reset it to 0 when opening in new versions of Blender

source/blender/makesdna/DNA_space_types.h
308

Add a . at the end of the comment for consistency

source/blender/makesrna/intern/rna_space.c
3053

I would leave SELECTED in its original spot here

This revision now requires changes to proceed.Oct 31 2020, 5:30 AM
Jaggz H (jaggz) retitled this revision from Outliner: Add "Unselectable" filter to Outliner: Add "Selectable" filter.Oct 31 2020, 11:13 PM
Jaggz H (jaggz) edited the summary of this revision. (Show Details)
Jaggz H (jaggz) marked 3 inline comments as done.
  • Versioning fix. Filter order consistency...

Looks good! Thanks for cleaning things up a bit.

This revision is now accepted and ready to land.Nov 1 2020, 7:00 AM