Outliner: Object state filter invert toggle

This adds an invert toggle for the outliner object state filters.
There are some cases where we want a filter for invertable states (Selected,
Unselected) and having a single toggle to invert the filter reduces the
number of separate filter types needed. This removes the "Hidden" filter
which can now be replicated with an inverted "Visible" filter.

Differential Revision: https://developer.blender.org/D9598
This commit is contained in:
2020-11-20 08:47:51 -07:00
parent 96995b2343
commit 2afdb4ba87
5 changed files with 43 additions and 19 deletions

View File

@@ -372,10 +372,16 @@ class OUTLINER_PT_filter(Panel):
row = col.row()
row.label(icon='OUTLINER_COLLECTION')
row.prop(space, "use_filter_collection", text="Collections")
row = col.row()
row.label(icon='OBJECT_DATAMODE')
row.prop(space, "use_filter_object", text="Objects")
row = col.row(align=True)
row.label(icon="BLANK1")
row.prop(space, "filter_state", text="")
sub = row.row(align=True)
sub.enabled = space.filter_state != 'ALL'
sub.prop(space, "filter_invert", text="", icon="ARROW_LEFTRIGHT")
sub = col.column(align=True)
sub.active = space.use_filter_object