def exit_edit_mode(self,context,event,obj):
        ### remove draw handler on exiting modal mode
        bpy.types.SpaceView3D.draw_handler_remove(self.draw_handler, "WINDOW")

        for obj in context.selected_objects:
            obj.select = False
        self.sprite_object.coa_edit_shapekey = False
        self.sprite_object.coa_edit_mode = "OBJECT"

        for obj_name in self.objs:
            obj = bpy.context.scene.objects[obj_name]
            obj.hide = False
            if obj.type == "MESH" and obj != None:
                context.scene.objects.active = obj
                bpy.ops.object.mode_set(mode="OBJECT")
                obj.show_only_shape_key = False

        context.scene.objects.active = obj
        obj.select = True
        if self.armature != None and self.armature.data != None:
            self.armature.data.pose_position = "POSE"
        return {"FINISHED"}