align columns (for multi-drag)
[blender-addons.git] / add_curve_extra_objects / __init__.py
blob5dffb0d410446f694655f25b8948438c623828c1
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 #####
18 # Contributed to by
19 # testscreenings, Alejandro Omar Chocano Vasquez, Jimmy Hazevoet, meta-androcto #
21 bl_info = {
22 "name": "Extra Objects",
23 "author": "Multiple Authors",
24 "version": (0, 1),
25 "blender": (2, 72, 0),
26 "location": "View3D > Add > Curve",
27 "description": "Add extra curve object types",
28 "warning": "",
29 "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
30 "Scripts/Curve/Curve_Objects",
31 "category": "Add Curve"}
33 if "bpy" in locals():
34 import imp
35 imp.reload(add_curve_aceous_galore)
36 imp.reload(add_curve_spirals)
37 imp.reload(add_curve_torus_knots)
39 else:
40 from . import add_curve_aceous_galore
41 from . import add_curve_spirals
42 from . import add_curve_torus_knots
44 import bpy
46 class INFO_MT_curve_extras_add(bpy.types.Menu):
47 # Define the "Extras" menu
48 bl_idname = "curve_extra_objects_add"
49 bl_label = "Extra Objects"
51 def draw(self, context):
52 layout = self.layout
53 layout.operator_context = 'INVOKE_REGION_WIN'
54 layout.operator("mesh.curveaceous_galore",
55 text="Curves Galore!")
56 layout.operator("curve.spirals",
57 text="Spirals")
58 layout.operator("curve.torus_knot_plus",
59 text="Torus Knot Plus")
60 # Define "Extras" menu
61 def menu_func(self, context):
62 self.layout.operator("mesh.curveaceous_galore",
63 text="Curves Galore!")
64 self.layout.operator("curve.torus_knot_plus",
65 text="Torus Knot Plus")
66 self.layout.operator("curve.spirals",
67 text="Spirals")
69 def register():
70 bpy.utils.register_module(__name__)
72 # Add "Extras" menu to the "Add Curve" menu
73 bpy.types.INFO_MT_curve_add.append(menu_func)
75 def unregister():
76 bpy.utils.unregister_module(__name__)
78 # Remove "Extras" menu from the "Add Curve" menu.
79 bpy.types.INFO_MT_curve_add.remove(menu_func)
81 if __name__ == "__main__":
82 register()