def execute(self, context): arm = context.active_object if not arm or arm.type != 'ARMATURE': self.report({'ERROR'}, 'Active object is not an armature object') return {'CANCELLED'} if self.type == 'APPLY': FnBone.apply_bone_local_axes(arm) FnBone.apply_additional_transformation(arm) else: FnBone.load_bone_local_axes(arm, enable=(self.type == 'LOAD')) return {'FINISHED'}