Unregister an operator in the menu, (bugg)?

“remove” doesn’t seem to work for me (tested in 2.82 / 2.83 /2.9)
More and more copies are created when I run the script. Did I forget something?

python template: addon_add_object.py

# Registration
def add_object_button(self, context):
    self.layout.operator(OBJECT_OT_add_object.bl_idname,text="Add Object",icon='PLUGIN')

def register():

def unregister():

Are you sure the unregister function is actually run? The template might only run register when you execute it in the text editor.


Good to know, thank you very much!
is there a smart solution to call unregsiter() or remove() from the console? Or does it have to be registered as an addon first.

I’m not aware of a smart solution for that, unfortunately.

1 Like