[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3331] trunk/py/scripts/addons/ add_mesh_extra_objects/__init__.py: clean up menu
Brendon Murphy
meta.androcto1 at gmail.com
Wed May 2 17:04:40 CEST 2012
Revision: 3331
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3331
Author: meta-androcto
Date: 2012-05-02 15:04:40 +0000 (Wed, 02 May 2012)
Log Message:
-----------
clean up menu
Modified Paths:
--------------
trunk/py/scripts/addons/add_mesh_extra_objects/__init__.py
Modified: trunk/py/scripts/addons/add_mesh_extra_objects/__init__.py
===================================================================
--- trunk/py/scripts/addons/add_mesh_extra_objects/__init__.py 2012-05-01 18:54:01 UTC (rev 3330)
+++ trunk/py/scripts/addons/add_mesh_extra_objects/__init__.py 2012-05-02 15:04:40 UTC (rev 3331)
@@ -67,14 +67,9 @@
layout.menu("INFO_MT_mesh_gears_add", text="Gears")
layout.menu("INFO_MT_mesh_math_add", text="Math Function")
layout.menu("INFO_MT_mesh_basic_add", text="Basic Objects")
- layout.operator("mesh.primitive_twisted_torus_add",
- text="Twisted Torus")
- layout.operator("mesh.primitive_polysphere_add",
- text="Polysphere")
- layout.operator("mesh.primitive_supertoroid_add",
- text="Supertoroid")
+ layout.menu("INFO_MT_mesh_torus_add", text="Torus Objects")
layout.operator("mesh.primitive_steppyramid_add",
- text="Pyramid")
+ text="Step Pyramid")
class INFO_MT_mesh_gemstones_add(bpy.types.Menu):
# Define the "Gemstones" menu
@@ -131,7 +126,22 @@
text="Star")
layout.operator("mesh.primitive_trapezohedron_add",
text="Trapezohedron")
+ layout.operator("mesh.primitive_polysphere_add",
+ text="Polysphere")
+
+class INFO_MT_mesh_torus_add(bpy.types.Menu):
+ # Define the "Simple Objects" menu
+ bl_idname = "INFO_MT_mesh_torus_add"
+ bl_label = "Torus Objects"
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator("mesh.primitive_twisted_torus_add",
+ text="Twisted Torus")
+ layout.operator("mesh.primitive_supertoroid_add",
+ text="Supertoroid")
+
# Register all operators and panels
# Define "Extras" menu
More information about the Bf-extensions-cvs
mailing list