@roaoao,
Hi, I just wanted to share a workaround a fellow forum member cooked up for me. I thought about posting this in a separate forum thread, but I am not sure how useful others will find it to be since it’s pretty “edge casey”.
I use VS Code with Blender Development extension, and I have been using it to reload my Blender add-on so that I can quickly test changes to my add-on. I’ve been creating compact versions of my panels so that they can be comfortably used with PME.
However, up until 2 days ago, everything was working fine. I could reload my blender add-on using VS Code, and the pie menu keymaps would work fine. Now, the keymaps just disappear whenever I reload my add-on from VS Code using Blender Development Extension. Not sure if there’s a problem with my Blender Config, my add-on, or my PME configuration/keymaps
In any case, forum member iceythe cooked up this script and it resolved my problem nicely.
bDebugModeActive = True
def _reg():
pme = bpy.utils._preferences.addons['pie_menu_editor'].preferences
for pm in pme.pie_menus:
if pm.key != 'NONE':
pm.register_hotkey()
Then, appended to the register()
function (supposedly critical that it is below all of my other register stuff)
if bDebugModeActive:
if not bpy.app.timers.is_registered(_reg):
bpy.app.timers.register(_reg, first_interval=1)
So, I guess the way it works is, it re-register’s PME’s keymaps whenever I perform a reload from VS Code using Blender Development extension.
Anywho, just thought I’d pass this along because I don’t know if others have run into this issue before, but it is particularly useful for add-on developers when trying to make sure their add-on panels look a certain way when they are inside of a PME created pie menu or popup. Perhaps there is something you can change or add to PME to ensure better interoperability with Blender Development extension?
As always, love your add-ons, and appreciate all of the hard work you put into them.