Auto enable addon?

(AFWS) #1

Is it possible to auto enable addon? Is there some line of code I could place in the addon. I found several lines of code ,but can’t seem to get anything to work.

Solved my problem for what I was needing, still may be a better way to do it.


        module_name, default_set=False, persistent=False, handle_error=None)


import addon_utils


bpy.ops.wm.addon_enable(module = "addon")