work: restore shift+spacebar for media play/pause
maybe put in maya config? idk what funiman's preference is
This commit is contained in:
@@ -2007,7 +2007,7 @@ def remove_draw_handlers(self):
|
||||
# Operator with modal and draw handler
|
||||
class MotionPathOperator(bpy.types.Operator):
|
||||
|
||||
"""Creates an editable motion path, Ctrl click to refresh"""
|
||||
"""Creates a custom motion path"""
|
||||
bl_idname = "object.motion_path_operator"
|
||||
bl_label = "Motion Path Operator"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
@@ -2028,15 +2028,10 @@ class MotionPathOperator(bpy.types.Operator):
|
||||
scene = context.scene
|
||||
emp = scene.emp
|
||||
|
||||
emp.refresh = False
|
||||
if emp.motion_path:
|
||||
if event.ctrl:
|
||||
# Refresh the motion path
|
||||
emp.refresh = True
|
||||
else:
|
||||
emp.motion_path = False
|
||||
emp.motion_path = False
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
||||
if context.selected_pose_bones is None and context.selected_objects is None:
|
||||
emp.motion_path = False
|
||||
return {'CANCELLED'}
|
||||
@@ -2242,6 +2237,9 @@ class MotionPathOperator(bpy.types.Operator):
|
||||
#return negative frame range to what it was
|
||||
if context.preferences.edit.use_negative_frames != nfr:
|
||||
context.preferences.edit.use_negative_frames = nfr
|
||||
|
||||
#assign the draw handler
|
||||
context.window_manager.modal_handler_add(self)
|
||||
|
||||
#If overlays are turned off then skip drawing
|
||||
if self.mp_vis:
|
||||
@@ -2257,9 +2255,6 @@ class MotionPathOperator(bpy.types.Operator):
|
||||
self.area.tag_redraw()
|
||||
# Tools.redraw_areas(['VIEW_3D'])
|
||||
|
||||
#assign the draw handler
|
||||
context.window_manager.modal_handler_add(self)
|
||||
|
||||
bpy.ops.ed.undo_push(message = 'Initialize Motion Path')
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
@@ -2284,11 +2279,6 @@ class MotionPathOperator(bpy.types.Operator):
|
||||
if not emp.motion_path:
|
||||
quit_mp(self, context)
|
||||
return {'FINISHED'}
|
||||
|
||||
if emp.refresh:
|
||||
get_mp_points(self, context)
|
||||
emp.refresh = False
|
||||
return {'PASS_THROUGH'}
|
||||
|
||||
if not self.mp_vis:
|
||||
check_mp_vis_on(self, context)
|
||||
@@ -4874,8 +4864,6 @@ def disbale_non_smooth(self, context):
|
||||
class EditableMotionPathSettings(bpy.types.PropertyGroup):
|
||||
'''All the settings for Editable motion path'''
|
||||
motion_path: bpy.props.BoolProperty(name = "Motion Path", description = "Flag when Motion Path is on", default = False, override = {'LIBRARY_OVERRIDABLE'})
|
||||
refresh: bpy.props.BoolProperty(name = "Refresh Motion Path", description = "Refresh the motion paths with hotkey ctrl", default = False, override = {'LIBRARY_OVERRIDABLE'})
|
||||
|
||||
settings: bpy.props.BoolProperty(name = "Motion Path Settings", description = "Open the settings Menu", default = False, override = {'LIBRARY_OVERRIDABLE'})
|
||||
# mp_keyframe_scale: bpy.props.FloatProperty(name = "Scale Selecgted Keyframes Bounding Box", description = "Change the scale of the bounding box around the selected keyframes ", default = 0.1, step = 0.1, precision = 3)
|
||||
color_before: bpy.props.FloatVectorProperty(name="Motion Path Before Color", subtype='COLOR', default=(1.0, 0.0, 0.0), min=0.0, max=1.0, description="Motion path color before the current frame", update=update_prop_callback)
|
||||
|
||||
Reference in New Issue
Block a user