I want to add a menu item to the Dope Sheet

Yes, I’ve brought this up before.

I want o add SOMETHING LIKE THIS…

zooming

So far, it appears that “zooming” in the Dope Sheet would be handled by setting “ThemeDopeSheet.keyframe_scale_factor”.

Any advice?

Thanks,
Cal

Did I stump the forum? No ideas?

Bueller?

YAY!! I got it to work !!

Rather than a menu, I made it interactive.

Here is how it looks:
.
zoomer

.
Here is the code:
(Feel free to use it.)
.

bl_info = {
“name”: “Rendermach DopeSheet Zoomer”,
“author”: “Cal Niemi CMW3 ;)”,
“version”: (0, 0, 1),
“blender”: (2, 80, 0),
“location”: “Dope Sheet > Sidebar”,
“description”: “Set KeyFrame Scale”,
“warning”: “”,
“wiki_url”: “”,
“tracker_url”: “”,
“category”: “Interface”,
}

import bpy

def register():
bpy.utils.register_class(DOPE_PT_zoom)

def unregister():
bpy.utils.unregister_class(DOPE_PT_zoom)

class DOPE_PT_zoom(bpy.types.Panel):
bl_label = “DopeSheeet Zoom”
bl_idname = “DOPE_PT_zoom”
bl_space_type = ‘DOPESHEET_EDITOR’
bl_region_type = ‘UI’

def draw(self, context):
    row = self.layout.row()
    #row.label(text="Zoom 1")
    row.prop(context.preferences.themes[0].dopesheet_editor, "keyframe_scale_factor")