Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendon Murphy <meta.androcto1@gmail.com>2011-05-08 05:58:09 +0400
committerBrendon Murphy <meta.androcto1@gmail.com>2011-05-08 05:58:09 +0400
commit7ed9cf456a7016c30ccb54215fd17a664deecc5a (patch)
treea8d2fbff73a46d69aa34772d83f00a496865184b /add_mesh_extra_objects
parent99bd6d5079bc0b7178c790c41ee8855854353c6d (diff)
Added sub menus as per original scripts.
rearranged layout so everything is cleaner.
Diffstat (limited to 'add_mesh_extra_objects')
-rw-r--r--add_mesh_extra_objects/__init__.py35
1 files changed, 33 insertions, 2 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index 25acb636..ad231d02 100644
--- a/add_mesh_extra_objects/__init__.py
+++ b/add_mesh_extra_objects/__init__.py
@@ -57,6 +57,11 @@ class INFO_MT_mesh_extras_add(bpy.types.Menu):
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.menu("INFO_MT_mesh_gemstones_add", text="Gemstones")
+ layout.menu("INFO_MT_mesh_gears_add", text="Gears")
+ layout.menu("INFO_MT_mesh_math_add", text="Math Function")
+ layout.operator("mesh.primitive_twisted_torus_add",
+ text="Twisted Torus")
layout.operator("mesh.primitive_sqorus_add",
text="Sqorus")
layout.operator("mesh.primitive_wedge_add")
@@ -64,16 +69,42 @@ class INFO_MT_mesh_extras_add(bpy.types.Menu):
text="Star")
layout.operator("mesh.primitive_trapezohedron_add",
text="Trapezohedron")
- layout.operator("mesh.primitive_twisted_torus_add",
- text="Twisted Torus")
+
+class INFO_MT_mesh_gemstones_add(bpy.types.Menu):
+ # Define the "Gemstones" menu
+ bl_idname = "INFO_MT_mesh_gemstones_add"
+ bl_label = "Gemstones"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_diamond_add",
text="Diamond")
layout.operator("mesh.primitive_gem_add",
text="Gem")
+
+
+class INFO_MT_mesh_gears_add(bpy.types.Menu):
+ # Define the "Gears" menu
+ bl_idname = "INFO_MT_mesh_gears_add"
+ bl_label = "Gears"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_gear",
text="Gear")
layout.operator("mesh.primitive_worm_gear",
text="Worm")
+
+class INFO_MT_mesh_math_add(bpy.types.Menu):
+ # Define the "Math Function" menu
+ bl_idname = "INFO_MT_mesh_math_add"
+ bl_label = "Math Functions"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_z_function_surface",
text="Z Math Surface")
layout.operator("mesh.primitive_xyz_function_surface",