def modal(self, context, event):
        obj = None
        obj_name = context.active_object.name if context.active_object != None else None
        obj = context.scene.objects[obj_name] if obj_name != None else None
        self.sprite_object = bpy.data.objects[self.sprite_object_name]
        self.armature = bpy.data.objects[self.armature_name]

        try:
            # used for debugging
            # if event.ctrl and event.type == "Z" and len(context.selected_objects) == 2:
            #     pdb.set_trace()

            if obj != None:
                if obj_name != self.last_obj_name:
                    if obj.type == "MESH":
                        self.set_most_driven_shapekey(obj)