My operator doesn't work

Hi there. I am new to Blender Python. I created a simple addon using VSCode. My button is working from the panel but when I search operator it doesn’t do anything. (Subdivide in this case) What is the problem? What’s wrong my script? I need help. Thank you.

init.py
01

my_op.py (operator)

my_panel.py (Panel)

In order for an operator to show up in the default search, it needs to be placed in a menu somewhere.

If you don’t want this, you can access it anyway by turning on developer extras in Preferences > Interface > Developer extras, and then in going to Edit > Operator search.

I’ve rebound that to my default search key (f3 or spacebar), so that I don’t have to constantly add my operators to menus to be able to access them

1 Like