io_mesh_uv_layout: lazy import exporter modules
[blender-addons.git] / object_fracture / __init__.py
blob5dad8801f5cf99b0b99d8ca95819d1a65c6ae690
1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
19 bl_info = {
20 "name": "Fracture Tools",
21 "author": "pildanovak",
22 "version": (2, 0, 1),
23 "blender": (2, 72, 0),
24 "location": "Search > Fracture Object & Add > Fracture Helper Objects",
25 "description": "Fractured Object, Bomb, Projectile, Recorder",
26 "warning": "",
27 "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/Fracture",
28 "category": "Object",
32 if "bpy" in locals():
33 import importlib
34 importlib.reload(fracture_ops)
35 importlib.reload(fracture_setup)
36 else:
37 from . import fracture_ops
38 from . import fracture_setup
40 import bpy
43 class VIEW3D_MT_add_fracture_objects(bpy.types.Menu):
44 bl_idname = "VIEW3D_MT_add_fracture_objects"
45 bl_label = "Fracture Helper Objects"
47 def draw(self, context):
48 layout = self.layout
49 layout.operator_context = 'INVOKE_REGION_WIN'
51 layout.operator("object.import_fracture_bomb",
52 text="Bomb")
53 layout.operator("object.import_fracture_projectile",
54 text="Projectile")
55 layout.operator("object.import_fracture_recorder",
56 text="Rigidbody Recorder")
59 def menu_func(self, context):
60 self.layout.menu("VIEW3D_MT_add_fracture_objects")
63 def register():
64 bpy.utils.register_module(__name__)
66 # Add the "add fracture objects" menu to the "Add" menu
67 bpy.types.VIEW3D_MT_add.append(menu_func)
70 def unregister():
71 bpy.utils.unregister_module(__name__)
73 # Remove "add fracture objects" menu from the "Add" menu.
74 bpy.types.VIEW3D_MT_add.remove(menu_func)
77 if __name__ == "__main__":
78 register()