2
$\begingroup$

I am working on a plugin. Unfortunately my unregister() function attempted to remove the menu function from a wrong menu. Now the result is when I load and enable the plugin and open up the menu I see my entry multiple times. Here is my register and unregister functions:

def register():
    register_class(TunnelGen)
    bpy.types.VIEW3D_MT_edit_curve_specials.append(menu_func)


def unregister():
    for i in range(10): # the menu is registered accidentally multiple times
        bpy.types.VIEW3D_MT_edit_curve_specials.remove(menu_func)
    unregister_class(TunnelGen)

How can I fix the menu?

$\endgroup$
  • $\begingroup$ Have you hit F8 yet and restarted the addon / or blender ? $\endgroup$ – zeffii Jul 15 '15 at 11:00
  • $\begingroup$ related: blender.stackexchange.com/questions/30385/… $\endgroup$ – zeffii Jul 15 '15 at 11:00
  • $\begingroup$ I didn't try to restart blender yet. I will. $\endgroup$ – Endre Jul 15 '15 at 14:40

Browse other questions tagged or ask your own question.