File path relative to add-on?

I see that bpy.path.relpath is relative to the currently open blend file.

Is it possible to instead make a path relative to wherever my add-on was put on any user’s computer?

Otherwise what’s the usual way to point to a blend file which is included in an addon?

1 Like

I’m not sure if there is a better way, but os.path.dirname(os.path.abspath(__file__)) gets you the directory that the current Python file is in.

1 Like

Thanks! Works great for me ȏ.̮ȏ