I am working on creating an addon and I have a main __init__.py
file and then I have a another file we will call utils.py
. __init__
registers all the classes in utils
by import utils
and then bpy.utils.register_class(utils.CLASS)
, it has several classes and that file registers them all.
If you run the file once it works fine, but if you run it again it gives the error that the class is already registered as a subclass.
utils
contains a bpy.types.Panel
and bpy.types.Operator
class. It is almost like the bpy.utils.unregister_class(utils.CLASS)
isn't working.