diff options
author | William Reynish <billrey@me.com> | 2019-05-06 14:40:51 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-05-06 14:40:51 +0300 |
commit | 0f3f78e2b9a6bf39c530cd868e4ed57d4651d6fd (patch) | |
tree | 4ffd4b73658f20029f9f126fd1a54d14d2133397 /release/scripts/startup/bl_ui/space_outliner.py | |
parent | 064273a4ae7101f937cf2e16b0e2f1efcd2f0e38 (diff) |
UI: Outliner Filter popover layout
- Use checkboxes with aligned text
- Use icons next to the checkboxes
- Remove wrong use of icons
- Better grouping
Diffstat (limited to 'release/scripts/startup/bl_ui/space_outliner.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_outliner.py | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 43907f985c0..3718965657c 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -303,34 +303,60 @@ class OUTLINER_PT_filter(Panel): space = context.space_data display_mode = space.display_mode - layout.prop(space, "use_filter_complete", text="Exact Match Search") - layout.prop(space, "use_filter_case_sensitive", text="Case Sensitive Search") + if display_mode != 'DATA_API': + col = layout.column(align=True) + col.prop(space, "use_sort_alpha") + col.prop(space, "show_restrict_columns") + layout.separator() + + col = layout.column(align=True) + col.label(text="Search:") + col.prop(space, "use_filter_complete", text="Exact Match") + col.prop(space, "use_filter_case_sensitive", text="Case Sensitive") layout.separator() - if display_mode != 'DATA_API': - layout.prop(space, "use_sort_alpha") - layout.prop(space, "show_restrict_columns") - layout.separator() + layout.label(text="Filter:") col = layout.column(align=True) - col.prop(space, "use_filter_collection", text="Collections", icon='GROUP') - col.prop(space, "use_filter_object", text="Objects", icon='OBJECT_DATAMODE') + row = col.row() + row.label(icon='GROUP') + 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.prop(space, "filter_state", text="") sub = col.column(align=True) sub.active = space.use_filter_object + row = sub.row() + row.label(icon='BLANK1') + row.prop(space, "use_filter_object_content", text="Object Contents") + row = sub.row() + row.label(icon='BLANK1') + row.prop(space, "use_filter_children", text="Object Children") + if bpy.data.meshes: - sub.prop(space, "use_filter_object_mesh", text="Meshes", icon='MESH_DATA') + row = sub.row() + row.label(icon='MESH_DATA') + row.prop(space, "use_filter_object_mesh", text="Meshes") if bpy.data.armatures: - sub.prop(space, "use_filter_object_armature", text="Armatures", icon='ARMATURE_DATA') + row = sub.row() + row.label(icon='ARMATURE_DATA') + row.prop(space, "use_filter_object_armature", text="Armatures") if bpy.data.lights: - sub.prop(space, "use_filter_object_light", text="Lights", icon='LIGHT_DATA') + row = sub.row() + row.label(icon='LIGHT_DATA') + row.prop(space, "use_filter_object_light", text="Lights") if bpy.data.cameras: - sub.prop(space, "use_filter_object_camera", text="Cameras", icon='CAMERA_DATA') - - sub.prop(space, "use_filter_object_empty", text="Empties", icon='EMPTY_DATA') + row = sub.row() + row.label(icon='CAMERA_DATA') + row.prop(space, "use_filter_object_camera", text="Cameras") + row = sub.row() + row.label(icon='EMPTY_DATA') + row.prop(space, "use_filter_object_empty", text="Empties") if ( bpy.data.curves or @@ -342,11 +368,6 @@ class OUTLINER_PT_filter(Panel): ): sub.prop(space, "use_filter_object_others", text="Others") - subsub = sub.column(align=False) - subsub.prop(space, "filter_state", text="") - subsub.prop(space, "use_filter_object_content", text="Object Contents") - subsub.prop(space, "use_filter_children", text="Object Children") - classes = ( OUTLINER_HT_header, |