diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-18 20:17:32 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-18 20:17:32 +0400 |
commit | 7c197b68496308200c5c2ed91735ed8682647aa6 (patch) | |
tree | 9fce6326c400eadc9de7b0b86e2b8e7ca532337d /release | |
parent | de9c443ff073494b484c02fa54eb00cfe7009518 (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_view3d.py | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 67363d3a7c0..02f29c7632c 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -647,7 +647,6 @@ class VIEW3D_MT_select_face(bpy.types.Menu): # XXX no matching enum # ********** Object menu ********** - class VIEW3D_MT_object(bpy.types.Menu): bl_context = "objectmode" bl_label = "Object" @@ -655,6 +654,11 @@ class VIEW3D_MT_object(bpy.types.Menu): 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 @@ class VIEW3D_MT_object(bpy.types.Menu): 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 @@ class VIEW3D_MT_object(bpy.types.Menu): 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 @@ class VIEW3D_MT_object(bpy.types.Menu): 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 @@ class VIEW3D_MT_make_links(bpy.types.Menu): 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 @@ class VIEW3D_MT_paint_vertex(bpy.types.Menu): 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 @@ class VIEW3D_MT_paint_weight(bpy.types.Menu): 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 @@ class VIEW3D_MT_sculpt(bpy.types.Menu): 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 @@ class VIEW3D_MT_particle(bpy.types.Menu): 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 @@ class VIEW3D_MT_pose(bpy.types.Menu): 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") |