Clean up old button handler

This commit is contained in:
2024-12-28 03:53:50 -06:00
parent 7c9bd136d8
commit 4930b15046

View File

@ -38,39 +38,6 @@ class DSPL_OT_ConvertPoseLibrary(bpy.types.Operator):
return {'FINISHED'}
# Operator to manage the big menu buttons
class DSPL_OT_MenuButtonHandler(bpy.types.Operator):
bl_idname = "dspl.menu_button_handler"
bl_label = "Button Handler"
bl_description = "Button Handler"
bl_options = {'REGISTER', 'UNDO'}
posename: bpy.props.StringProperty()
def execute(self, context):
bpy.ops.wm.call_menu(name=self.menuID)
return {'FINISHED'}
def invoke(self, context, event):
if event.ctrl:
# Select
action_object = getPoseLib(context)
action_object.pose_markers.active_index = searchPoseMarker(context, posename=self.posename, type="index")
return {'FINISHED'}
elif event.alt:
# Remove
bpy.ops.dspl.remove_pose(posename = self.posename)
return {'FINISHED'}
elif event.shift:
# Rename
bpy.ops.dspl.rename_pose(posename = self.posename)
return {'FINISHED'}
else:
return self.execute(context)
# Operator to add keyframes and marker to pose library
@ -487,8 +454,6 @@ class DSPL_OT_ProtectOrphanPoseLibrary(bpy.types.Operator):
classes = (
DSPL_OT_CreatePoseLibrary,
DSPL_OT_ConvertPoseLibrary,
DSPL_OT_CallPopupMenu,
DSPL_OT_MenuButtonHandler,
DSPL_OT_AddPose,
DSPL_OT_RemovePose,
DSPL_OT_RenamePose,