1 # SPDX-FileCopyrightText: 2019-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
6 from bpy
.types
import (
10 from bpy
.props
import (
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
):
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
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
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
40 layout
.menu("VIEW3D_MT_object_animation", text
="Keyframes", icon
='DECORATE_ANIMATE')
47 VIEW3D_MT_Animation_Player
,
51 # Register Classes & Hotkeys #
54 bpy
.utils
.register_class(cls
)
57 # Unregister Classes & Hotkeys #
60 for cls
in reversed(classes
):
61 bpy
.utils
.unregister_class(cls
)
64 if __name__
== "__main__":