Clean up old button handler #12
35
operators.py
35
operators.py
@ -38,39 +38,6 @@ class DSPL_OT_ConvertPoseLibrary(bpy.types.Operator):
|
|||||||
return {'FINISHED'}
|
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
|
# Operator to add keyframes and marker to pose library
|
||||||
|
|
||||||
|
|
||||||
@ -487,8 +454,6 @@ class DSPL_OT_ProtectOrphanPoseLibrary(bpy.types.Operator):
|
|||||||
classes = (
|
classes = (
|
||||||
DSPL_OT_CreatePoseLibrary,
|
DSPL_OT_CreatePoseLibrary,
|
||||||
DSPL_OT_ConvertPoseLibrary,
|
DSPL_OT_ConvertPoseLibrary,
|
||||||
DSPL_OT_CallPopupMenu,
|
|
||||||
DSPL_OT_MenuButtonHandler,
|
|
||||||
DSPL_OT_AddPose,
|
DSPL_OT_AddPose,
|
||||||
DSPL_OT_RemovePose,
|
DSPL_OT_RemovePose,
|
||||||
DSPL_OT_RenamePose,
|
DSPL_OT_RenamePose,
|
||||||
|
Reference in New Issue
Block a user