diff options
author | Brendon Murphy <meta.androcto1@gmail.com> | 2015-05-01 05:52:03 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2015-05-01 05:52:03 +0300 |
commit | 40c00d312f0cc54485f93e47763eb9cd9b413fee (patch) | |
tree | 6043d6cf956cc8e737a07c49f0891acf94a87a42 /add_mesh_extra_objects/__init__.py | |
parent | 3b6028fd8b895dcc42b23e481fd8d99c10553acd (diff) |
add_extra_mesh_objects: new version
Tracker: https://developer.blender.org/T44561
New UI, New Addons, Better organization & removal of 'Lesser Object
Types'
Merged & removed "lesser" & 'larger" add mesh scripts.
Menu updates & re-organization & modernize.
New: Add Vert, Round Cube, Menger Cube, Brilliant Diamond, Parent to
Empty
Removed: Add Mesh: Sqorus, Trapezohedron, Wedge, Polysphere.
Merged add_mesh_symmetrical_empty from contrib
Documentation:
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Add_Mesh_Extra_Objects
Diffstat (limited to 'add_mesh_extra_objects/__init__.py')
-rw-r--r-- | add_mesh_extra_objects/__init__.py | 121 |
1 files changed, 79 insertions, 42 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py index 41bebc7f..9cd18128 100644 --- a/add_mesh_extra_objects/__init__.py +++ b/add_mesh_extra_objects/__init__.py @@ -16,13 +16,13 @@ # # ##### END GPL LICENSE BLOCK ##### # Contributed to by -# Pontiac, Fourmadmen, varkenvarken, tuga3d, meta-androcto, metalliandy, dreampainter & cotejrp1# +# Pontiac, Fourmadmen, varkenvarken, tuga3d, meta-androcto, metalliandy, dreampainter, cotejrp1# bl_info = { "name": "Extra Objects", "author": "Multiple Authors", "version": (0, 3, 0), - "blender": (2, 72, 0), + "blender": (2, 74, 0), "location": "View3D > Add > Mesh", "description": "Add extra mesh object types", "warning": "", @@ -33,12 +33,12 @@ bl_info = { if "bpy" in locals(): import importlib - importlib.reload(add_mesh_extra_objects) + importlib.reload(add_mesh_star) importlib.reload(add_mesh_twisted_torus) importlib.reload(add_mesh_gemstones) importlib.reload(add_mesh_gears) importlib.reload(add_mesh_3d_function_surface) - importlib.reload(add_mesh_polysphere) + importlib.reload(add_mesh_round_cube) importlib.reload(add_mesh_supertoroid) importlib.reload(add_mesh_pyramid) importlib.reload(add_mesh_torusknot) @@ -46,14 +46,17 @@ if "bpy" in locals(): importlib.reload(add_mesh_teapot) importlib.reload(add_mesh_pipe_joint) importlib.reload(add_mesh_solid) - + importlib.reload(add_mesh_round_brilliant) + importlib.reload(add_mesh_menger_sponge) + importlib.reload(add_mesh_vertex) + importlib.reload(add_empty_as_parent) else: - from . import add_mesh_extra_objects + from . import add_mesh_star from . import add_mesh_twisted_torus from . import add_mesh_gemstones from . import add_mesh_gears from . import add_mesh_3d_function_surface - from . import add_mesh_polysphere + from . import add_mesh_round_cube from . import add_mesh_supertoroid from . import add_mesh_pyramid from . import add_mesh_torusknot @@ -61,9 +64,33 @@ else: from . import add_mesh_teapot from . import add_mesh_pipe_joint from . import add_mesh_solid + from . import add_mesh_round_brilliant + from . import add_mesh_menger_sponge + from . import add_mesh_vertex + from . import add_empty_as_parent + import bpy + +class INFO_MT_mesh_vert_add(bpy.types.Menu): + # Define the "Pipe Joints" menu + bl_idname = "INFO_MT_mesh_vert_add" + bl_label = "Single Vert" + + def draw(self, context): + layout = self.layout + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("mesh.primitive_vert_add", + text="Add Single Vert ") + layout.operator("mesh.primitive_emptyvert_add", + text="Object Origin Only") + layout.operator("mesh.primitive_symmetrical_vert_add", + text="Origin & Vert Mirrored") + layout.operator("mesh.primitive_symmetrical_empty_add", + text="Object Origin Mirrored") + + class INFO_MT_mesh_gears_add(bpy.types.Menu): # Define the "Gears" menu bl_idname = "INFO_MT_mesh_gears_add" @@ -77,6 +104,23 @@ class INFO_MT_mesh_gears_add(bpy.types.Menu): layout.operator("mesh.primitive_worm_gear", text="Worm") + +class INFO_MT_mesh_diamonds_add(bpy.types.Menu): + # Define the "Gears" menu + bl_idname = "INFO_MT_mesh_diamonds_add" + bl_label = "Diamonds" + + def draw(self, context): + layout = self.layout + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("mesh.primitive_brilliant_add", + text="Brilliant Diamond") + layout.operator("mesh.primitive_diamond_add", + text="Diamond") + layout.operator("mesh.primitive_gem_add", + text="Gem") + + class INFO_MT_mesh_math_add(bpy.types.Menu): # Define the "Math Function" menu bl_idname = "INFO_MT_mesh_math_add" @@ -89,27 +133,29 @@ class INFO_MT_mesh_math_add(bpy.types.Menu): text="Z Math Surface") layout.operator("mesh.primitive_xyz_function_surface", text="XYZ Math Surface") - self.layout.operator("mesh.primitive_solid_add", text="Solid") + self.layout.operator("mesh.primitive_solid_add", text="Regular Solid") + -class INFO_MT_mesh_basic_add(bpy.types.Menu): +class INFO_MT_mesh_extras_add(bpy.types.Menu): # Define the "Simple Objects" menu - bl_idname = "INFO_MT_mesh_basic_add" - bl_label = "Simple Objects" + bl_idname = "INFO_MT_mesh_extras_add" + bl_label = "Extras" 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") - layout.operator("mesh.primitive_sqorus_add", - text="Sqorus") - layout.operator("mesh.primitive_wedge_add") + layout.menu("INFO_MT_mesh_diamonds_add", text="Diamonds", icon="PMARKER_SEL") layout.operator("mesh.primitive_star_add", - text="Star") - layout.operator("mesh.primitive_trapezohedron_add", - text="Trapezohedron") + text="Simple Star") + layout.operator("mesh.primitive_steppyramid_add", + text="Step Pyramid") + layout.operator("mesh.honeycomb_add", + text="Honeycomb") + layout.operator("mesh.primitive_teapot_add", + text="Teapot+") + layout.operator("mesh.menger_sponge_add", + text="Menger Sponge") + class INFO_MT_mesh_torus_add(bpy.types.Menu): # Define the "Simple Objects" menu @@ -126,20 +172,6 @@ class INFO_MT_mesh_torus_add(bpy.types.Menu): layout.operator("mesh.primitive_torusknot_add", text="Torus Knot") -class INFO_MT_mesh_misc_add(bpy.types.Menu): - # Define the "Simple Objects" menu - bl_idname = "INFO_MT_mesh_misc_add" - bl_label = "Misc Objects" - - def draw(self, context): - layout = self.layout - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("mesh.primitive_steppyramid_add", - text="Step Pyramid") - layout.operator("mesh.honeycomb_add", - text="Honeycomb") - layout.operator("mesh.primitive_teapot_add", - text="Teapot+") class INFO_MT_mesh_pipe_joints_add(bpy.types.Menu): # Define the "Pipe Joints" menu @@ -160,17 +192,22 @@ class INFO_MT_mesh_pipe_joints_add(bpy.types.Menu): layout.operator("mesh.primitive_n_joint_add", text="Pipe N-Joint") + # Register all operators and panels # Define "Extras" menu def menu_func(self, context): - self.layout.operator("mesh.primitive_polysphere_add", text="Polysphere") - self.layout.menu("INFO_MT_mesh_pipe_joints_add", text="Pipe Joints") - self.layout.menu("INFO_MT_mesh_gears_add", text="Gears") - self.layout.menu("INFO_MT_mesh_math_add", text="Math Function") - self.layout.menu("INFO_MT_mesh_torus_add", text="Torus Objects") - self.layout.menu("INFO_MT_mesh_basic_add", text="Basic Objects") - self.layout.menu("INFO_MT_mesh_misc_add", text="Misc Objects") + self.layout.separator() + self.layout.menu("INFO_MT_mesh_vert_add", text="Single Vert", icon="LAYER_ACTIVE") + self.layout.menu("INFO_MT_mesh_round_cube_add", text="Round Cube", icon="WIRE") + self.layout.menu("INFO_MT_mesh_math_add", text="Math Function", icon="PACKAGE") + self.layout.menu("INFO_MT_mesh_pipe_joints_add", text="Pipe Joints", icon="SNAP_PEEL_OBJECT") + self.layout.menu("INFO_MT_mesh_gears_add", text="Gears", icon="SCRIPTWIN") + self.layout.menu("INFO_MT_mesh_torus_add", text="Torus Objects", icon="MESH_TORUS") + self.layout.menu("INFO_MT_mesh_extras_add", text="Extras", icon="MESH_DATA") + self.layout.separator() + self.layout.operator("object.parent_to_empty", text="Parent To Empty", icon="LINK_AREA") + self.layout.separator() def register(): |