Skip to content
Snippets Groups Projects
Commit db23ff3d authored by Alexander Gavrilov's avatar Alexander Gavrilov
Browse files

Rigify: use user-friendly feature set names in the filter dropdown.

parent 8618d72c
No related branches found
No related tags found
No related merge requests found
......@@ -122,10 +122,14 @@ def get_ui_name(feature_set):
def feature_set_items(scene, context):
"""Get items for the Feature Set EnumProperty"""
items = [('all',)*3, ('rigify',)*3, ]
items = [
('all', 'All', 'All installed feature sets and rigs bundled with Rigify'),
('rigify', 'Rigify Built-in', 'Rigs bundled with Rigify'),
]
for fs in get_installed_list():
items.append((fs,)*3)
ui_name = get_ui_name(fs)
items.append((fs, ui_name, ui_name))
return items
......
......@@ -54,7 +54,7 @@ def build_type_list(context, rigify_types):
for r in sorted(rig_lists.rigs):
if (context.object.data.active_feature_set in ('all', rig_lists.rigs[r]['feature_set'])
or len(feature_set_list.feature_set_items(context.scene, context)) == 2
or len(feature_set_list.get_installed_list()) == 0
):
a = rigify_types.add()
a.name = r
......@@ -180,7 +180,7 @@ class DATA_PT_rigify_buttons(bpy.types.Panel):
id_store.rigify_active_type = 0
# Rig type list
if len(feature_set_list.feature_set_items(context.scene, context)) > 2:
if len(feature_set_list.get_installed_list()) > 0:
row = layout.row()
row.prop(context.object.data, "active_feature_set")
row = layout.row()
......@@ -598,7 +598,7 @@ class BONE_PT_rigify_buttons(bpy.types.Panel):
build_type_list(context, id_store.rigify_types)
# Rig type field
if len(feature_set_list.feature_set_items(context.scene, context)) > 2:
if len(feature_set_list.get_installed_list()) > 0:
row = layout.row()
row.prop(context.object.data, "active_feature_set")
row = layout.row()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment