From 4f3f95751ad264eb6be10d3470425e93afc557f6 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 1 Jul 2013 13:02:53 +0000 Subject: Bugfix [#35936] Can't create new vertex group when using Ctrl G menu This was caused by r.57812 There were two problems here: 1) vertex_group_vert_select_unlocked_poll() had faulty logic which meant that it always failed when there were no vgroups present yet - the final return always just fell through 2) Since the "Assign to New Groups" option was actually implemented using the same operator as "Assign to Active Group" (just with an extra parameter set), if the active group was locked, it was not possible to "Assign to New Group" (even though a new group would not be locked). --- release/scripts/startup/bl_ui/properties_data_mesh.py | 2 +- release/scripts/startup/bl_ui/space_view3d.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 655fd4045ee..b6ad14196cd 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -215,7 +215,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): row = layout.row() sub = row.row(align=True) - sub.operator("object.vertex_group_assign", text="Assign").new = False + sub.operator("object.vertex_group_assign", text="Assign") sub.operator("object.vertex_group_remove_from", text="Remove") sub = row.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 51995ba5012..0eea75e4e64 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1312,13 +1312,13 @@ class VIEW3D_MT_vertex_group(Menu): layout = self.layout layout.operator_context = 'EXEC_AREA' - layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True + layout.operator("object.vertex_group_assign_new") ob = context.active_object if ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex): if ob.vertex_groups.active: layout.separator() - layout.operator("object.vertex_group_assign", text="Assign to Active Group").new = False + layout.operator("object.vertex_group_assign", text="Assign to Active Group") layout.operator("object.vertex_group_remove_from", text="Remove from Active Group").use_all_groups = False layout.operator("object.vertex_group_remove_from", text="Remove from All").use_all_groups = True layout.separator() -- cgit v1.2.3