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>2014-08-04 18:31:22 +0400
committerBrendon Murphy <meta.androcto1@gmail.com>2014-08-04 18:31:22 +0400
commit263763f2d120000c9d75777afe299418335b4adb (patch)
tree378df844b21ec5cd8a154c70454140471ec758ac /add_mesh_extra_objects/__init__.py
parentc2d1f06c06097965abdb00bcda557704d917dd19 (diff)
updates & cleanup, merged pipe joints & solid objects, cleaner integration into shift/a
Diffstat (limited to 'add_mesh_extra_objects/__init__.py')
-rw-r--r--add_mesh_extra_objects/__init__.py79
1 files changed, 42 insertions, 37 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index 47bb1c1f..9c35a1b7 100644
--- a/add_mesh_extra_objects/__init__.py
+++ b/add_mesh_extra_objects/__init__.py
@@ -21,8 +21,8 @@
bl_info = {
"name": "Extra Objects",
"author": "Multiple Authors",
- "version": (0, 3),
- "blender": (2, 63, 0),
+ "version": (0, 3, 0),
+ "blender": (2, 71, 0),
"location": "View3D > Add > Mesh > Extra Objects",
"description": "Add extra object types",
"warning": "",
@@ -31,7 +31,6 @@ bl_info = {
"category": "Add Mesh",
}
-
if "bpy" in locals():
import imp
imp.reload(add_mesh_extra_objects)
@@ -45,6 +44,10 @@ if "bpy" in locals():
imp.reload(add_mesh_torusknot)
imp.reload(add_mesh_honeycomb)
imp.reload(add_mesh_teapot)
+ imp.reload(add_mesh_pipe_joint)
+ imp.reload(add_mesh_teapot)
+ imp.reload(add_mesh_solid)
+
else:
from . import add_mesh_extra_objects
from . import add_mesh_twisted_torus
@@ -57,37 +60,11 @@ else:
from . import add_mesh_torusknot
from . import add_mesh_honeycomb
from . import add_mesh_teapot
-import bpy
-
-
-class INFO_MT_mesh_extras_add(bpy.types.Menu):
- # Define the "Extras" menu
- bl_idname = "INFO_MT_mesh_extra_objects_add"
- bl_label = "Extra Objects"
-
- 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.menu("INFO_MT_mesh_basic_add", text="Basic Objects")
- layout.menu("INFO_MT_mesh_torus_add", text="Torus Objects")
- layout.menu("INFO_MT_mesh_misc_add", text="Misc Objects")
-
-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")
+ from . import add_mesh_pipe_joint
+ from . import add_mesh_teapot
+ from . import add_mesh_solid
+import bpy
class INFO_MT_mesh_gears_add(bpy.types.Menu):
# Define the "Gears" menu
@@ -114,6 +91,7 @@ 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")
class INFO_MT_mesh_basic_add(bpy.types.Menu):
# Define the "Simple Objects" menu
@@ -123,6 +101,10 @@ class INFO_MT_mesh_basic_add(bpy.types.Menu):
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")
@@ -130,8 +112,6 @@ class INFO_MT_mesh_basic_add(bpy.types.Menu):
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
@@ -162,11 +142,37 @@ class INFO_MT_mesh_misc_add(bpy.types.Menu):
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
+ bl_idname = "INFO_MT_mesh_pipe_joints_add"
+ bl_label = "Pipe Joints"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator("mesh.primitive_elbow_joint_add",
+ text="Pipe Elbow")
+ layout.operator("mesh.primitive_tee_joint_add",
+ text="Pipe T-Joint")
+ layout.operator("mesh.primitive_wye_joint_add",
+ text="Pipe Y-Joint")
+ layout.operator("mesh.primitive_cross_joint_add",
+ text="Pipe Cross-Joint")
+ 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.menu("INFO_MT_mesh_extra_objects_add", icon="PLUGIN")
+ 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")
def register():
@@ -175,7 +181,6 @@ def register():
# Add "Extras" menu to the "Add Mesh" menu
bpy.types.INFO_MT_mesh_add.append(menu_func)
-
def unregister():
bpy.utils.unregister_module(__name__)