@@ -42,7 +42,7 @@ class DATA_PT_rigify_buttons(bpy.types.Panel):
42
42
43
43
@classmethod
44
44
def poll (cls , context ):
45
- return context .object .type == 'ARMATURE'
45
+ return context .object .type == 'ARMATURE' and context . active_object . data . get ( "rig_id" ) is None
46
46
47
47
def draw (self , context ):
48
48
C = context
@@ -132,7 +132,6 @@ def draw(self, context):
132
132
layout .label (text = "Some bones have old legacy rigify_type. Click to upgrade" , icon = 'ERROR' )
133
133
layout .operator ("pose.rigify_upgrade_types" , text = "Upgrade Metarig" )
134
134
135
-
136
135
elif obj .mode == 'EDIT' :
137
136
# Build types list
138
137
collection_name = str (id_store .rigify_collection ).replace (" " , "" )
@@ -169,7 +168,7 @@ class DATA_PT_rigify_layer_names(bpy.types.Panel):
169
168
170
169
@classmethod
171
170
def poll (cls , context ):
172
- return context .object .type == 'ARMATURE'
171
+ return context .object .type == 'ARMATURE' and context . active_object . data . get ( "rig_id" ) is None
173
172
174
173
def draw (self , context ):
175
174
layout = self .layout
@@ -504,7 +503,7 @@ class DATA_PT_rigify_bone_groups(bpy.types.Panel):
504
503
505
504
@classmethod
506
505
def poll (cls , context ):
507
- return context .object .type == 'ARMATURE'
506
+ return context .object .type == 'ARMATURE' and context . active_object . data . get ( "rig_id" ) is None
508
507
509
508
def draw (self , context ):
510
509
obj = context .object
@@ -550,7 +549,7 @@ def poll(cls, context):
550
549
return False
551
550
obj = context .object
552
551
if obj :
553
- return obj .mode == 'POSE'
552
+ return obj .mode == 'POSE' and context . active_object . data . get ( "rig_id" ) is None
554
553
return False
555
554
556
555
def draw (self , context ):
@@ -635,6 +634,10 @@ class VIEW3D_PT_rigify_animation_tools(bpy.types.Panel):
635
634
bl_space_type = 'VIEW_3D'
636
635
bl_region_type = 'TOOLS'
637
636
637
+ @classmethod
638
+ def poll (cls , context ):
639
+ return context .object .type == 'ARMATURE' and context .active_object .data .get ("rig_id" ) is not None
640
+
638
641
def draw (self , context ):
639
642
obj = context .active_object
640
643
id_store = context .window_manager
@@ -1278,6 +1281,7 @@ def register():
1278
1281
1279
1282
rot_mode .register ()
1280
1283
1284
+
1281
1285
def unregister ():
1282
1286
1283
1287
bpy .utils .unregister_class (DATA_OT_rigify_add_bone_groups )
0 commit comments