A have armature. And i need button for select all only deform bones.
# This construction work!
arm = bpy.context.active_object.data
for bone in arm.bones:
bone.select = False
# But how make work this?
class Select_Deform_Disabled(bpy.types.Operator):
bl_idname = "sel_def_dis.button"
bl_label = "Select all deform bones disabled"
def execute(self, context):
all_bones = bpy.context.active_object.data
for def_bone in all_bones:
if def_bone.deform == True: # problem here! How get access to defom parameter?
def_bone.select = True
else:
def_bone.select = False
return{'FINISHED'}