3030from .utils import overwrite_prop_animation
3131from .rigs .utils import get_limb_generated_names
3232from . import rig_lists
33- from . import template_list
3433from . import generate
3534from . import rot_mode
3635from . import feature_sets
@@ -47,16 +46,6 @@ def build_type_list(context, rigify_types):
4746 a .name = r
4847
4948
50- class DATA_UL_rigify_template_list (bpy .types .UIList ):
51- """UIList subclass, to disable renaming in UI"""
52- def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
53- ob = data
54- template = item
55- if template :
56- layout .label (text = template .name , translate = False , icon_value = icon )
57- else :
58- layout .label (text = "" , translate = False , icon_value = icon )
59-
6049class DATA_PT_rigify_buttons (bpy .types .Panel ):
6150 bl_label = "Rigify Buttons"
6251 bl_space_type = 'PROPERTIES'
@@ -119,16 +108,9 @@ def draw(self, context):
119108
120109 col = layout .column (align = True )
121110 col .active = (not 'rig_id' in C .object .data )
122- if len (template_list .templates ) > 1 :
123- if len (context .object .data .rigify_templates ) == 0 :
124- col .operator ("pose.rigify_template_init" )
125- else :
126- col .label ("UI template for rig:" )
127- col .template_list ("DATA_UL_rigify_template_list" , "rigify_templates" , armature_id_store , "rigify_templates" , armature_id_store , "rigify_active_template" )
128111
129112 col .separator ()
130113 row = col .row ()
131- row .active = len (context .object .data .rigify_templates ) != 0 or len (template_list .templates ) == 1
132114 row .operator ("pose.rigify_generate" , text = "Generate Rig" , icon = 'POSE_HLT' )
133115
134116 row .enabled = enable_generate_and_advanced
@@ -200,7 +182,6 @@ def draw(self, context):
200182 row = layout .row ()
201183 row .prop (context .object .data , "active_feature_set" )
202184 row = layout .row ()
203- row .template_list ("UI_UL_list" , "rigify_types" , id_store , "rigify_types" , id_store , 'rigify_active_type' )
204185
205186 props = layout .operator ("armature.metarig_sample_add" , text = "Add sample" )
206187 props .metarig_type = id_store .rigify_types [id_store .rigify_active_type ].name
@@ -748,18 +729,6 @@ def execute(self, context):
748729 return {'FINISHED' }
749730
750731
751- class TemplateInit (bpy .types .Operator ):
752- """Initialize armature rigify ui templates"""
753-
754- bl_idname = "pose.rigify_template_init"
755- bl_label = "Add Rigify UI Templates"
756- bl_options = {'UNDO' }
757-
758- def execute (self , context ):
759- template_list .fill_ui_template_list (context .object )
760- return {'FINISHED' }
761-
762-
763732class Generate (bpy .types .Operator ):
764733 """Generates a rig from the active metarig armature"""
765734
@@ -1337,7 +1306,6 @@ def execute(self, context):
13371306
13381307def register ():
13391308
1340- bpy .utils .register_class (DATA_UL_rigify_template_list )
13411309 bpy .utils .register_class (DATA_OT_rigify_add_bone_groups )
13421310 bpy .utils .register_class (DATA_OT_rigify_use_standard_colors )
13431311 bpy .utils .register_class (DATA_OT_rigify_apply_selection_colors )
@@ -1354,7 +1322,6 @@ def register():
13541322 bpy .utils .register_class (VIEW3D_PT_rigify_animation_tools )
13551323 bpy .utils .register_class (VIEW3D_PT_tools_rigify_dev )
13561324 bpy .utils .register_class (LayerInit )
1357- bpy .utils .register_class (TemplateInit )
13581325 bpy .utils .register_class (Generate )
13591326 bpy .utils .register_class (UpgradeMetarigTypes )
13601327 bpy .utils .register_class (SwitchToLegacy )
@@ -1375,7 +1342,6 @@ def register():
13751342
13761343def unregister ():
13771344
1378- bpy .utils .unregister_class (DATA_UL_rigify_template_list )
13791345 bpy .utils .unregister_class (DATA_OT_rigify_add_bone_groups )
13801346 bpy .utils .unregister_class (DATA_OT_rigify_use_standard_colors )
13811347 bpy .utils .unregister_class (DATA_OT_rigify_apply_selection_colors )
@@ -1392,7 +1358,6 @@ def unregister():
13921358 bpy .utils .unregister_class (VIEW3D_PT_rigify_animation_tools )
13931359 bpy .utils .unregister_class (VIEW3D_PT_tools_rigify_dev )
13941360 bpy .utils .unregister_class (LayerInit )
1395- bpy .utils .unregister_class (TemplateInit )
13961361 bpy .utils .unregister_class (Generate )
13971362 bpy .utils .unregister_class (UpgradeMetarigTypes )
13981363 bpy .utils .unregister_class (SwitchToLegacy )
0 commit comments