diff options
Diffstat (limited to 'object_fracture/__init__.py')
-rw-r--r-- | object_fracture/__init__.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/object_fracture/__init__.py b/object_fracture/__init__.py index 72ca3d2e..77269c7f 100644 --- a/object_fracture/__init__.py +++ b/object_fracture/__init__.py @@ -32,18 +32,16 @@ bl_addon_info = { "category": "Object"} -import bpy +if "bpy" in locals(): + import imp + imp.reload(fracture_ops) + imp.reload(fracture_setup) +else: + from . import fracture_ops + from . import fracture_setup -try: - init_data - - reload(fracture_ops) - reload(fracture_setup) -except: - from object_fracture import fracture_ops - from object_fracture import fracture_setup +import bpy -init_data = True class INFO_MT_add_fracture_objects(bpy.types.Menu): bl_idname = "INFO_MT_add_fracture_objects" |