[Bf-extensions-cvs] [263763f] master: updates & cleanup, merged pipe joints & solid objects, cleaner integration into shift/a

Brendon Murphy noreply at git.blender.org
Mon Aug 4 16:32:01 CEST 2014


Commit: 263763f2d120000c9d75777afe299418335b4adb
Author: Brendon Murphy
Date:   Tue Aug 5 00:31:22 2014 +1000
Branches: master
https://developer.blender.org/rBA263763f2d120000c9d75777afe299418335b4adb

updates & cleanup, merged pipe joints & solid objects, cleaner integration into shift/a

===================================================================

M	add_mesh_extra_objects/__init__.py
M	add_mesh_extra_objects/add_mesh_3d_function_surface.py
M	add_mesh_extra_objects/add_mesh_extra_objects.py
M	add_mesh_extra_objects/add_mesh_gears.py
M	add_mesh_extra_objects/add_mesh_gemstones.py
M	add_mesh_extra_objects/add_mesh_honeycomb.py
A	add_mesh_extra_objects/add_mesh_pipe_joint.py
M	add_mesh_extra_objects/add_mesh_polysphere.py
A	add_mesh_extra_objects/add_mesh_solid.py
M	add_mesh_extra_objects/add_mesh_supertoroid.py
M	add_mesh_extra_objects/add_mesh_teapot.py
M	add_mesh_extra_objects/add_mesh_torusknot.py
M	add_mesh_extra_objects/add_mesh_twisted_torus.py
D	add_mesh_pipe_joint.py
D	add_mesh_solid.py

===================================================================

diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index 47bb1c1..9c35a1b 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__)
 
diff --git a/add_mesh_extra_objects/add_mesh_3d_function_surface.py b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
index ca39d54..00227dd 100644
--- a/add_mesh_extra_objects/add_mesh_3d_function_surface.py
+++ b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
@@ -16,17 +16,9 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 '''
-bl_info = {
     "name": "3D Function Surfaces",
     "author": "Buerbaum Martin (Pontiac), Elod Csirmaz",
     "version": (0, 3, 8),
-    "blender": (2, 57, 0),
-    "location": "View3D > Add > Mesh",
-    "description": "Create Objects using Math Formulas",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
-                "Scripts/Add_Mesh/Add_3d_Function_Surface",
-    "category": "Add Mesh"}
 '''
 
 import bpy
diff --git a/add_mesh_extra_objects/add_mesh_extra_objects.py b/add_mesh_extra_objects/add_mesh_extra_objects.py
index 1007b15..040e13f 100644
--- a/add_mesh_extra_objects/add_mesh_extra_objects.py
+++ b/add_mesh_extra_objects/add_mesh_extra_objects.py
@@ -39,7 +39,6 @@ def create_mesh_object(context, verts, edges, faces, name):
     from bpy_extras import object_utils
     return object_utils.object_data_add(context, mesh, operator=None)
 
-
 # A very simple "bridge" tool.
 # Connects two equally long vertex rows with faces.
 # Returns a list of the new faces (list of  lists)
diff --git a/add_mesh_extra_objects/add_mesh_gears.py b/add_mesh_extra_objects/add_mesh_gears.py
index d657fcf..e7196f6 100644
--- a/add_mesh_extra_objects/add_mesh_gears.py
+++ b/add_mesh_extra_objects/add_mesh_gears.py
@@ -19,18 +19,9 @@
 #
 # ***** END GPL LICENCE BLOCK *****
 '''
-bl_info = {
     "name": "Gears",
     "author": "Michel J. Anders (varkenvarken)",
     "version": (2, 4, 2),
-    "blender": (2, 57, 0),
-    "location": "View3D > Add > Mesh > Gears ",
-    "description": "Adds a mesh Gear to the Add Mesh menu",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
-                "Scripts/Add_Mesh/Add_Gear",
-    "category": "Add Mesh",
-}
 '''
 
 import bpy
@@ -54,7 +45,6 @@ def create_mesh_object(context, verts, edges, faces, name):
     from bpy_extras import object_utils
     return object_utils.object_data_add(context, mesh, operator=None)
 
-
 # A very simple "bridge" tool.
 # Connects two equally long vertex rows with faces.
 # Returns a list of the new faces (list of  lists)
@@ -123,7 +113,6 @@ def createFaces(vertIdx1, vertIdx2, closed=False, flipped=False):
 
     return faces
 
-
 # Calculate the vertex coordinates for a single
 # section of a gear tooth.
 # Returns 4 lists of vertex coords (list of tuples):
@@ -145,6 +134,7 @@ def createFaces(vertIdx1, vertIdx2, closed=False, flipped=False):
 # p_angle
 # rack
 # crown
+
 def add_tooth(a, t, d, radius, Ad, De, base, p_angle, rack=0, crown=0.0):
     A = [a, a + t / 4, a + t / 2, a + 3 * t / 4]
     C = [cos(i) for i in A]
@@ -193,7 +183,6 @@ def add_tooth(a, t, d, radius, Ad, De, base, p_angle, rack=0, crown=0.0):
     return (verts_inner_base, verts_outer_base,
         verts_middle_tooth, verts_tip_tooth)
 
-
 # EXPERIMENTAL Calculate the vertex coordinates for a single
 # section of a gearspoke.
 # Returns them as a list of tuples.
@@ -211,6 +200,7 @@ def add_tooth(a, t, d, radius, Ad, De, base, p_angle, rack=0, crown=0.0):
 # width
 #
 # @todo Finish this.
+
 def add_spoke(a, t, d, radius, De, base, s, w, l, gap=0, width=19):
     Rd = radius - De
     Rb = Rd - base
@@ -249,7 +239,6 @@ def add_spoke(a, t, d, radius, De, base, s, w, l, gap=0, width=19):
 
     return verts, edgefaces, edgefaces2, sf
 
-
 # Create gear geometry.
 # Returns:
 # * A list of vertices (list of tuples)
@@ -270,6 +259,7 @@ def add_spoke(a, t, d, radius, De, base, s, w, l, gap=0, width=19):
 # crown ... Inward pointing extend of crown teeth.
 #
 # inner radius = radius - (De + base)
+
 def add_gear(teethNum, radius, Ad, De, base, p_angle,
     width=1, skew=0, conangle=0, rack=0, crown=0.0):
 
@@ -382,7 +372,6 @@ def add_gear(teethNum, radius, Ad, De, base, p_angle,
 
     return verts, faces, vgroup_top, vgroup_valley
 
-
 # Create spokes geometry.
 # Returns:
 # * A list of vertices (list of tuples)
@@ -404,6 +393,7 @@ def add_gear(teethNum, radius, Ad, De, base, p_angle,
 # @todo Finish this
 # @todo Create a function that takes a "Gear" and creates a
 #       matching "Gear Spokes" object.
+
 def add_spokes(teethNum, radius, De, base, width=1, conangle=0, rack=0,
     spoke=3, spbevel=0.1, spwidth=0.2, splength=1.0, spresol=9):
 
@@ -466,7 +456,6 @@ def add_spokes(teethNum, radius, De, base, width=1, conangle=0, rack=0,
 
     return verts, faces
 
-
 # Create worm geometry.
 # Returns:
 # * 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list