1
$\begingroup$

I have a custom pie menu I made, it was working fine yesterday. Now for some reason it refuses to work as expected.

It works if I click the "Run" button in the script editor, it works if I manually type bpy.ops.wm.call_menu_pie(name="VIEW3D_MT_PIE_vse_cuts") in the console. But when I try to set a hotkey, it refuses to work.

I've tried setting the hotkey programmatically before, I got rid of that code just trying to debug the issue, and right now the script is literally just the default Pie Menu template that ships with Blender with the layout code from my own script, just to make sure I'm not losing my mind.

import bpy
from bpy.types import Menu

bl_info = {
    "name": "VSE Cuts Pie",
    "author": "Me",
    "version": (0, 0, 0, 1),
    "description": "Adds Pie Menu for cut options in VSE",
    "blender": (3, 0, 0),
    "category": "Video Sequencer",
}

# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)


class VIEW3D_MT_PIE_vse_cuts(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "VSE Cuts Pie"

    def draw(self, context):
        layout = self.layout

        pie = layout.menu_pie()
        # operator_enum will just spread all available options
        # for the type enum of the operator on the pie
        props = pie.operator("vseqf.cut", text="Trim Left", icon="BACK")
        props.type = "TRIM_LEFT"
        props = pie.operator("vseqf.cut", text="Trim Right", icon="FORWARD")
        props.type = "TRIM_RIGHT"
        props = pie.operator("vseqf.cut", text="Hold Cut")
        props.type = "HARD"
        props = pie.operator("vseqf.cut", text="Split")
        props.type = "SOFT"
        props = pie.operator("vseqf.cut", text="Ripple Trim Left", icon="BACK")
        props.type = "RIPPLE_LEFT"
        props = pie.operator("vseqf.cut", text="Ripple Trim Right", icon="FORWARD")
        props.type = "RIPPLE_RIGHT"
        props = pie.operator("vseqf.cut", text="UnCut Left", icon="LOOP_BACK")
        props.type = "UNCUT_LEFT"
        props = pie.operator("vseqf.cut", text="UnCut Right", icon="LOOP_FORWARDS")
        props.type = "UNCUT_RIGHT"


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


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


if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="VIEW3D_MT_PIE_template")

This is what the hotkey i setup looks like. enter image description here

Any help is greatly appreciated, not sure what is going on.

$\endgroup$

1 Answer 1

1
$\begingroup$

Turns out there was another keymap for an addon I had that was probably interfering with that hotkey. I set it to "Alt+Q" and it works now.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .