UI: layout tweaks for headers.

* Move all copy & paste operators into the menus. There was no real reason
  why these particular operators should be in the header and not in the menus,
  like all other operators
* Move ‘Update Automatically’ toggle from UV/Image Editor header into menu.
* Move the pin toggle next to the ID blocks, because it is related.
* Move OpenGL render from sequence header into View menu.
* Sequence editor display mode and channels are now not expanded.
This commit is contained in:
William Reynish 2018-10-08 19:10:10 +02:00 committed by Brecht Van Lommel
parent cf8e71db61
commit 6a41691a0d
6 changed files with 22 additions and 44 deletions

View File

@ -473,6 +473,9 @@ class DOPESHEET_MT_key(Menu):
layout.operator("action.frame_jump")
layout.separator()
layout.operator("action.copy")
layout.operator("action.paste")
layout.operator("action.paste", text="Paste Flipped").flipped = True
layout.operator("action.duplicate_move")
layout.operator("action.delete")
@ -486,10 +489,6 @@ class DOPESHEET_MT_key(Menu):
layout.operator("action.clean", text="Clean Channels").channels = True
layout.operator("action.sample")
layout.separator()
layout.operator("action.copy")
layout.operator("action.paste")
class DOPESHEET_MT_key_transform(Menu):
bl_label = "Transform"

View File

@ -75,11 +75,6 @@ class GRAPH_HT_header(Header):
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'
@ -277,6 +272,9 @@ class GRAPH_MT_key(Menu):
layout.operator("graph.frame_jump")
layout.separator()
layout.operator("graph.copy")
layout.operator("graph.paste")
layout.operator("graph.paste", text="Paste Flipped").flipped = True
layout.operator("graph.duplicate_move")
layout.operator("graph.delete")
@ -292,10 +290,6 @@ class GRAPH_MT_key(Menu):
layout.operator("graph.sample")
layout.operator("graph.bake")
layout.separator()
layout.operator("graph.copy")
layout.operator("graph.paste")
layout.separator()
layout.operator("graph.euler_filter", text="Discontinuity (Euler) Filter")

View File

@ -560,14 +560,11 @@ class IMAGE_HT_header(Header):
row = layout.row()
row.template_ID(sima, "mask", new="mask.new")
layout.separator_spacer()
if show_uvedit or show_maskedit or mode == 'PAINT':
layout.prop(sima, "use_realtime_update", icon_only=True, icon='FILE_REFRESH')
if not show_render:
layout.prop(sima, "use_image_pin", text="")
layout.separator_spacer()
if show_uvedit:
uvedit = sima.uv_editor

View File

@ -141,11 +141,12 @@ class NODE_HT_header(Header):
layout.template_ID(snode, "node_tree", new="node.new_node_tree")
layout.prop(snode, "pin", text="")
layout.separator_spacer()
layout.template_running_jobs()
layout.prop(snode, "pin", text="")
layout.operator("node.tree_path_parent", text="", icon='FILE_PARENT')
# Snap
@ -155,10 +156,6 @@ class NODE_HT_header(Header):
if toolsettings.snap_node_element != 'GRID':
row.prop(toolsettings, "snap_target", text="")
row = layout.row(align=True)
row.operator("node.clipboard_copy", text="", icon='COPYDOWN')
row.operator("node.clipboard_paste", text="", icon='PASTEDOWN')
class NODE_MT_editor_menus(Menu):
bl_idname = "NODE_MT_editor_menus"
@ -266,7 +263,8 @@ class NODE_MT_node(Menu):
layout.operator("transform.resize")
layout.separator()
layout.operator("node.clipboard_copy", text="Copy")
layout.operator("node.clipboard_paste", text="Paste")
layout.operator("node.duplicate_move")
layout.operator("node.delete")
layout.operator("node.delete_reconnect")

View File

@ -98,10 +98,10 @@ class SEQUENCER_HT_header(Header):
layout.operator("sequencer.refresh_all")
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
layout.prop(st, "display_mode", expand=True, text="")
layout.prop(st, "display_mode", text="", icon_only=True)
if st.view_type != 'SEQUENCER':
layout.prop(st, "preview_channels", expand=True, text="")
layout.prop(st, "preview_channels", text="", icon_only=True)
layout.prop(st, "display_channel", text="Channel")
ed = scene.sequence_editor
@ -126,17 +126,7 @@ class SEQUENCER_HT_header(Header):
if toolsettings.proportional_edit != 'DISABLED':
row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
row = layout.row(align=True)
row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
if st.view_type == 'SEQUENCER':
row = layout.row(align=True)
row.operator("sequencer.copy", text="", icon='COPYDOWN')
row.operator("sequencer.paste", text="", icon='PASTEDOWN')
class SEQUENCER_MT_editor_menus(Menu):
@ -239,6 +229,11 @@ class SEQUENCER_MT_view(Menu):
layout.prop(st, "use_marker_sync")
layout.separator()
layout.operator("render.opengl", text="OpenGL Render", icon='RENDER_STILL').sequencer = True
props = layout.operator("render.opengl", text="OpenGL Render Animation", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
layout.menu("INFO_MT_area")
@ -451,6 +446,8 @@ class SEQUENCER_MT_strip(Menu):
layout.operator("sequencer.offset_clear")
layout.separator()
layout.operator("sequencer.copy", text="Copy")
layout.operator("sequencer.paste", text="Paste")
layout.operator("sequencer.duplicate_move")
layout.operator("sequencer.delete", text="Delete...")

View File

@ -60,13 +60,6 @@ class VIEW3D_HT_header(Header):
row = layout.row()
row.prop(tool_settings.particle_edit, "select_mode", text="", expand=True)
# Pose
if obj and object_mode == 'POSE':
row = layout.row(align=True)
row.operator("pose.copy", text="", icon='COPYDOWN')
row.operator("pose.paste", text="", icon='PASTEDOWN').flipped = False
row.operator("pose.paste", text="", icon='PASTEFLIPDOWN').flipped = True
# Grease Pencil
if obj and obj.type == 'GPENCIL' and context.gpencil_data:
gpd = context.gpencil_data
@ -2438,7 +2431,7 @@ class VIEW3D_MT_pose(Menu):
layout.operator("pose.copy")
layout.operator("pose.paste").flipped = False
layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True
layout.operator("pose.paste", text="Paste Pose Flipped").flipped = True
layout.separator()