[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34119] trunk/blender/release/scripts/ui: Added back "Marker" menu to all animation editors.

Joshua Leung aligorith at gmail.com
Thu Jan 6 05:47:58 CET 2011


Revision: 34119
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34119
Author:   aligorith
Date:     2011-01-06 05:47:57 +0100 (Thu, 06 Jan 2011)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_dopesheet.py
    trunk/blender/release/scripts/ui/space_graph.py
    trunk/blender/release/scripts/ui/space_nla.py
    trunk/blender/release/scripts/ui/space_time.py

Modified: trunk/blender/release/scripts/ui/space_dopesheet.py
===================================================================
--- trunk/blender/release/scripts/ui/space_dopesheet.py	2011-01-06 04:35:57 UTC (rev 34118)
+++ trunk/blender/release/scripts/ui/space_dopesheet.py	2011-01-06 04:47:57 UTC (rev 34119)
@@ -87,6 +87,7 @@
 
             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,7 +179,26 @@
         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"
 

Modified: trunk/blender/release/scripts/ui/space_graph.py
===================================================================
--- trunk/blender/release/scripts/ui/space_graph.py	2011-01-06 04:35:57 UTC (rev 34118)
+++ trunk/blender/release/scripts/ui/space_graph.py	2011-01-06 04:47:57 UTC (rev 34119)
@@ -39,6 +39,7 @@
 
             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,7 +133,26 @@
         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"
 

Modified: trunk/blender/release/scripts/ui/space_nla.py
===================================================================
--- trunk/blender/release/scripts/ui/space_nla.py	2011-01-06 04:35:57 UTC (rev 34118)
+++ trunk/blender/release/scripts/ui/space_nla.py	2011-01-06 04:47:57 UTC (rev 34119)
@@ -39,6 +39,7 @@
 
             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,7 +93,24 @@
         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"
 

Modified: trunk/blender/release/scripts/ui/space_time.py
===================================================================
--- trunk/blender/release/scripts/ui/space_time.py	2011-01-06 04:35:57 UTC (rev 34118)
+++ trunk/blender/release/scripts/ui/space_time.py	2011-01-06 04:47:57 UTC (rev 34119)
@@ -144,15 +144,12 @@
 
         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()
 





More information about the Bf-blender-cvs mailing list