diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-14 10:30:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-14 10:30:27 +0400 |
commit | 93cf1531d05a341a3be715f41bb48bd6f665afb2 (patch) | |
tree | 2035edc619220a498803bce9fc16d0e987e29ef8 /release/scripts/startup/bl_ui/space_view3d.py | |
parent | 75f8d5fc661aac51d4c3e8a3f9a19b7b66c25cfc (diff) |
fix own bug [#29875] Due to operators now reusing there last-used settings, some UI options are more or less broken (esp. in shortcuts and menu entries)
also prefer *.select_all rather then *.select_inverse operators, since this is an option for select_all.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index f49a6bd5155..2bf5bba9cd8 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -263,7 +263,7 @@ class VIEW3D_MT_uv_map(Menu): layout.separator() layout.operator_context = 'EXEC_REGION_WIN' - layout.operator("uv.project_from_view") + layout.operator("uv.project_from_view").scale_to_bounds = False layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True layout.separator() @@ -421,8 +421,8 @@ class VIEW3D_MT_select_object(Menu): layout.separator() - layout.operator("object.select_all", text="Select/Deselect All") - layout.operator("object.select_inverse", text="Inverse") + layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE' + layout.operator("object.select_all", text="Inverse").action = 'INVERT' layout.operator("object.select_random", text="Random") layout.operator("object.select_mirror", text="Mirror") layout.operator("object.select_by_layer", text="Select All by Layer") @@ -446,8 +446,8 @@ class VIEW3D_MT_select_pose(Menu): layout.separator() - layout.operator("pose.select_all", text="Select/Deselect All") - layout.operator("pose.select_inverse", text="Inverse") + layout.operator("pose.select_all", text="Select/Deselect All").action = 'TOGGLE' + layout.operator("pose.select_all", text="Inverse").action = 'INVERT' layout.operator("pose.select_flip_active", text="Flip Active") layout.operator("pose.select_constraint_target", text="Constraint Target") layout.operator("pose.select_linked", text="Linked") @@ -483,7 +483,7 @@ class VIEW3D_MT_select_particle(Menu): layout.separator() - layout.operator("particle.select_all", text="Select/Deselect All") + layout.operator("particle.select_all", text="Select/Deselect All").action = 'TOGGLE' layout.operator("particle.select_linked") layout.operator("particle.select_inverse") @@ -509,8 +509,8 @@ class VIEW3D_MT_select_edit_mesh(Menu): layout.separator() - layout.operator("mesh.select_all", text="Select/Deselect All") - layout.operator("mesh.select_inverse", text="Inverse") + layout.operator("mesh.select_all", text="Select/Deselect All").action = 'TOGGLE' + layout.operator("mesh.select_all", text="Inverse").action = 'INVERT' layout.separator() @@ -541,7 +541,7 @@ class VIEW3D_MT_select_edit_mesh(Menu): layout.operator("mesh.select_linked", text="Linked") layout.operator("mesh.select_vertex_path", text="Vertex Path") - layout.operator("mesh.loop_multi_select", text="Edge Loop") + layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True layout.separator() @@ -561,8 +561,8 @@ class VIEW3D_MT_select_edit_curve(Menu): layout.separator() - layout.operator("curve.select_all", text="Select/Deselect All") - layout.operator("curve.select_inverse") + layout.operator("curve.select_all", text="Select/Deselect All").action = 'TOGGLE' + layout.operator("curve.select_all", text="Inverse").action = 'INVERT' layout.operator("curve.select_random") layout.operator("curve.select_nth", text="Every Nth Number of Points") @@ -590,8 +590,8 @@ class VIEW3D_MT_select_edit_surface(Menu): layout.separator() - layout.operator("curve.select_all", text="Select/Deselect All") - layout.operator("curve.select_inverse") + layout.operator("curve.select_all", text="Select/Deselect All").action = 'TOGGLE' + layout.operator("curve.select_all", text="Inverse").action = 'INVERT' layout.operator("curve.select_random") layout.operator("curve.select_nth", text="Every Nth Number of Points") @@ -616,7 +616,7 @@ class VIEW3D_MT_select_edit_metaball(Menu): layout.separator() layout.operator("mball.select_all").action = 'TOGGLE' - layout.operator("mball.select_inverse_metaelems") + layout.operator("mball.select_all").action = 'INVERT' layout.separator() @@ -761,7 +761,7 @@ class VIEW3D_MT_object_clear(Menu): layout.operator("object.location_clear", text="Location") layout.operator("object.rotation_clear", text="Rotation") layout.operator("object.scale_clear", text="Scale") - layout.operator("object.origin_clear", text="Origin") + layout ("object.origin_clear", text="Origin") class VIEW3D_MT_object_specials(Menu): @@ -865,12 +865,16 @@ class VIEW3D_MT_object_apply(Menu): def draw(self, context): layout = self.layout - layout.operator("object.transform_apply", text="Location").location = True - layout.operator("object.transform_apply", text="Rotation").rotation = True - layout.operator("object.transform_apply", text="Scale").scale = True + props = layout.operator("object.transform_apply", text="Location") + props.location, props.rotation, props.scale = True, False, False + + props = layout.operator("object.transform_apply", text="Rotation") + props.location, props.rotation, props.scale = False, True, False + + props = layout.operator("object.transform_apply", text="Scale") + props.location, props.rotation, props.scale = False, False, True props = layout.operator("object.transform_apply", text="Rotation & Scale") - props.scale = True - props.rotation = True + props.location, props.rotation, props.scale = False, True, True layout.separator() @@ -943,7 +947,7 @@ class VIEW3D_MT_object_showhide(Menu): layout = self.layout layout.operator("object.hide_view_clear", text="Show Hidden") - layout.operator("object.hide_view_set", text="Hide Selected") + layout.operator("object.hide_view_set", text="Hide Selected").unselected = False layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True @@ -1056,13 +1060,13 @@ class VIEW3D_MT_vertex_group(Menu): if ob.vertex_groups.active: layout.separator() layout.operator("object.vertex_group_assign", text="Assign to Active Group") - layout.operator("object.vertex_group_remove_from", text="Remove from Active Group") + layout.operator("object.vertex_group_remove_from", text="Remove from Active Group").all = False layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True layout.separator() if ob.vertex_groups.active: layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group") - layout.operator("object.vertex_group_remove", text="Remove Active Group") + layout.operator("object.vertex_group_remove", text="Remove Active Group").all = False layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True # ********** Weight paint menu ********** @@ -1311,7 +1315,7 @@ class VIEW3D_MT_pose_propagate(Menu): def draw(self, context): layout = self.layout - layout.operator("pose.propagate") + layout.operator("pose.propagate").mode = 'WHILE_HELD' layout.separator() @@ -1498,7 +1502,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu): layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("mesh.subdivide", text="Subdivide") + layout.operator("mesh.subdivide", text="Subdivide").smoothness = 0.0 layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0 layout.operator("mesh.merge", text="Merge...") layout.operator("mesh.remove_doubles") @@ -1614,12 +1618,12 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.separator() - layout.operator("mesh.mark_seam") + layout.operator("mesh.mark_seam").clear = False layout.operator("mesh.mark_seam", text="Clear Seam").clear = True layout.separator() - layout.operator("mesh.mark_sharp") + layout.operator("mesh.mark_sharp").clear = False layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True layout.separator() @@ -1631,7 +1635,7 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.operator("TRANSFORM_OT_edge_slide") layout.operator("TRANSFORM_OT_edge_crease") - layout.operator("mesh.loop_multi_select", text="Edge Loop") + layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False # uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1); # uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0); @@ -1696,7 +1700,7 @@ class VIEW3D_MT_edit_mesh_normals(Menu): def draw(self, context): layout = self.layout - layout.operator("mesh.normals_make_consistent", text="Recalculate Outside") + layout.operator("mesh.normals_make_consistent", text="Recalculate Outside").inside = False layout.operator("mesh.normals_make_consistent", text="Recalculate Inside").inside = True layout.separator() |