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 # Pontiac, Fourmadmen, varkenvarken, tuga3d, meta-androcto, metalliandy, dreampainter & cotejrp1#
22 "name": "Extra Objects",
23 "author": "Multiple Authors",
25 "blender": (2, 63, 0),
26 "location": "View3D > Add > Mesh > Extra Objects",
27 "description": "Add extra object types",
29 "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
30 "Scripts/Add_Mesh/Add_Extra",
31 "category": "Add Mesh",
37 imp
.reload(add_mesh_extra_objects
)
38 imp
.reload(add_mesh_twisted_torus
)
39 imp
.reload(add_mesh_gemstones
)
40 imp
.reload(add_mesh_gears
)
41 imp
.reload(add_mesh_3d_function_surface
)
42 imp
.reload(add_mesh_polysphere
)
43 imp
.reload(add_mesh_supertoroid
)
44 imp
.reload(add_mesh_pyramid
)
45 imp
.reload(add_mesh_torusknot
)
46 imp
.reload(add_mesh_honeycomb
)
47 imp
.reload(add_mesh_teapot
)
49 from . import add_mesh_extra_objects
50 from . import add_mesh_twisted_torus
51 from . import add_mesh_gemstones
52 from . import add_mesh_gears
53 from . import add_mesh_3d_function_surface
54 from . import add_mesh_polysphere
55 from . import add_mesh_supertoroid
56 from . import add_mesh_pyramid
57 from . import add_mesh_torusknot
58 from . import add_mesh_honeycomb
59 from . import add_mesh_teapot
63 class INFO_MT_mesh_extras_add(bpy
.types
.Menu
):
64 # Define the "Extras" menu
65 bl_idname
= "INFO_MT_mesh_extra_objects_add"
66 bl_label
= "Extra Objects"
68 def draw(self
, context
):
70 layout
.operator_context
= 'INVOKE_REGION_WIN'
71 layout
.menu("INFO_MT_mesh_gemstones_add", text
="Gemstones")
72 layout
.menu("INFO_MT_mesh_gears_add", text
="Gears")
73 layout
.menu("INFO_MT_mesh_math_add", text
="Math Function")
74 layout
.menu("INFO_MT_mesh_basic_add", text
="Basic Objects")
75 layout
.menu("INFO_MT_mesh_torus_add", text
="Torus Objects")
76 layout
.menu("INFO_MT_mesh_misc_add", text
="Misc Objects")
78 class INFO_MT_mesh_gemstones_add(bpy
.types
.Menu
):
79 # Define the "Gemstones" menu
80 bl_idname
= "INFO_MT_mesh_gemstones_add"
81 bl_label
= "Gemstones"
83 def draw(self
, context
):
85 layout
.operator_context
= 'INVOKE_REGION_WIN'
86 layout
.operator("mesh.primitive_diamond_add",
88 layout
.operator("mesh.primitive_gem_add",
92 class INFO_MT_mesh_gears_add(bpy
.types
.Menu
):
93 # Define the "Gears" menu
94 bl_idname
= "INFO_MT_mesh_gears_add"
97 def draw(self
, context
):
99 layout
.operator_context
= 'INVOKE_REGION_WIN'
100 layout
.operator("mesh.primitive_gear",
102 layout
.operator("mesh.primitive_worm_gear",
105 class INFO_MT_mesh_math_add(bpy
.types
.Menu
):
106 # Define the "Math Function" menu
107 bl_idname
= "INFO_MT_mesh_math_add"
108 bl_label
= "Math Functions"
110 def draw(self
, context
):
112 layout
.operator_context
= 'INVOKE_REGION_WIN'
113 layout
.operator("mesh.primitive_z_function_surface",
114 text
="Z Math Surface")
115 layout
.operator("mesh.primitive_xyz_function_surface",
116 text
="XYZ Math Surface")
118 class INFO_MT_mesh_basic_add(bpy
.types
.Menu
):
119 # Define the "Simple Objects" menu
120 bl_idname
= "INFO_MT_mesh_basic_add"
121 bl_label
= "Simple Objects"
123 def draw(self
, context
):
125 layout
.operator_context
= 'INVOKE_REGION_WIN'
126 layout
.operator("mesh.primitive_sqorus_add",
128 layout
.operator("mesh.primitive_wedge_add")
129 layout
.operator("mesh.primitive_star_add",
131 layout
.operator("mesh.primitive_trapezohedron_add",
132 text
="Trapezohedron")
133 layout
.operator("mesh.primitive_polysphere_add",
136 class INFO_MT_mesh_torus_add(bpy
.types
.Menu
):
137 # Define the "Simple Objects" menu
138 bl_idname
= "INFO_MT_mesh_torus_add"
139 bl_label
= "Torus Objects"
141 def draw(self
, context
):
143 layout
.operator_context
= 'INVOKE_REGION_WIN'
144 layout
.operator("mesh.primitive_twisted_torus_add",
145 text
="Twisted Torus")
146 layout
.operator("mesh.primitive_supertoroid_add",
148 layout
.operator("mesh.primitive_torusknot_add",
151 class INFO_MT_mesh_misc_add(bpy
.types
.Menu
):
152 # Define the "Simple Objects" menu
153 bl_idname
= "INFO_MT_mesh_misc_add"
154 bl_label
= "Misc Objects"
156 def draw(self
, context
):
158 layout
.operator_context
= 'INVOKE_REGION_WIN'
159 layout
.operator("mesh.primitive_steppyramid_add",
161 layout
.operator("mesh.honeycomb_add",
163 layout
.operator("mesh.primitive_teapot_add",
165 # Register all operators and panels
167 # Define "Extras" menu
168 def menu_func(self
, context
):
169 self
.layout
.menu("INFO_MT_mesh_extra_objects_add", icon
="PLUGIN")
173 bpy
.utils
.register_module(__name__
)
175 # Add "Extras" menu to the "Add Mesh" menu
176 bpy
.types
.INFO_MT_mesh_add
.append(menu_func
)
180 bpy
.utils
.unregister_module(__name__
)
182 # Remove "Extras" menu from the "Add Mesh" menu.
183 bpy
.types
.INFO_MT_mesh_add
.remove(menu_func
)
185 if __name__
== "__main__":