License Headers: use SPDX-FileCopyrightText for mesh_tissue
[blender-addons.git] / space_view3d_spacebar_menu / animation_menus.py
blobd1b575a7f131d552a035399f391108e8b7a5d8f3
1 # SPDX-FileCopyrightText: 2019-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 import bpy
6 from bpy.types import (
7 Operator,
8 Menu,
10 from bpy.props import (
11 BoolProperty,
12 StringProperty,
15 from bl_ui.properties_paint_common import UnifiedPaintPanel
19 # Animation Player (Thanks to marvin.k.breuer) #
20 class VIEW3D_MT_Animation_Player(Menu):
21 bl_label = "Animation"
23 def draw(self, context):
24 layout = self.layout
26 layout.operator("screen.animation_play", text="PLAY", icon='PLAY')
27 layout.operator("screen.animation_play", text="Stop", icon='PAUSE')
28 layout.operator("screen.animation_play", text="Reverse", icon='PLAY_REVERSE').reverse = True
29 layout.separator()
32 layout.operator("screen.keyframe_jump", text="Next FR", icon='NEXT_KEYFRAME').next = True
33 layout.operator("screen.keyframe_jump", text="Previous FR", icon='PREV_KEYFRAME').next = False
34 layout.separator()
36 layout.operator("screen.frame_jump", text="Jump FF", icon='FF').end = True
37 layout.operator("screen.frame_jump", text="Jump REW", icon='REW').end = False
38 layout.separator()
40 layout.menu("VIEW3D_MT_object_animation", text="Keyframes", icon='DECORATE_ANIMATE')
44 # List The Classes #
46 classes = (
47 VIEW3D_MT_Animation_Player,
51 # Register Classes & Hotkeys #
52 def register():
53 for cls in classes:
54 bpy.utils.register_class(cls)
57 # Unregister Classes & Hotkeys #
58 def unregister():
60 for cls in reversed(classes):
61 bpy.utils.unregister_class(cls)
64 if __name__ == "__main__":
65 register()