add menus for vertex group and shape key panels, functionality wasnt communicated well with icons and getting cluttered.

also made 'transfer shape' script copy into the active object to match 'join as shape', which was quite confusing before.
This commit is contained in:
2010-02-05 14:29:05 +00:00
parent 61755860ea
commit 2973ffbb49
4 changed files with 50 additions and 19 deletions

View File

@@ -23,6 +23,29 @@ from rna_prop_ui import PropertyPanel
narrowui = 180
class MESH_MT_vertex_group_specials(bpy.types.Menu):
bl_label = "Vertex Group Specials"
def draw(self, context):
layout = self.layout
layout.operator("object.vertex_group_sort", icon='SORTALPHA')
layout.operator("object.vertex_group_copy", icon='COPY_ID')
layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
class MESH_MT_shape_key_specials(bpy.types.Menu):
bl_label = "Shape Key Specials"
def draw(self, context):
layout = self.layout
layout.operator("object.shape_key_transfer", icon='COPY_ID') # icon is not ideal
layout.operator("object.join_shapes", icon='COPY_ID') # icon is not ideal
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -121,11 +144,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
col = row.column(align=True)
col.operator("object.vertex_group_add", icon='ZOOMIN', text="")
col.operator("object.vertex_group_remove", icon='ZOOMOUT', text="")
col.operator("object.vertex_group_sort", icon='SORTALPHA', text="")
col.operator("object.vertex_group_copy", icon='COPY_ID', text="")
if ob.data.users > 1:
col.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA', text="")
col.menu("MESH_MT_vertex_group_specials", icon='DOWNARROW_HLT', text="")
if group:
row = layout.row()
@@ -178,6 +197,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
sub = col.column(align=True)
sub.operator("object.shape_key_add", icon='ZOOMIN', text="")
sub.operator("object.shape_key_remove", icon='ZOOMOUT', text="")
sub.menu("MESH_MT_shape_key_specials", icon='DOWNARROW_HLT', text="")
if kb:
col.separator()
@@ -206,13 +226,10 @@ class DATA_PT_shape_keys(DataButtonsPanel):
subsub.prop(ob, "shape_key_lock", text="")
subsub.prop(kb, "mute", text="")
sub.prop(ob, "shape_key_edit_mode", text="")
sub = row.row(align=True)
sub.operator("object.shape_key_transfer", icon='COPY_ID', text="") # icon is not ideal
sub.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT', text="")
sub = row.row()
sub.operator("object.shape_key_clear", icon='X', text="")
row = layout.row()
row.prop(kb, "name")
@@ -286,6 +303,9 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
if lay:
layout.prop(lay, "name")
bpy.types.register(MESH_MT_vertex_group_specials)
bpy.types.register(MESH_MT_shape_key_specials)
bpy.types.register(DATA_PT_context_mesh)
bpy.types.register(DATA_PT_normals)
bpy.types.register(DATA_PT_settings)