UI: Header consistency for animation editors
This commit is contained in:
parent
cec11c86e5
commit
5b7f0d36f3
|
@ -262,6 +262,10 @@ class DOPESHEET_HT_editor_buttons(Header):
|
|||
row = layout.row(align=True)
|
||||
row.prop(st.dopesheet, "filter_text", text="")
|
||||
|
||||
# Grease Pencil mode doesn't need snapping, as it's frame-aligned only
|
||||
if st.mode != 'GPENCIL':
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
|
||||
layout.popover(
|
||||
space_type='DOPESHEET_EDITOR',
|
||||
region_type='HEADER',
|
||||
|
@ -270,17 +274,12 @@ class DOPESHEET_HT_editor_buttons(Header):
|
|||
icon='FILTER',
|
||||
)
|
||||
|
||||
layout.separator()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_proportional_action", text="", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = toolsettings.use_proportional_action
|
||||
sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
|
||||
# Grease Pencil mode doesn't need snapping, as it's frame-aligned only
|
||||
if st.mode != 'GPENCIL':
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("action.copy", text="", icon='COPYDOWN')
|
||||
|
|
|
@ -41,18 +41,8 @@ class GRAPH_HT_header(Header):
|
|||
# Now a exposed as a sub-space type
|
||||
# layout.prop(st, "mode", text="")
|
||||
|
||||
layout.popover(
|
||||
space_type='GRAPH_EDITOR',
|
||||
region_type='HEADER',
|
||||
panel_type="GRAPH_PT_filters",
|
||||
text="",
|
||||
icon='FILTER',
|
||||
)
|
||||
|
||||
GRAPH_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
dopesheet_filter(layout, context)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(st, "use_normalization", icon='NORMALIZE_FCURVES', text="Normalize", toggle=True)
|
||||
sub = row.row(align=True)
|
||||
|
@ -61,19 +51,7 @@ class GRAPH_HT_header(Header):
|
|||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_proportional_fcurve", text="", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = toolsettings.use_proportional_fcurve
|
||||
sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
layout.prop(st, "pivot_point", icon_only=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("graph.copy", text="", icon='COPYDOWN')
|
||||
row.operator("graph.paste", text="", icon='PASTEDOWN')
|
||||
row.operator("graph.paste", text="", icon='PASTEFLIPDOWN').flipped = True
|
||||
dopesheet_filter(layout, context)
|
||||
|
||||
row = layout.row(align=True)
|
||||
if st.has_ghost_curves:
|
||||
|
@ -81,6 +59,29 @@ class GRAPH_HT_header(Header):
|
|||
else:
|
||||
row.operator("graph.ghost_curves_create", text="", icon='GHOST_ENABLED')
|
||||
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
|
||||
layout.popover(
|
||||
space_type='GRAPH_EDITOR',
|
||||
region_type='HEADER',
|
||||
panel_type="GRAPH_PT_filters",
|
||||
text="",
|
||||
icon='FILTER',
|
||||
)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_proportional_fcurve", text="", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = toolsettings.use_proportional_fcurve
|
||||
sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
|
||||
layout.prop(st, "pivot_point", icon_only=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("graph.copy", text="", icon='COPYDOWN')
|
||||
row.operator("graph.paste", text="", icon='PASTEDOWN')
|
||||
row.operator("graph.paste", text="", icon='PASTEFLIPDOWN').flipped = True
|
||||
|
||||
|
||||
class GRAPH_PT_filters(DopesheetFilterPopoverBase, Panel):
|
||||
bl_space_type = 'GRAPH_EDITOR'
|
||||
|
|
|
@ -37,6 +37,14 @@ class NLA_HT_header(Header):
|
|||
row = layout.row(align=True)
|
||||
row.template_header()
|
||||
|
||||
NLA_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
dopesheet_filter(layout, context)
|
||||
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
|
||||
layout.popover(
|
||||
space_type='NLA_EDITOR',
|
||||
region_type='HEADER',
|
||||
|
@ -45,13 +53,6 @@ class NLA_HT_header(Header):
|
|||
icon='FILTER',
|
||||
)
|
||||
|
||||
NLA_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
dopesheet_filter(layout, context)
|
||||
|
||||
layout.separator_spacer()
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
|
||||
|
||||
class NLA_PT_filters(DopesheetFilterPopoverBase, Panel):
|
||||
bl_space_type = 'NLA_EDITOR'
|
||||
|
|
|
@ -38,9 +38,9 @@ class TIME_HT_editor_buttons(Header):
|
|||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
|
||||
layout.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("screen.frame_jump", text="", icon='REW').end = False
|
||||
row.operator("screen.keyframe_jump", text="", icon='PREV_KEYFRAME').next = False
|
||||
if not screen.is_animation_playing:
|
||||
|
|
Loading…
Reference in New Issue