diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2ac6358bd9c..5dedb3c4029 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2383,6 +2383,25 @@ class VIEW3D_MT_object_clear(Menu): layout.operator("object.origin_clear", text="Origin") +class VIEW3D_MT_motion_path(Menu): + bl_label = "Motion Paths" + + def draw(self, _context): + layout = self.layout + ob = _context.object + if ob.mode == 'OBJECT': + layout.operator("object.paths_calculate") + layout.operator("object.paths_update") + layout.operator("object.paths_update_visible") + layout.operator("object.paths_clear", text="Clear all").only_selected = False + layout.operator("object.paths_clear", text="Clear selected").only_selected = True + elif ob.mode == 'POSE': + layout.operator("pose.paths_calculate") + layout.operator("pose.paths_update") + layout.operator("pose.paths_clear", text="Clear all").only_selected = False + layout.operator("pose.paths_clear", text="Clear selected").only_selected = True + + class VIEW3D_MT_object_context_menu(Menu): bl_label = "Object Context Menu" @@ -2584,6 +2603,7 @@ class VIEW3D_MT_object_context_menu(Menu): layout.menu("VIEW3D_MT_mirror") layout.menu("VIEW3D_MT_snap") layout.menu("VIEW3D_MT_object_parent") + layout.menu("VIEW3D_MT_motion_path") layout.operator_context = 'INVOKE_REGION_WIN' if view and view.local_view: @@ -3631,10 +3651,10 @@ class VIEW3D_MT_pose_context_menu(Menu): layout.separator() - layout.operator("pose.paths_calculate", text="Calculate Motion Paths") - layout.operator("pose.paths_clear", text="Clear Motion Paths") - layout.operator("pose.paths_update", text="Update Armature Motion Paths") - layout.operator("object.paths_update_visible", text="Update All Motion Paths") + layout.operator("pose.paths_calculate") + layout.operator("pose.paths_update") + layout.operator("pose.paths_clear", text="Clear all").only_selected = False + layout.operator("pose.paths_clear", text="Clear selected").only_selected = True layout.separator() @@ -7623,6 +7643,7 @@ classes = ( VIEW3D_MT_object_quick_effects, VIEW3D_MT_object_showhide, VIEW3D_MT_object_cleanup, + VIEW3D_MT_motion_path, VIEW3D_MT_make_single_user, VIEW3D_MT_make_links, VIEW3D_MT_brush_paint_modes, |