[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32003] trunk/blender/release/scripts/ui/ space_view3d.py: Fix #23879: added undo/redo to object/paint/sculpt/ pose menus as well,

Brecht Van Lommel brechtvanlommel at pandora.be
Sat Sep 18 18:17:32 CEST 2010


Revision: 32003
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32003
Author:   blendix
Date:     2010-09-18 18:17:32 +0200 (Sat, 18 Sep 2010)

Log Message:
-----------
Fix #23879: added undo/redo to object/paint/sculpt/pose menus as well,
and made some small modifications to object menu to make it a bit
shorter, still much too long though, but at least not worse now.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d.py

Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py	2010-09-18 15:57:42 UTC (rev 32002)
+++ trunk/blender/release/scripts/ui/space_view3d.py	2010-09-18 16:17:32 UTC (rev 32003)
@@ -647,7 +647,6 @@
 
 # ********** Object menu **********
 
-
 class VIEW3D_MT_object(bpy.types.Menu):
     bl_context = "objectmode"
     bl_label = "Object"
@@ -655,6 +654,11 @@
     def draw(self, context):
         layout = self.layout
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_object_clear")
@@ -663,9 +667,7 @@
 
         layout.separator()
 
-        layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
-        layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
-        layout.operator("anim.keying_set_active_set", text="Change Keying Set...")
+        layout.menu("VIEW3D_MT_object_animation")
 
         layout.separator()
 
@@ -687,8 +689,7 @@
 
         layout.separator()
 
-        layout.menu("VIEW3D_MT_object_game_properties")
-        layout.menu("VIEW3D_MT_object_game_logicbricks")
+        layout.menu("VIEW3D_MT_object_game")
 
         layout.separator()
 
@@ -703,6 +704,18 @@
         layout.operator_menu_enum("object.convert", "target")
 
 
+class VIEW3D_MT_object_animation(bpy.types.Menu):
+    bl_context = "objectmode"
+    bl_label = "Animation"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
+        layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
+        layout.operator("anim.keying_set_active_set", text="Change Keying Set...")
+
+
 class VIEW3D_MT_object_clear(bpy.types.Menu):
     bl_label = "Clear"
 
@@ -908,26 +921,24 @@
         layout.operator_enums("object.make_links_data", "type")  # inline
 
 
-class VIEW3D_MT_object_game_properties(bpy.types.Menu):
-    bl_label = "Game Properties"
+class VIEW3D_MT_object_game(bpy.types.Menu):
+    bl_label = "Game"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.game_property_copy", text="Replace").operation = 'REPLACE'
-        layout.operator("object.game_property_copy", text="Merge").operation = 'MERGE'
-        layout.operator_menu_enum("object.game_property_copy", "property", text="Copy...")
+        layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks")
+
         layout.separator()
-        layout.operator("object.game_property_clear")
 
+        layout.operator("object.game_property_copy", text="Replace Properties").operation = 'REPLACE'
+        layout.operator("object.game_property_copy", text="Merge Properties").operation = 'MERGE'
+        layout.operator_menu_enum("object.game_property_copy", "property", text="Copy Properties...")
 
-class VIEW3D_MT_object_game_logicbricks(bpy.types.Menu):
-    bl_label = "Logic Bricks"
+        layout.separator()
 
-    def draw(self, context):
-        layout = self.layout
+        layout.operator("object.game_property_clear")
 
-        layout.operator("object.logic_bricks_copy", text="Copy")
 
 # ********** Vertex paint menu **********
 
@@ -938,6 +949,11 @@
     def draw(self, context):
         layout = self.layout
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.operator("paint.vertex_color_set")
         layout.operator("paint.vertex_color_dirt")
 
@@ -992,6 +1008,11 @@
     def draw(self, context):
         layout = self.layout
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.operator("paint.weight_from_bones", text="Assign Automatic From Bones").type = 'AUTOMATIC'
         layout.operator("paint.weight_from_bones", text="Assign From Bone Envelopes").type = 'ENVELOPES'
 
@@ -1016,6 +1037,11 @@
         sculpt = tool_settings.sculpt
         brush = tool_settings.sculpt.brush
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.prop(sculpt, "use_symmetry_x")
         layout.prop(sculpt, "use_symmetry_y")
         layout.prop(sculpt, "use_symmetry_z")
@@ -1061,6 +1087,11 @@
 
         particle_edit = context.tool_settings.particle_edit
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.operator("particle.mirror")
 
         layout.separator()
@@ -1111,6 +1142,11 @@
 
         arm = context.active_object.data
 
+        layout.operator("ed.undo")
+        layout.operator("ed.redo")
+
+        layout.separator()
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_snap")
 





More information about the Bf-blender-cvs mailing list