Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-06-27 21:39:39 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-06-27 21:39:47 +0300
commitdb23ff3d34415a3aae1c8bd775de2db8af22d5c7 (patch)
treee5eecd7165efd90355fe74de194291b2b3372d74
parent8618d72ca50a6742154187d9648c9f1dd86ddc4d (diff)
Rigify: use user-friendly feature set names in the filter dropdown.
-rw-r--r--rigify/feature_set_list.py8
-rw-r--r--rigify/ui.py6
2 files changed, 9 insertions, 5 deletions
diff --git a/rigify/feature_set_list.py b/rigify/feature_set_list.py
index 5a2d928b..43639fc1 100644
--- a/rigify/feature_set_list.py
+++ b/rigify/feature_set_list.py
@@ -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
diff --git a/rigify/ui.py b/rigify/ui.py
index ad1c4156..0ed1f1a2 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -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()