[Bf-extensions-cvs] [db23ff3d] master: Rigify: use user-friendly feature set names in the filter dropdown.

Alexander Gavrilov noreply at git.blender.org
Sat Jun 27 20:41:28 CEST 2020


Commit: db23ff3d34415a3aae1c8bd775de2db8af22d5c7
Author: Alexander Gavrilov
Date:   Sat Jun 27 21:39:39 2020 +0300
Branches: master
https://developer.blender.org/rBAdb23ff3d34415a3aae1c8bd775de2db8af22d5c7

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

===================================================================

M	rigify/feature_set_list.py
M	rigify/ui.py

===================================================================

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()



More information about the Bf-extensions-cvs mailing list