# multiple file package changes in blender 2.7?

In fact I want to pack many add-ons.

I was using some "standard" __init__.py check

but in reality this does not work, then I tried the example of wiki blender changing the deprecated import imp toof importlib import reload but this example does not work either!

I looked for some reference in manual but I do not get anything

also the CoDEManX code from link is not avalaible,... then ...

what is the current way of packaging multiple files?

• Do you mean in 2.8. Pretty sure I read that bpy.utils.unregister_module(__name__) is getting ditched. As for how to handle multifile addons, blender ships with a number of them, checkout their source. Here's something I was looking at a while back to package addons gist.github.com/batFINGER/4eee7c1a03746c65f2611c70a9f2e2ba – batFINGER Nov 12 '17 at 10:18
• @batFINGER thanks for sharing. But how use that with custom icons?... – yhoyo Nov 12 '17 at 15:47
• Please update the question to be either about "packed data" (i.e. images and other assets being packed inside the blend file) or about "multi-file packages" (i.e. Python packages that consist of a directory with multiple .py files in them). – dr. Sybren Dec 31 '17 at 9:51

I made the example of wiki blender with a little change. It seems to work well.
Version 2.79

# To support reload properly, try to access a package var,
# if it's there, reload everything
if "bpy" in locals():
import importlib
if 'simple_obj_import' in locals():

• Be sure to also assign the returned value, so simple_obj_import = importlib.reload(simple_obj_import); without that you could still have a reference to the old import. – dr. Sybren Dec 31 '17 at 9:50