Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-06-26 12:12:25 +0300
committerJoshua Leung <aligorith@gmail.com>2018-06-26 12:44:14 +0300
commit5f545dbde81352fd2e98fdb77e8a2d15434d2648 (patch)
treea1dbd9e849d91f27702df850baa33c1e49764b38 /release/scripts/startup/bl_ui/space_nla.py
parentc795505a2c751e1396029c8797af79e1b5b98447 (diff)
AnimEditors UI: Move less frequently used filtering options to a "Filters" popovers
This commit is an experiment in using popovers as a place to house some of the filtering options for animation editors, in line with what's taking place in the Outliner with the filtering popover there too. Right now, the most frequently used/changed options are still available on the headers (i.e. the "Only Selected"/"Hidden"/search fields), while everything else (i.e. the per-datablock filters, which were already hidden behind a collapsed-toggle button before) now live in the popover.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_nla.py')
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py30
1 files changed, 27 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 607e2d28d0f..9f23420298f 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -19,15 +19,17 @@
# <pep8 compliant>
import bpy
-from bpy.types import Header, Menu
+from bpy.types import Header, Menu, Panel
+from .space_dopesheet import (
+ DopesheetFilterPopoverBase,
+ dopesheet_filter,
+ )
class NLA_HT_header(Header):
bl_space_type = 'NLA_EDITOR'
def draw(self, context):
- from .space_dopesheet import dopesheet_filter
-
layout = self.layout
st = context.space_data
@@ -35,6 +37,12 @@ class NLA_HT_header(Header):
row = layout.row(align=True)
row.template_header()
+ layout.popover(space_type='NLA_EDITOR',
+ region_type='HEADER',
+ panel_type="NLA_PT_filters",
+ text="",
+ icon='FILTER')
+
NLA_MT_editor_menus.draw_collapsible(context, layout)
dopesheet_filter(layout, context)
@@ -43,6 +51,21 @@ class NLA_HT_header(Header):
layout.prop(st, "auto_snap", text="")
+class NLA_PT_filters(DopesheetFilterPopoverBase, Panel):
+ bl_space_type = 'NLA_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_label = "Filters"
+
+ def draw(self, context):
+ layout = self.layout
+
+ DopesheetFilterPopoverBase.draw_generic_filters(context, layout)
+ layout.separator()
+ DopesheetFilterPopoverBase.draw_search_filters(context, layout)
+ layout.separator()
+ DopesheetFilterPopoverBase.draw_standard_filters(context, layout)
+
+
class NLA_MT_editor_menus(Menu):
bl_idname = "NLA_MT_editor_menus"
bl_label = ""
@@ -218,6 +241,7 @@ classes = (
NLA_MT_marker,
NLA_MT_add,
NLA_MT_edit_transform,
+ NLA_PT_filters,
)
if __name__ == "__main__": # only for live edit.