diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-06 07:47:57 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-06 07:47:57 +0300 |
commit | aafd32ab98c05a0bcd1916a2f02713490588e084 (patch) | |
tree | cc3e13c8abb1554650145da6203163ed33af1e7e /release | |
parent | bba20eb5ae5e20a1ce4dcf74fa50bf6971315423 (diff) |
Added back "Marker" menu to all animation editors.
Issues:
- It looks a bit crowded though, so perhaps we could do without, and
just leave it for the TimeLine only?
- Due to the way the invoke() testing works, the rename operator
called from the menu currently fails. Will need to experiment more
with execution options to find a workaround.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_dopesheet.py | 20 | ||||
-rw-r--r-- | release/scripts/ui/space_graph.py | 20 | ||||
-rw-r--r-- | release/scripts/ui/space_nla.py | 18 | ||||
-rw-r--r-- | release/scripts/ui/space_time.py | 11 |
4 files changed, 62 insertions, 7 deletions
diff --git a/release/scripts/ui/space_dopesheet.py b/release/scripts/ui/space_dopesheet.py index ce670511ba4..b6d1185d5db 100644 --- a/release/scripts/ui/space_dopesheet.py +++ b/release/scripts/ui/space_dopesheet.py @@ -87,6 +87,7 @@ class DOPESHEET_HT_header(bpy.types.Header): sub.menu("DOPESHEET_MT_view") sub.menu("DOPESHEET_MT_select") + sub.menu("DOPESHEET_MT_marker") if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None): sub.menu("DOPESHEET_MT_channel") @@ -178,6 +179,25 @@ class DOPESHEET_MT_select(bpy.types.Menu): layout.separator() layout.operator("action.select_linked") +class DOPESHEET_MT_marker(bpy.types.Menu): + bl_label = "Marker" + + def draw(self, context): + layout = self.layout + + #layout.operator_context = 'EXEC_REGION_WIN' + + layout.column() + layout.operator("marker.add", "Add Marker") + layout.operator("marker.duplicate", text="Duplicate Marker") + layout.operator("marker.delete", text="Delete Marker") + + layout.separator() + + layout.operator("marker.rename", text="Rename Marker") + layout.operator("marker.move", text="Grab/Move Marker") + + # TODO: pose markers for action edit mode only? class DOPESHEET_MT_channel(bpy.types.Menu): bl_label = "Channel" diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py index 15900e803cc..95521c28fb9 100644 --- a/release/scripts/ui/space_graph.py +++ b/release/scripts/ui/space_graph.py @@ -39,6 +39,7 @@ class GRAPH_HT_header(bpy.types.Header): sub.menu("GRAPH_MT_view") sub.menu("GRAPH_MT_select") + sub.menu("GRAPH_MT_marker") sub.menu("GRAPH_MT_channel") sub.menu("GRAPH_MT_key") @@ -132,6 +133,25 @@ class GRAPH_MT_select(bpy.types.Menu): layout.separator() layout.operator("graph.select_linked") +class GRAPH_MT_marker(bpy.types.Menu): + bl_label = "Marker" + + def draw(self, context): + layout = self.layout + + #layout.operator_context = 'EXEC_REGION_WIN' + + layout.column() + layout.operator("marker.add", "Add Marker") + layout.operator("marker.duplicate", text="Duplicate Marker") + layout.operator("marker.delete", text="Delete Marker") + + layout.separator() + + layout.operator("marker.rename", text="Rename Marker") + layout.operator("marker.move", text="Grab/Move Marker") + + # TODO: pose markers for action edit mode only? class GRAPH_MT_channel(bpy.types.Menu): bl_label = "Channel" diff --git a/release/scripts/ui/space_nla.py b/release/scripts/ui/space_nla.py index 3e1cf93df07..1705bd70551 100644 --- a/release/scripts/ui/space_nla.py +++ b/release/scripts/ui/space_nla.py @@ -39,6 +39,7 @@ class NLA_HT_header(bpy.types.Header): sub.menu("NLA_MT_view") sub.menu("NLA_MT_select") + sub.menu("NLA_MT_marker") sub.menu("NLA_MT_edit") sub.menu("NLA_MT_add") @@ -92,6 +93,23 @@ class NLA_MT_select(bpy.types.Menu): layout.operator("nla.select_border") layout.operator("nla.select_border", text="Border Axis Range").axis_range = True +class NLA_MT_marker(bpy.types.Menu): + bl_label = "Marker" + + def draw(self, context): + layout = self.layout + + #layout.operator_context = 'EXEC_REGION_WIN' + + layout.column() + layout.operator("marker.add", "Add Marker") + layout.operator("marker.duplicate", text="Duplicate Marker") + layout.operator("marker.delete", text="Delete Marker") + + layout.separator() + + layout.operator("marker.rename", text="Rename Marker") + layout.operator("marker.move", text="Grab/Move Marker") class NLA_MT_edit(bpy.types.Menu): bl_label = "Edit" diff --git a/release/scripts/ui/space_time.py b/release/scripts/ui/space_time.py index 6c4aaab84d9..b2768c91837 100644 --- a/release/scripts/ui/space_time.py +++ b/release/scripts/ui/space_time.py @@ -144,15 +144,12 @@ class TIME_MT_frame(bpy.types.Menu): layout.operator("marker.add", text="Add Marker") layout.operator("marker.duplicate", text="Duplicate Marker") - layout.operator("marker.move", text="Grab/Move Marker") layout.operator("marker.delete", text="Delete Marker") - # it was ok for riscos... ok TODO, operator - for marker in context.scene.timeline_markers: - if marker.select: - layout.separator() - layout.prop(marker, "name", text="", icon='MARKER_HLT') - break + layout.separator() + + layout.operator("marker.rename", text="Rename Marker") + layout.operator("marker.move", text="Grab/Move Marker") layout.separator() |